Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javatools/swing/tree/ExpansionRecordingTreeNode.java


1   /*
2    * ExpansionRecordingTreeNode.java
3    *
4    * Created on 4 marzo 2002, 18.37
5       Javatools (modified version) - Some useful general classes.
6       Copyright (C) 2002-2003  Chris Bitmead (original) Antonio Petrelli (modified)
7   
8       This program is free software; you can redistribute it and/or modify
9       it under the terms of the GNU General Public License as published by
10      the Free Software Foundation; either version 2 of the License, or
11      (at your option) any later version.
12  
13      This program is distributed in the hope that it will be useful,
14      but WITHOUT ANY WARRANTY; without even the implied warranty of
15      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16      GNU General Public License for more details.
17  
18      You should have received a copy of the GNU General Public License
19      along with this program; if not, write to the Free Software
20      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  
22      Contact me at: brenmcguire@users.sourceforge.net
23   */
24  
25  package javatools.swing.tree;
26  
27  /**
28   * It is a tree node containing information about its expansion.
29   * @author Antonio Petrelli
30   * @version 0.0.1
31   */
32  public class ExpansionRecordingTreeNode extends javax.swing.tree.DefaultMutableTreeNode {
33  
34      
35      /** Creates new ExpansionRecordingTreeNode */
36      public ExpansionRecordingTreeNode() {
37          expanded = false;
38      }
39      
40      /** Creates a new ExpansionRecordingTreeNode.
41       * @param userObject The object to use.
42       */    
43      public ExpansionRecordingTreeNode(Object userObject) {
44          super(userObject);
45          expanded = false;
46      }
47      
48      /** Creates a new ExpansionRecordingTreeNode.
49       * @param userObject The object to use.
50       * @param allowsChildren <CODE>true</CODE>: allows children;
51       * <CODE>false</CODE>: does not allow children.
52       */    
53      public ExpansionRecordingTreeNode(Object userObject, boolean allowsChildren) {
54          super(userObject, allowsChildren);
55          expanded = false;
56      }
57  
58      /** Sets the expanded flag.
59       * @param value The value.
60       */    
61      public void setExpanded(boolean value) {
62          expanded = value;
63      }
64      
65      /** Returns the expanded flag.
66       * @return The flag.
67       */    
68      public boolean isExpanded() {
69          return expanded;
70     }
71     
72      private boolean expanded;
73      
74  }