站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

ClusteringAction (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.actions
Class ClusteringAction

java.lang.Object
  extended byorg.openide.util.SharedClassObject
      extended byorg.openide.util.actions.SystemAction
          extended byorg.openide.util.actions.CallableSystemAction
              extended byorg.openide.util.actions.NodeAction
                  extended byorg.netbeans.modules.vcscore.actions.GeneralCommandAction
                      extended byorg.netbeans.modules.vcscore.actions.ClusteringAction
All Implemented Interfaces:
Action, ActionListener, ContextAwareAction, EventListener, Externalizable, HelpCtx.Provider, Presenter, Presenter.Menu, Presenter.Popup, Presenter.Toolbar, Serializable

public class ClusteringAction
extends GeneralCommandAction

TODO Is not it unused?

Action that displays a submenu of actions when presented in a menu or popup. It reads the menu structure from the default filesystem. Example of layer definition:

           
              

                
                   
                   
                   
                   
                   
                

                
                   
                   
                   
                   
                

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.openide.util.actions.Presenter
Presenter.Menu, Presenter.Popup, Presenter.Toolbar
 
Field Summary
protected static String CLIENT_PROP_ACTION
           
protected  boolean CTRL_Down
           
static String IS_SWITCHABLE_POPUP
           
protected  boolean isMenu
           
static String POPUP_DEFINITION_FOLDER
           
 
Fields inherited from class org.netbeans.modules.vcscore.actions.GeneralCommandAction
GROUP_DESCRIPTION_PROP, GROUP_NAME_PROP, VCS_ACTION_ATTRIBUTE
 
Fields inherited from class org.openide.util.actions.SystemAction
PROP_ENABLED, PROP_ICON
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ClusteringAction()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
protected  boolean checkItemEnable(ClusterItemVisualizer item)
          Checks wheather the item in menu is enabled or not.
protected  boolean clearSharedData()
           
protected  void createPresenter(JMenu menu, String menuPath)
          Creates one level of submenu items based on the default filesystem definition.
protected  String getClusterRootPath()
          This method decides where the definition of the popup should be taken from, default implementation takes the value of POPUP_DEFINITION_FOLDER property of the action.
 JMenuItem getMenuPresenter()
          Get a menu item that can present this action in a JMenu.
 String getName()
           
 JMenuItem getPopupPresenter()
          Get a menu item that can present this action in a JPopupMenu.
protected  String iconResource()
           
protected  boolean isCTRLDown()
          Indicates wheather the CTRL key is pressed.
protected  boolean isSwitchingEnabled()
          Returns if the CTRL key switching is enabled on items with ClusterItemVisualizer.isSwitchable() == true.
 
Methods inherited from class org.netbeans.modules.vcscore.actions.GeneralCommandAction
asynchronous, enable, getHelpCtx, getSupporterMap, getToolbarPresenter, performAction, performAction
 
Methods inherited from class org.openide.util.actions.NodeAction
addNotify, createContextAwareInstance, getActivatedNodes, initialize, isEnabled, removeNotify, setEnabled, surviveFocusChange
 
Methods inherited from class org.openide.util.actions.SystemAction
createPopupMenu, createToolbarPresenter, get, getIcon, getIcon, getValue, linkActions, putValue, setIcon
 
Methods inherited from class org.openide.util.SharedClassObject
addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removePropertyChangeListener, reset, writeExternal, writeReplace
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, putValue, removePropertyChangeListener
 

Field Detail

POPUP_DEFINITION_FOLDER

public static final String POPUP_DEFINITION_FOLDER
See Also:
Constant Field Values

IS_SWITCHABLE_POPUP

public static final String IS_SWITCHABLE_POPUP
See Also:
Constant Field Values

CLIENT_PROP_ACTION

protected static final String CLIENT_PROP_ACTION
See Also:
Constant Field Values

CTRL_Down

protected transient boolean CTRL_Down

isMenu

protected transient boolean isMenu
Constructor Detail

ClusteringAction

public ClusteringAction()
Method Detail

iconResource

protected String iconResource()
Overrides:
iconResource in class GeneralCommandAction

getName

public String getName()
Overrides:
getName in class GeneralCommandAction

getClusterRootPath

protected String getClusterRootPath()
This method decides where the definition of the popup should be taken from, default implementation takes the value of POPUP_DEFINITION_FOLDER property of the action.

Returns:
path to the root folder within the default filesystem.

isSwitchingEnabled

protected boolean isSwitchingEnabled()
Returns if the CTRL key switching is enabled on items with ClusterItemVisualizer.isSwitchable() == true. By default reads the property(value) IS_SWITCHABLE_POPUP


isCTRLDown

protected boolean isCTRLDown()
Indicates wheather the CTRL key is pressed. For use in subclasses' processing.


getMenuPresenter

public JMenuItem getMenuPresenter()
Get a menu item that can present this action in a JMenu.


getPopupPresenter

public JMenuItem getPopupPresenter()
Get a menu item that can present this action in a JPopupMenu.


createPresenter

protected void createPresenter(JMenu menu,
                               String menuPath)
Creates one level of submenu items based on the default filesystem definition. The method is recursive on folders found.

Parameters:
menuPath - the resource path within the default filesystem, pointing to the root folder of the menu.

checkItemEnable

protected boolean checkItemEnable(ClusterItemVisualizer item)
Checks wheather the item in menu is enabled or not. By default lets the ClusterItemVisualizer decide itself, by asking it's isItemEnabled() method.


actionPerformed

public void actionPerformed(ActionEvent e)

clearSharedData

protected boolean clearSharedData()

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.