Extension SDK 10.1.2

oracle.ide
Class LocalAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byoracle.ide.controls.ToggleAction
          extended byoracle.ide.IdeAction
              extended byoracle.ide.LocalAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.awt.event.ItemListener, java.io.Serializable

public class LocalAction
extends IdeAction

An LocalAction is used in Views that have commands accessible through local toolbars. The LocalActions are generally clones of a shared IdeAction registered for a specific command. The LocalActions respond only to the changes in context of the view that owns them.

An instance of LocalAction is typically linked to a global IdeAction, which is specified when calling the LocalAction constructor. Any Controllers that are added to or removed from the global IdeAction are reflected in the LocalAction. However the reverse does not occur -- Controllers added to or removed from a LocalAction are not reflected in the global IdeAction. When both the LocalAction and its global IdeAction have Controllers added to them, the LocalAction's Controllers get first crack and then the IdeAction's. After that the Controller of the View of the LocalAction is next, followed by the Controllers of enclosing Views, until the IdeMainWindow is reached.

LocalActions are not cached in the IdeAction cache.

See Also:
IdeAction, Serialized Form

Field Summary
 
Fields inherited from class oracle.ide.controls.ToggleAction
ACCELERATOR, ACTION, BUTTON_GROUP_NAME, CATEGORY, CONTEXT_INDEPENDENT_NAME, DISABLED_ICON, HIDDEN, MENU_WEIGHT, MENU_WEIGHT_UNASSIGNED, MNEMONIC, RADIO, STATE, TOGGLES, USER_DATA
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
LocalAction(IdeAction action, View view)
          Constructor.
LocalAction(java.lang.String name, javax.swing.Icon icon, View view)
          Constructor.
 
Method Summary
 void putValue(java.lang.String key, java.lang.Object value)
          This method associates the specified value with this LocalAction as well as the global IdeAction that this LocalAction is based on.
 
Methods inherited from class oracle.ide.IdeAction
actionPerformed, addController, addController, create, create, create, create, find, findGroup, get, get, get, get, get, get, getCommand, getCommandId, performAction, performAction, putValueDirectly, remove, removeController, removeController, setCommand, setCommandId, updateAction, updateAction
 
Methods inherited from class oracle.ide.controls.ToggleAction
getBooleanValue, getMenuWeight, getState, getValue, isRadio, isToggle, itemStateChanged, setBooleanValue, setMenuWeight, setState
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, isEnabled, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalAction

public LocalAction(java.lang.String name,
                   javax.swing.Icon icon,
                   View view)
Constructor. Use this constructor when the action is unique to the creator.

Parameters:
name - the label associated with this action.
icon - the icon associated with this action.
view - the view that owns this local action. The view cannot be null

LocalAction

public LocalAction(IdeAction action,
                   View view)
Constructor. Use this constructor when the action is relative to a particular View instance, but that is a common action that might be available to many View instances.

Parameters:
action - the IdeAction this LocalAction will clone.
view - the View that owns this action. The view cannot be null.
Method Detail

putValue

public void putValue(java.lang.String key,
                     java.lang.Object value)
This method associates the specified value with this LocalAction as well as the global IdeAction that this LocalAction is based on. To put a value only on the LocalAction and not the global IdeAction use IdeAction.putValueDirectly(java.lang.String, java.lang.Object).


Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.