Package jadex.base.gui.filetree
Class ExpansionHandler
- java.lang.Object
- 
- jadex.commons.gui.TreeExpansionHandler
- 
- jadex.base.gui.filetree.ExpansionHandler
 
 
- 
- All Implemented Interfaces:
- java.util.EventListener,- javax.swing.event.TreeExpansionListener,- javax.swing.event.TreeModelListener
 
 public class ExpansionHandler extends TreeExpansionHandler Handles all aspects (e.g. expansion, selection) of the tree that have to happen in background as the refresher thread adds/removes nodes.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.SetexpandedpathsThe expanded node paths.protected NodePathlastselectedpathThe node that was selected before the current project was last saved.- 
Fields inherited from class jadex.commons.gui.TreeExpansionHandlerexpanded, tree
 
- 
 - 
Constructor SummaryConstructors Constructor Description ExpansionHandler(javax.swing.JTree tree)Create a new tree handler.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IFuturehandlePath(javax.swing.tree.TreePath path)Check if an action (e.g.booleanisExpanded(javax.swing.tree.TreePath path)Test if a path is expanded or should be.protected java.lang.Object[]resolveNodePath(NodePath nodepath)Get the node and treepath for a nodepath.voidsetExpandedPaths(NodePath[] paths)Set the expanded paths.voidsetSelectedPath(NodePath path)Set the selected path.- 
Methods inherited from class jadex.commons.gui.TreeExpansionHandlerhandleTreeStructureChanged, isTreeExpanded, treeCollapsed, treeExpanded, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged
 
- 
 
- 
- 
- 
Field Detail- 
lastselectedpathprotected NodePath lastselectedpath The node that was selected before the current project was last saved.
 - 
expandedpathsprotected java.util.Set expandedpaths The expanded node paths.
 
- 
 - 
Method Detail- 
setSelectedPathpublic void setSelectedPath(NodePath path) Set the selected path.
 - 
setExpandedPathspublic void setExpandedPaths(NodePath[] paths) Set the expanded paths.
 - 
handlePathprotected IFuture handlePath(javax.swing.tree.TreePath path) Check if an action (e.g. expand) has to be performed on the path.- Overrides:
- handlePathin class- TreeExpansionHandler
 
 - 
resolveNodePathprotected java.lang.Object[] resolveNodePath(NodePath nodepath) Get the node and treepath for a nodepath.- Parameters:
- nodepath- The node path.
- Returns:
- An object array containing the node [0] and the tree path [1] or null if not found.
 
 - 
isExpandedpublic boolean isExpanded(javax.swing.tree.TreePath path) Test if a path is expanded or should be.- Overrides:
- isExpandedin class- TreeExpansionHandler
 
 
- 
 
-