|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
com.quadrique.jbuildingblocks.gui.ActionBase
public abstract class ActionBase
This is the base class for all the GUI actions.
AbstractAction,
Action,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
ActionBase(String zActionName,
String zTooltipText,
String zIconName)
constructor |
|
ActionBase(String zActionName,
String zTooltipText,
String zIconName,
int zMnemonic)
constructor |
|
| Method Summary | |
|---|---|
KeyStroke |
getAccelerator()
|
Icon |
getIcon()
|
int |
getMnemonic()
|
String |
getName()
|
String |
getTooltipText()
|
void |
setAccelerator(KeyStroke zKeyStroke)
to set the accelerator associated to the action. |
void |
setIcon(Icon zIcon)
to set the icon associated to the action |
void |
setMnemonic(int zMnemonic)
to set the mnemonic associated to the action. |
String |
toString()
|
void |
updateAction()
this method is provided so that you update the action when all the components of the applications have been created (e.g. |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.event.ActionListener |
|---|
actionPerformed |
| Constructor Detail |
|---|
public ActionBase(String zActionName,
String zTooltipText,
String zIconName)
throws Exception
zActionName - the name of the actionzTooltipText - the tooltip text to use for this actionzIconName - the name of the icon image file. The file will be loaded with the Resources class
Exception - if an error occursResources
public ActionBase(String zActionName,
String zTooltipText,
String zIconName,
int zMnemonic)
throws Exception
zActionName - the name of the actionzTooltipText - the tooltip text to use for this actionzIconName - the name of the icon image file. The file will be loaded with the Resources classzMnemonic - the KeyEvent to use as a mnemonic for the action. For instance, "Exception - if an error occursResources| Method Detail |
|---|
public void setMnemonic(int zMnemonic)
zMnemonic - the KeyEvent to use as a mnemonic for the action. For instance, "KeyEventpublic int getMnemonic()
public void setAccelerator(KeyStroke zKeyStroke)
zKeyStroke - the KeyStroke to use as an accelerator for the action. For instance, "KeyStrokepublic KeyStroke getAccelerator()
KeyStrokepublic Icon getIcon()
public void setIcon(Icon zIcon)
zIcon - the icon to usepublic String getName()
public String toString()
toString in class Objectpublic String getTooltipText()
public void updateAction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||