|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
ilog.views.maps.beans.IlvMapLayerTreeNode
public class IlvMapLayerTreeNode
A persistent DefaultMutableTreeNode attached with a IlvMapLayer.
This class is used to encapsulate a IlvMapLayer into a DefaultMutableTreeNode.
This class is persistent in the way that it can be saved in a .ivl file.
This class is intended to be used as nodes of a IlvMapLayerTreeModel.
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, userObject |
| Constructor Summary | |
|---|---|
IlvMapLayerTreeNode(IlvInputStream stream)
Reads a IlvMapLayerTreeNode from an IlvInputStream |
|
IlvMapLayerTreeNode(Object o)
Creates a IlvMapLayerTreeNode. |
|
| Method Summary | |
|---|---|
TreeNode |
getChildAt(int index)
Returns the (visible in tree) child at the specified index in this node's child array. |
int |
getChildCount()
Returns the number of visible layers under the tree node. |
TreeNode |
getRealChildAt(int index)
Returns the node at index specified, taking even invisible layers into account. |
int |
getRealChildCount()
Returns the total number of layers contained (even if invisible). |
void |
insert(MutableTreeNode newChild,
int childIndex)
Removes newChild from its present parent (if it has a
parent), sets the child's parent to this node, and then adds the child
to this node's child array at index childIndex. |
boolean |
isChecked()
Tells if the node is in selected state. |
boolean |
isReallyLeaf()
Tells if this node is a leaf, taking even invisible layers into account. |
void |
remove(int childIndex)
Removes the child at the specified index from this node's children and sets that node's parent to null. |
void |
setChecked(boolean sel)
Sets the selected state of the node. |
String |
toString()
If the user object is a IlvMapLayer, the name of the layer
is returned. |
void |
write(IlvOutputStream stream)
Writes this node into an IlvOutputStream. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlvMapLayerTreeNode(Object o)
IlvMapLayerTreeNode.
If o is a IlvMapLayer, the node
is attached to this layer using the IlvMapLayer.setNode method.
o - The object to set as the user object to this node.
public IlvMapLayerTreeNode(IlvInputStream stream)
throws IlvReadFileException
IlvMapLayerTreeNode from an IlvInputStream
stream - The stream to read from.
IlvReadFileException| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectstream - The stream to write to.
IOExceptionpublic String toString()
IlvMapLayer, the name of the layer
is returned. If not the default implementation is called.
toString in class DefaultMutableTreeNodeIlvMapLayerpublic void setChecked(boolean sel)
sel - The selected state of the node.public boolean isChecked()
public int getChildCount()
getChildCount in interface TreeNodegetChildCount in class DefaultMutableTreeNodeDefaultMutableTreeNode.getChildCount()public int getRealChildCount()
public TreeNode getChildAt(int index)
getChildAt in interface TreeNodegetChildAt in class DefaultMutableTreeNodeDefaultMutableTreeNode.getChildAt(int)public TreeNode getRealChildAt(int index)
index - index of th child.
public void remove(int childIndex)
remove in interface MutableTreeNoderemove in class DefaultMutableTreeNodeDefaultMutableTreeNode.remove(int)
public void insert(MutableTreeNode newChild,
int childIndex)
newChild from its present parent (if it has a
parent), sets the child's parent to this node, and then adds the child
to this node's child array at index childIndex.
insert in interface MutableTreeNodeinsert in class DefaultMutableTreeNodepublic boolean isReallyLeaf()
true if the node is a leaf, false otherwise.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||