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

ActionsProviderSupport (NetBeans Debugger Core API) - NetBeans API Javadoc 5.5.0

org.netbeans.api.debugger/1 1.7.22

org.netbeans.spi.debugger
Class ActionsProviderSupport

java.lang.Object
  extended by org.netbeans.spi.debugger.ActionsProvider
      extended by org.netbeans.spi.debugger.ActionsProviderSupport

public abstract class ActionsProviderSupport
extends ActionsProvider

Support for ActionsProvider implementation. You should implement doAction(java.lang.Object) and ActionsProvider.getActions() only, and call setEnabled(java.lang.Object, boolean) when the action state is changed.


Constructor Summary
ActionsProviderSupport()
           
 
Method Summary
 void addActionsProviderListener(ActionsProviderListener l)
          Adds property change listener.
abstract  void doAction(Object action)
          Called when the action is called (action button is pressed).
protected  void fireActionStateChanged(Object action, boolean enabled)
          Fires a change of action state.
 boolean isEnabled(Object action)
          Returns a state of given action defined by setEnabled(java.lang.Object, boolean) method call.
 void removeActionsProviderListener(ActionsProviderListener l)
          Removes property change listener.
protected  void setEnabled(Object action, boolean enabled)
          Sets state of enabled property.
 
Methods inherited from class org.netbeans.spi.debugger.ActionsProvider
getActions, postAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionsProviderSupport

public ActionsProviderSupport()
Method Detail

doAction

public abstract void doAction(Object action)
Called when the action is called (action button is pressed).

Specified by:
doAction in class ActionsProvider
Parameters:
action - an action which has been called

isEnabled

public boolean isEnabled(Object action)
Returns a state of given action defined by setEnabled(java.lang.Object, boolean) method call. Do not override. Should be final - the enabled state is cached, therefore this method is not consulted unless the state change is fired.

Specified by:
isEnabled in class ActionsProvider
Parameters:
action - action

setEnabled

protected final void setEnabled(Object action,
                                boolean enabled)
Sets state of enabled property.

Parameters:
action - action whose state should be changed
enabled - the new state

fireActionStateChanged

protected void fireActionStateChanged(Object action,
                                      boolean enabled)
Fires a change of action state.

Parameters:
action - action whose state has been changed
enabled - the new state

addActionsProviderListener

public final void addActionsProviderListener(ActionsProviderListener l)
Adds property change listener.

Specified by:
addActionsProviderListener in class ActionsProvider
Parameters:
l - new listener.

removeActionsProviderListener

public final void removeActionsProviderListener(ActionsProviderListener l)
Removes property change listener.

Specified by:
removeActionsProviderListener in class ActionsProvider
Parameters:
l - removed listener.

org.netbeans.api.debugger/1 1.7.22

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