|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractAction | +--com.borland.primetime.actions.UpdateAction | +--com.borland.primetime.ide.KeymapManager.SubKeymapAction
The purpose of this class is to wrap an Action object that happens to be bound in a sub keymap. After actionPerformed is called on the wrapped action, the keymap is restored to its original state.
Field Summary | |
protected javax.swing.Action |
action
|
protected javax.swing.text.Keymap |
masterKeymap
|
Fields inherited from class com.borland.primetime.actions.UpdateAction |
ACCELERATOR,
EMPTY_ARRAY,
HELP_TOPIC,
LARGE_ICON,
MNEMONIC |
Fields inherited from class javax.swing.AbstractAction |
changeSupport,
enabled |
Constructor Summary | |
KeymapManager.SubKeymapAction(javax.swing.Action action,
javax.swing.text.Keymap masterMap)
Create a new SubKeymapAction. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
update(java.lang.Object source)
The update method is called when the UpdateAction is about to be displayed in UI. |
Methods inherited from class com.borland.primetime.actions.UpdateAction |
getHelpTopic,
getLargeIcon,
getLongText,
getMnemonic,
getShortText,
getSmallIcon,
setHelpTopic,
setLargeIcon,
setLongText,
setMnemonic,
setShortText,
setSmallIcon |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener,
clone,
firePropertyChange,
getValue,
isEnabled,
putValue,
removePropertyChangeListener,
setEnabled |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected javax.swing.Action action
protected javax.swing.text.Keymap masterKeymap
Constructor Detail |
public KeymapManager.SubKeymapAction(javax.swing.Action action, javax.swing.text.Keymap masterMap)
action
- The Action object to wrap.masterMap
- The Keymap to restore after actionPerfomed is called
on the wrapped action.Method Detail |
public void update(java.lang.Object source)
The update method is called when the UpdateAction is about to be displayed in UI. At this point, the UpdateAction may optionally update it's enabled state, shortText, longText, icon, etc so that it may be represented in appropriate state for the passed source.
Subclasses can override this method to dynamically change their state
based on the current Node in the Browser, the current selected Node in the
ProjectView, or whatever they like. Typically, the static method:
public static Browser findBrowser(Object source)
is called
to acquire a Browser instance during the update process. If your action
*always* requires a browser, use the BrowserAction subclass in the ide
package.
NOTE: This method is called EVERY TIME a menu is about to display, or EVERY few milliseconds for toolbar buttons displaying this action. The code in the update method should be VERY SLIM and VERY FAST.
ANOTHER NOTE: This method is called EVERY few milliseconds if it is ever bound to a keystroke in the KeymapManager. When called from the KeymapManager, the passed source will *always* be the active Browser.
source
- The source of the action that is about to be displayed as UI.public void actionPerformed(java.awt.event.ActionEvent e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |