当前页面:
在线文档首页 >
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
org.openide.util.SharedClassObject
org.openide.util.actions.SystemAction
org.openide.util.actions.CallableSystemAction
org.openide.util.actions.NodeAction
org.netbeans.modules.vcscore.actions.GeneralCommandAction
org.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
Methods inherited from class org.openide.util.SharedClassObject |
addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removePropertyChangeListener, reset, writeExternal, writeReplace |
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
ClusteringAction
public ClusteringAction()
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()