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
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable, UpdateableAction
- public abstract class BrowserStateAction
- extends StateAction
This class is an implementation of a StateAction where the source object
input into each StateAction method is mapped into a specific Browser instance
in order to invoke an alternative implementation of that method.
- See Also:
- Serialized Form
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 |
BrowserStateAction()
Constructs a default BrowserStateAction. |
BrowserStateAction(java.lang.String shortText)
Constructs a BrowserStateAction with the specified shortText. |
BrowserStateAction(java.lang.String shortText,
char mnemonic)
Constructs a BrowserStateAction with the specified shortText, mnemonic. |
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText)
Constructs a BrowserStateAction with the specified shortText, mnemonic,
and longText. |
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon)
Constructs a BrowserStateAction with the specified shortText, mnemonic,
longText, and smallIcon. |
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon,
boolean grouped)
Constructs a BrowserStateAction with the specified shortText, mnemonic,
longText, smallIcon, largeIcon, and grouped. |
BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon,
javax.swing.Icon largeIcon)
Constructs a BrowserStateAction with the specified shortText, mnemonic,
longText, smallIcon, and largeIcon. |
Method Summary |
abstract boolean |
getState(Browser browser)
Subclasses should implement this method by returning the appropriate
boolean based on the passed source context. |
boolean |
getState(java.lang.Object source)
Subclasses do not implement this method but instead the alternative
version which takes a Browser as a source context. |
abstract void |
setState(Browser browser,
boolean state)
Subclasses should implement this method by setting the appropriate boolean
state using the passed source context. |
void |
setState(java.lang.Object source,
boolean state)
Subclasses do not implement this method but instead the alternative
version which takes a Browser as a source context. |
void |
update(Browser browser)
Override this method if you want to modify this Action (such as by
changing its name in a context-sensitive way) before it displays. |
void |
update(java.lang.Object source)
Subclasses do not implement this method but instead the alternative
version which takes a Browser as a source context. |
Methods inherited from class com.borland.primetime.actions.UpdateAction |
getAltShortText, getDisabledReason, getHelpTopic, getLargeIcon, getLongText, getMnemonic, getShortText, getSmallIcon, getVersion, setAltShortText, setConfigured, setDisabledReason, setHelpTopic, setLargeIcon, setLongText, setMnemonic, setShortText, setSmallIcon |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.Action |
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
BrowserStateAction
public BrowserStateAction()
- Constructs a default BrowserStateAction.
BrowserStateAction
public BrowserStateAction(java.lang.String shortText)
- Constructs a BrowserStateAction with the specified shortText.
- Parameters:
shortText
- The short text for the StateAction
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic)
- Constructs a BrowserStateAction with the specified shortText, mnemonic.
- Parameters:
shortText
- The short text for the StateActionmnemonic
- The mnemonic for the StateAction
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText)
- Constructs a BrowserStateAction with the specified shortText, mnemonic,
and longText.
- Parameters:
shortText
- The short text for the StateActionmnemonic
- The mnemonic for the StateActionlongText
- The long text for the StateAction
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon)
- Constructs a BrowserStateAction with the specified shortText, mnemonic,
longText, and smallIcon.
- Parameters:
shortText
- The short text for the StateActionmnemonic
- The mnemonic for the StateActionlongText
- The long text for the StateActionsmallIcon
- The small icon for the StateAction
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon,
javax.swing.Icon largeIcon)
- Constructs a BrowserStateAction with the specified shortText, mnemonic,
longText, smallIcon, and largeIcon.
- Parameters:
shortText
- The short text for the StateActionmnemonic
- The mnemonic for the StateActionlongText
- The long text for the StateActionsmallIcon
- The small icon for the StateActionlargeIcon
- The large icon for the StateAction
BrowserStateAction
public BrowserStateAction(java.lang.String shortText,
char mnemonic,
java.lang.String longText,
javax.swing.Icon smallIcon,
boolean grouped)
- Constructs a BrowserStateAction with the specified shortText, mnemonic,
longText, smallIcon, largeIcon, and grouped.
- Parameters:
shortText
- The short text for the StateActionmnemonic
- The mnemonic for the StateActionlongText
- The long text for the StateActionsmallIcon
- The small icon for the StateActionlargeIcon
- The large icon for the StateActiongrouped
- The grouped or not for the StateAction
update
public final void update(java.lang.Object source)
- Subclasses do not implement this method but instead the alternative
version which takes a Browser as a source context.
- Overrides:
update
in class UpdateAction
- Parameters:
source
- The source context for this action.
update
public void update(Browser browser)
- Override this method if you want to modify this Action (such as by
changing its name in a context-sensitive way) before it displays.
- Parameters:
browser
- The source context for this action.
setState
public final void setState(java.lang.Object source,
boolean state)
- Subclasses do not implement this method but instead the alternative
version which takes a Browser as a source context.
- Overrides:
setState
in class StateAction
- Parameters:
source
- The source context for this action.state
- The enabled/disabled state of this action.
setState
public abstract void setState(Browser browser,
boolean state)
- Subclasses should implement this method by setting the appropriate boolean
state using the passed source context.
- Parameters:
browser
- The source context for this action.state
- The enabled/disabled state of this action.
getState
public final boolean getState(java.lang.Object source)
- Subclasses do not implement this method but instead the alternative
version which takes a Browser as a source context.
- Overrides:
getState
in class StateAction
- Parameters:
source
- The source context for this action.- Returns:
- Returns true if action is enabled.
getState
public abstract boolean getState(Browser browser)
- Subclasses should implement this method by returning the appropriate
boolean based on the passed source context.
- Parameters:
browser
- The source context for this action.- Returns:
- Returns true if action is enabled.