当前页面:
在线文档首页 >
NetBeans API Javadoc 4.1.0
ContextAwareDelegateAction (NetBeans VCS API) - NetBeans API Javadoc 4.1.0
org.netbeans.modules.vcscore.actions
Class ContextAwareDelegateAction
java.lang.Object
org.netbeans.modules.vcscore.actions.ContextAwareDelegateAction
- All Implemented Interfaces:
- Action, ActionListener, EventListener, LookupListener, Presenter, Presenter.Menu, Presenter.Popup
- public class ContextAwareDelegateAction
- extends Object
- implements Action, LookupListener, Presenter.Menu, Presenter.Popup
A delegate action that is usually associated with a specific lookup and
extract the nodes it operates on from it. Otherwise it delegates to the
regular NodeAction. Copied from org.openide.util.actions.NodeAction.DelegareAction.
ContextAwareDelegateAction
public ContextAwareDelegateAction(ContextAwareDelegateAction.Delegatable delegate,
Lookup actionContext)
- Creates a new instance of ContextAwareDelegateAction
toString
public String toString()
- Overrides superclass method, adds delegate description.
nodes
public final Node[] nodes()
- Nodes are taken from the lookup if any.
actionPerformed
public void actionPerformed(ActionEvent e)
- Invoked when an action occurs.
- Specified by:
actionPerformed
in interface ActionListener
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Specified by:
addPropertyChangeListener
in interface Action
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Specified by:
removePropertyChangeListener
in interface Action
putValue
public void putValue(String key,
Object o)
- Specified by:
putValue
in interface Action
getValue
public Object getValue(String key)
- Specified by:
getValue
in interface Action
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface Action
setEnabled
public void setEnabled(boolean b)
- Specified by:
setEnabled
in interface Action
resultChanged
public void resultChanged(LookupEvent ev)
- Specified by:
resultChanged
in interface LookupListener
getMenuPresenter
public JMenuItem getMenuPresenter()
- Specified by:
getMenuPresenter
in interface Presenter.Menu
getPopupPresenter
public JMenuItem getPopupPresenter()
- Specified by:
getPopupPresenter
in interface Presenter.Popup