|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.ui.TreeElement
public abstract class TreeElement
This is an abstract class representing an element in a tree.
Constructor Summary | |
---|---|
TreeElement()
|
Method Summary | |
---|---|
abstract void |
addChild(TreeElement el,
int position)
Add another element as a child of this one. |
abstract boolean |
canAcceptAsParent(TreeElement el)
Determine whether this element can be added as a child of another one If el is null, return whether this element can be added at the root level of the tree. |
TreeElement |
getChild(int which)
Get a particular child of this element. |
javax.swing.Icon |
getIcon()
Get the icon to display for this element (may be null). |
abstract java.lang.String |
getLabel()
Get the label to display for this element. |
int |
getNumChildren()
Get the number of children which this element has. |
abstract java.lang.Object |
getObject()
Get the object corresponding to this element. |
TreeElement |
getParent()
Get the parent of this element. |
boolean |
isExpanded()
Determine whether this element in the tree is expanded. |
abstract boolean |
isGray()
Get whether this element should be drawn in gray (i.e. |
boolean |
isSelectable()
Determine whether this element in the tree can be selected. |
boolean |
isSelected()
Determine whether this element in the tree is selected. |
abstract void |
removeChild(java.lang.Object obj)
Remove any elements corresponding to the given object from this element's list of children. |
boolean |
selectWithParent()
This returns true if this element should automatically be selected whenever its parent is selected. |
void |
setExpanded(boolean expanded)
Set whether this element in the tree is expanded. |
void |
setSelectable(boolean selectable)
Set whether this element in the tree can be selected. |
void |
setSelected(boolean selected)
Set whether this element in the tree is selected. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeElement()
Method Detail |
---|
public abstract java.lang.String getLabel()
public javax.swing.Icon getIcon()
public boolean isSelected()
public void setSelected(boolean selected)
public boolean isExpanded()
public void setExpanded(boolean expanded)
public boolean isSelectable()
public void setSelectable(boolean selectable)
public boolean selectWithParent()
public TreeElement getParent()
public int getNumChildren()
public TreeElement getChild(int which)
public abstract boolean canAcceptAsParent(TreeElement el)
public abstract void addChild(TreeElement el, int position)
public abstract void removeChild(java.lang.Object obj)
public abstract java.lang.Object getObject()
public abstract boolean isGray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |