Package jadex.base.gui.filetree
Class DefaultNodeHandler
- java.lang.Object
-
- jadex.base.gui.filetree.DefaultNodeHandler
-
- All Implemented Interfaces:
INodeHandler,ISwingNodeHandler
public class DefaultNodeHandler extends java.lang.Object implements ISwingNodeHandler
The default node handler offers two refresh actions. The node handler is responsible for popup menu on nodes.
-
-
Constructor Summary
Constructors Constructor Description DefaultNodeHandler(javax.swing.JTree tree)Create a new node handler.DefaultNodeHandler(javax.swing.JTree tree, java.util.List actions, javax.swing.UIDefaults overlays)Create a new node handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(javax.swing.Action action, javax.swing.Icon overlay)Add action.javax.swing.ActiongetAction(java.lang.String name)Get an action with a name.javax.swing.ActiongetDefaultAction(ISwingTreeNode node)Get the default action.byte[]getOverlay(ITreeNode node)Get the overlay for a node if any.javax.swing.Action[]getPopupActions(ISwingTreeNode[] nodes)Get the popup actions.javax.swing.IcongetSwingOverlay(ISwingTreeNode node)Get the overlay.
-
-
-
Method Detail
-
getSwingOverlay
public javax.swing.Icon getSwingOverlay(ISwingTreeNode node)
Get the overlay.- Specified by:
getSwingOverlayin interfaceISwingNodeHandler- Parameters:
node- The node.- Returns:
- The icon.
-
getOverlay
public byte[] getOverlay(ITreeNode node)
Description copied from interface:INodeHandlerGet the overlay for a node if any.- Specified by:
getOverlayin interfaceINodeHandler
-
getPopupActions
public javax.swing.Action[] getPopupActions(ISwingTreeNode[] nodes)
Get the popup actions.- Specified by:
getPopupActionsin interfaceISwingNodeHandler- Parameters:
nodes- The nodes.- Returns:
- The actions.
-
getDefaultAction
public javax.swing.Action getDefaultAction(ISwingTreeNode node)
Get the default action.- Specified by:
getDefaultActionin interfaceISwingNodeHandler- Parameters:
node- The node.- Returns:
- The action.
-
addAction
public void addAction(javax.swing.Action action, javax.swing.Icon overlay)Add action.
-
getAction
public javax.swing.Action getAction(java.lang.String name)
Get an action with a name.
-
-