|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.threerings.config.swing.ConfigTreeNode
public class ConfigTreeNode
A node in the config tree.
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
EMPTY_ENUMERATION |
| Constructor Summary | |
|---|---|
ConfigTreeNode()
No-arg constructor for deserialization. |
|
ConfigTreeNode(String partialName,
ManagedConfig config)
Creates a new node with the specified partial name. |
|
| Method Summary | |
|---|---|
void |
addConfigs(ConfigGroup<ManagedConfig> group)
Adds all configurations under this node to the supplied group. |
ConfigTreeNode |
clone()
|
int |
decrementCount()
Decrements the count for this node. |
void |
expandPaths(JTree tree)
Expands paths according to the _expanded field. |
void |
expandPaths(JTree tree,
int depth)
Expands all paths up to the specified depth. |
String |
findNameForChild(String base)
Finds an unused name for a child of this node from the specified base. |
ManagedConfig |
getConfig()
Returns the configuration contained in this node, or null for none. |
void |
getConfigs(List<ManagedConfig> configs)
Puts all of the configurations under this node into the supplied list. |
void |
getConfigs(List<ManagedConfig> configs,
boolean immediate)
Puts all of the configurations under this node into the supplied list. |
int |
getInsertionIndex(ConfigTreeNode child)
Returns the index at which the specified node should be inserted to maintain the sort order. |
Tuple<ConfigTreeNode,ConfigTreeNode> |
getInsertionPoint(ManagedConfig config,
String name)
Finds the insertion point (existing parent and new child) for the specified configuration. |
String |
getName()
Returns the full name of this node. |
ConfigTreeNode |
getNode(String name)
Finds and returns the node with the specified name (or null if it can't be
found). |
void |
incrementCount()
Increments the count for this node. |
void |
insert(MutableTreeNode child,
int index)
|
void |
insertConfig(ManagedConfig config,
String name)
Inserts the given configuration under this node, creating any required intermediate nodes. |
void |
readFields(Importer in)
Reads the exportable fields of the object. |
void |
remove(int index)
|
void |
removeConfigs(ConfigGroup<ManagedConfig> group)
Removes all configurations under this node from the supplied group. |
void |
setExpanded(boolean expanded)
Sets whether or not this node is expanded in the tree. |
boolean |
verifyConfigClass(Class<?> clazz)
Verifies that if this node contains any actual configurations, they're instances of the supplied class. |
void |
writeFields(Exporter out)
Writes the exportable fields of the object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigTreeNode(String partialName,
ManagedConfig config)
config - the configuration for this node, or null if this is a
folder node.public ConfigTreeNode()
| Method Detail |
|---|
public String getName()
public ManagedConfig getConfig()
null for none.
public void incrementCount()
public int decrementCount()
public void setExpanded(boolean expanded)
public Tuple<ConfigTreeNode,ConfigTreeNode> getInsertionPoint(ManagedConfig config,
String name)
public void insertConfig(ManagedConfig config,
String name)
public void addConfigs(ConfigGroup<ManagedConfig> group)
public void removeConfigs(ConfigGroup<ManagedConfig> group)
public void getConfigs(List<ManagedConfig> configs)
public void getConfigs(List<ManagedConfig> configs,
boolean immediate)
public ConfigTreeNode getNode(String name)
null if it can't be
found).
public boolean verifyConfigClass(Class<?> clazz)
public String findNameForChild(String base)
public int getInsertionIndex(ConfigTreeNode child)
public void expandPaths(JTree tree)
_expanded field.
public void expandPaths(JTree tree,
int depth)
public void writeFields(Exporter out)
throws IOException
IOException
public void readFields(Importer in)
throws IOException
IOException
public void insert(MutableTreeNode child,
int index)
insert in interface MutableTreeNodeinsert in class DefaultMutableTreeNodepublic void remove(int index)
remove in interface MutableTreeNoderemove in class DefaultMutableTreeNodepublic ConfigTreeNode clone()
clone in class DefaultMutableTreeNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||