Class 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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<javax.swing.Action> actions
      The actions.
      protected static javax.swing.UIDefaults icons
      The image icons.
      protected javax.swing.UIDefaults overlays
      The overlay icons.
    • 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.
    • Field Detail

      • icons

        protected static final javax.swing.UIDefaults icons
        The image icons.
      • actions

        protected java.util.List<javax.swing.Action> actions
        The actions.
      • overlays

        protected javax.swing.UIDefaults overlays
        The overlay icons.
    • Constructor Detail

      • DefaultNodeHandler

        public DefaultNodeHandler​(javax.swing.JTree tree)
        Create a new node handler.
      • DefaultNodeHandler

        public DefaultNodeHandler​(javax.swing.JTree tree,
                                  java.util.List actions,
                                  javax.swing.UIDefaults overlays)
        Create a new node handler.
    • Method Detail

      • getPopupActions

        public javax.swing.Action[] getPopupActions​(ISwingTreeNode[] nodes)
        Get the popup actions.
        Specified by:
        getPopupActions in interface ISwingNodeHandler
        Parameters:
        nodes - The nodes.
        Returns:
        The actions.
      • 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.