com.borland.primetime.ide
Class BrowserStateAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--com.borland.primetime.actions.UpdateAction
|
+--com.borland.primetime.actions.StateAction
|
+--com.borland.primetime.ide.BrowserStateAction
- public abstract class BrowserStateAction
- extends StateAction
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport,
enabled |
Constructor Summary |
BrowserStateAction()
|
BrowserStateAction(java.lang.String shortText)
|
BrowserStateAction(java.lang.String shortText,
char mnemonic)
|
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText)
|
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon)
|
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon,
boolean grouped)
|
Method Summary |
abstract boolean |
getState(Browser browser)
|
boolean |
getState(java.lang.Object source)
Subclasses should implement this method by returning the appropriate
boolean based on the passed source context. |
abstract void |
setState(Browser browser,
boolean state)
|
void |
setState(java.lang.Object source,
boolean state)
Subclasses should implement this method by setting the appropriate boolean
state using the passed source context. |
void |
update(Browser browser)
|
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 |
BrowserStateAction
public BrowserStateAction()
BrowserStateAction
public BrowserStateAction(java.lang.String shortText)
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic)
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText)
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon)
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon,
boolean grouped)
update
public final void update(java.lang.Object source)
- Description copied from class: UpdateAction
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.
- Overrides:
- update in class UpdateAction
- Tags copied from class: UpdateAction
- Parameters:
source
- The source of the action that is about to be displayed as UI.
update
public void update(Browser browser)
setState
public final void setState(java.lang.Object source,
boolean state)
- Description copied from class: StateAction
- Subclasses should implement this method by setting the appropriate boolean
state using the passed source context.
- Overrides:
- setState in class StateAction
setState
public abstract void setState(Browser browser,
boolean state)
getState
public final boolean getState(java.lang.Object source)
- Description copied from class: StateAction
- Subclasses should implement this method by returning the appropriate
boolean based on the passed source context.
- Overrides:
- getState in class StateAction
getState
public abstract boolean getState(Browser browser)