|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.config.app.ConfigNode
public class ConfigNode
Tree node implementation for use in Swing JTree models, and in console menu trees.
It provides helper methods for easier Configurator trees construction.
Constructor Summary | |
---|---|
ConfigNode(java.lang.String label,
Configurator cfg)
Creates a node with the specified label and configurator. |
Method Summary | |
---|---|
void |
addConfigurator(Configurator cfg)
Adds a configurator into its path. |
void |
addNode(java.lang.String path,
Configurator cfg)
Adds a configurator node in the specified path. |
int |
compareTo(java.lang.Object o)
|
ConfigNode |
getChild(int i)
Gets the ith child node. |
int |
getChildCount()
Gets the number of children nodes. |
Configurator |
getConfigurator()
Gets the configurator instance associated to this node. |
javax.swing.Icon |
getIcon()
Gets the icon for this configurator. |
java.lang.String |
getLabel()
Gets this node label. |
int |
indexOf(ConfigNode child)
Gets the index at which the specified node is located. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfigNode(java.lang.String label, Configurator cfg)
label
- The node labelcfg
- The associated configurator instance. It can be null.Method Detail |
---|
public java.lang.String getLabel()
public Configurator getConfigurator()
public java.lang.String toString()
toString
in class java.lang.Object
public javax.swing.Icon getIcon()
public int getChildCount()
public ConfigNode getChild(int i)
i
- The index of the child node to retrieve
public int indexOf(ConfigNode child)
child
- The child node
public void addNode(java.lang.String path, Configurator cfg)
path
- The path to the configurator nodecfg
- The configurator instance to associate to the leaf nodepublic void addConfigurator(Configurator cfg)
cfg
- The configurator to add to the treepublic int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |