|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.model.AbstractModel
com.guiseframework.model.DefaultLabelModel
com.guiseframework.model.DefaultInfoModel
com.guiseframework.prototype.AbstractPrototype
com.guiseframework.prototype.AbstractEnableablePrototype
com.guiseframework.prototype.AbstractActionPrototype
public abstract class AbstractActionPrototype
Abstract prototype information for an action control.
If a subclass wants to perform some action, it should override action(int, int).
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.model.Enableable |
|---|
ENABLED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.InfoModel |
|---|
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
AbstractActionPrototype()
Default constructor. |
|
AbstractActionPrototype(java.lang.String label)
Label constructor. |
|
AbstractActionPrototype(java.lang.String label,
java.net.URI icon)
Label and icon constructor. |
|
| Method Summary | |
|---|---|
protected abstract void |
action(int force,
int option)
Performs whatever is necessary. |
void |
addActionListener(ActionListener actionListener)
Adds an action listener. |
protected void |
fireActionPerformed(ActionEvent actionEvent)
Fires a given action event to all registered action listeners. |
protected void |
fireActionPerformed(int force,
int option)
Fires an action event to all registered action listeners. |
java.lang.Iterable<ActionListener> |
getActionListeners()
|
void |
performAction()
Performs the action with default force and default option. |
void |
performAction(int force,
int option)
Performs the action with the given force and option. |
void |
removeActionListener(ActionListener actionListener)
Removes an action listener. |
| Methods inherited from class com.guiseframework.prototype.AbstractEnableablePrototype |
|---|
isEnabled, setEnabled |
| Methods inherited from class com.guiseframework.model.DefaultInfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from class com.guiseframework.model.DefaultLabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType, toString |
| Methods inherited from class com.guiseframework.model.AbstractModel |
|---|
getEventListenerManager, getPlainText |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.guiseframework.model.Enableable |
|---|
isEnabled, setEnabled |
| Methods inherited from interface com.guiseframework.model.InfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from interface com.guiseframework.model.LabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Constructor Detail |
|---|
public AbstractActionPrototype()
public AbstractActionPrototype(java.lang.String label)
label - The text of the label, or null if there should be no label.
public AbstractActionPrototype(java.lang.String label,
java.net.URI icon)
label - The text of the label, or null if there should be no label.icon - The icon URI, which may be a resource URI, or null if there is no icon URI.| Method Detail |
|---|
public void addActionListener(ActionListener actionListener)
addActionListener in interface ActionListenableactionListener - The action listener to add.public void removeActionListener(ActionListener actionListener)
removeActionListener in interface ActionListenableactionListener - The action listener to remove.public java.lang.Iterable<ActionListener> getActionListeners()
getActionListeners in interface ActionModelpublic void performAction()
ActionEvent is fired to all registered ActionListeners.
This method delegates to performAction(int, int).
performAction in interface ActionModel
public void performAction(int force,
int option)
action(int, int) to perform the actual action.
An ActionEvent is fired to all registered ActionListeners.
performAction in interface ActionModelforce - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiaged by a mouse right button click.
protected abstract void action(int force,
int option)
force - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiaged by a mouse right button click.
protected void fireActionPerformed(int force,
int option)
fireActionPerformed(ActionEvent).
force - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiaged by a mouse right button click.ActionListener,
ActionEventprotected void fireActionPerformed(ActionEvent actionEvent)
actionEvent - The action event to fire.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||