|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alee.utils.swing.AutoExpandSingleChildNodeListener
public class AutoExpandSingleChildNodeListener
Tree expansion listener that automatically expands node futher if it has only one child. Actual expand operation occurs right after node expand event and works only on its childs. Be aware that this listener is not suited for async trees.
Constructor Summary | |
---|---|
AutoExpandSingleChildNodeListener()
|
Method Summary | |
---|---|
static AutoExpandSingleChildNodeListener |
install(javax.swing.JTree tree)
Installs listener into tree and ensures that it is the only one installed. |
static boolean |
isInstalled(javax.swing.JTree tree)
Returns whether the specified tree has any listeners installed or not. |
void |
treeCollapsed(javax.swing.event.TreeExpansionEvent event)
|
void |
treeExpanded(javax.swing.event.TreeExpansionEvent event)
|
static void |
uninstall(javax.swing.JTree tree)
Uninstalls all listeners from the specified tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutoExpandSingleChildNodeListener()
Method Detail |
---|
public void treeExpanded(javax.swing.event.TreeExpansionEvent event)
treeExpanded
in interface javax.swing.event.TreeExpansionListener
public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
treeCollapsed
in interface javax.swing.event.TreeExpansionListener
public static AutoExpandSingleChildNodeListener install(javax.swing.JTree tree)
tree
- tree to modify
public static void uninstall(javax.swing.JTree tree)
tree
- tree to modifypublic static boolean isInstalled(javax.swing.JTree tree)
tree
- tree to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |