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

ContextAwareAction (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.util
Interface ContextAwareAction

All Superinterfaces:
Action, ActionListener, EventListener
All Known Implementing Classes:
CallbackSystemAction, NodeAction, ToolsAction

public interface ContextAwareAction
extends Action

Interface which is supposed to be implemented by action which behaviour is context dependent. It means the created action (by method createContextAwareInstance(org.openide.util.Lookup) is valid to the provided context, i.e. enablement status and action performation is related to the context (provided by the Lookup). The context is typically TopComponentS context.

Since:
3.29
See Also:
TopComponent.getLookup(), Utilities.actionsToPopup(javax.swing.Action[], org.openide.util.Lookup)

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Method Summary
 Action createContextAwareInstance(Lookup actionContext)
          Creates action instance for provided context.
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Method Detail

createContextAwareInstance

public Action createContextAwareInstance(Lookup actionContext)
Creates action instance for provided context.



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