|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectyu.ac.bg.etf.javaqx.qswing.AbstractAction
Abstract Action.
Field Summary | |
protected PropertyChangeSupport |
changeSupport
|
protected boolean |
enabled
|
protected boolean |
selected
|
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.Action |
ACCELERATOR_KEY, ACCELERATOR_KEY_NAME, ACTION_COMMAND_KEY, DEFAULT, HELP_DESCRIPTION, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON, SMALL_ICON_NAME |
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.AbstractActionProperties |
PROPERTY_ENABLED, PROPERTY_SELECTED |
Constructor Summary | |
AbstractAction()
Constructs new AbstractAction object. |
|
AbstractAction(java.lang.String name)
Constructs new AbstractAction object. |
|
AbstractAction(java.lang.String name,
Icon icon)
Constructs new AbstractAction object. |
|
AbstractAction(java.lang.String name,
Icon icon,
int mnemonic,
java.lang.String shortDescription)
Constructs new AbstractAction object. |
|
AbstractAction(java.lang.String name,
Icon icon,
int mnemonic,
java.lang.String shortDescription,
KeyStroke accelerator)
Constructs new AbstractAction object. |
|
AbstractAction(java.lang.String name,
java.lang.String shortDescription)
Constructs new AbstractAction object. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds property chage listener. |
java.lang.Object |
clone()
|
protected void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
Fires a bound property change. |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a bound property change. |
KeyStroke |
getAcceleratorKey()
Returns the value of the accelerator key property. |
java.lang.String |
getAcceleratorKeyName()
Returns the value of the accelerator key name property. |
static java.lang.String |
getAcceleratorKeyName(Action action)
Returns the value of the accelerator key name property for the specified action. |
java.lang.String |
getActionCommandKey()
Returns the value of the action command key property. |
java.lang.String |
getHelpDescription()
Returns the value of the help description property. |
static java.lang.String |
getHelpDescription(Action action)
Returns the value of the help description property for the specified action. |
java.util.Iterator |
getKeyIterator()
Returns iterator over the keys. |
java.lang.Object[] |
getKeys()
Returns the string array containing property names. |
java.lang.String |
getLongDescription()
Returns the value of the long description property. |
static java.lang.String |
getLongDescription(Action action)
Returns the value of the long description property for the specified action. |
int |
getMnemonicKey()
Returns the value of the mnemonic key property. |
java.lang.String |
getName()
Returns the value of the name property. |
static java.lang.String |
getName(Action action)
Returns the value of the name property for the specified action. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns property change listeners. |
java.lang.String |
getShortDescription()
Returns the value of the short description property. |
static java.lang.String |
getShortDescription(Action action)
Returns the value of the short description property for the specified action. |
Icon |
getSmallIcon()
Returns the value of the small icon property. |
java.lang.String |
getSmallIconName()
Returns the value of the small icon name property. |
static java.lang.String |
getSmallIconName(Action action)
Returns the value of the small icon name property for the specified action. |
static java.lang.String |
getStringValue(Action action,
java.lang.String key)
Returns the string value of the key property for the specified action. |
java.lang.String |
getStringValue(java.lang.String key)
Returns the string value of the property specified by the key. |
java.lang.Object |
getValue(java.lang.String key)
Returns the value of the property specified by the key. |
boolean |
isEnabled()
Returns enabled state of the action. |
boolean |
isSelected()
Returns selected state of the action. |
void |
putValue(java.lang.String key,
java.lang.Object value)
Sets the value of the property specified by the key. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes property chage listener. |
void |
setAcceleratorKey(KeyStroke accelerator)
Sets the value of the accelerator key property. |
void |
setAcceleratorKey(java.lang.String acceleratorName)
Sets the value of the accelerator key property. |
void |
setActionCommandKey(java.lang.String actionCommandKey)
Sets the value of the action command key property. |
void |
setEnabled(boolean enabled)
Sets enabled state of the action. |
void |
setHelpDescription(java.lang.String helpDescription)
Sets the value of the help description property. |
void |
setLongDescription(java.lang.String longDescription)
Sets the value of the long description property. |
void |
setMnemonicKey(int mnemonic)
Sets the value of the mnemonic key property. |
void |
setName(java.lang.String name)
Sets the value of the name property. |
void |
setProperties(java.lang.String name,
Icon icon)
Sets group of the action's properties. |
void |
setProperties(java.lang.String name,
Icon icon,
int mnemonic,
java.lang.String shortDescription,
KeyStroke accelerator)
Sets group of the action's properties. |
void |
setProperties(java.lang.String name,
Icon icon,
int mnemonic,
java.lang.String shortDescription,
java.lang.String longDescription,
KeyStroke accelerator)
Sets group of the action's properties. |
void |
setProperties(java.lang.String name,
java.lang.String shortDescription)
Sets group of the action's properties. |
void |
setSelected(boolean selected)
Sets selected state of the action. |
void |
setShortDescription(java.lang.String shortDescription)
Sets the value of the short description property. |
void |
setSmallIcon(Icon icon)
Sets the value of the small icon property. |
void |
setSmallIconName(java.lang.String iconName)
Sets the value of the small icon name property. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface yu.ac.bg.etf.javaqx.qswing.events.ActionListener |
actionPerformed |
Field Detail |
protected boolean enabled
protected boolean selected
protected PropertyChangeSupport changeSupport
Constructor Detail |
public AbstractAction()
public AbstractAction(java.lang.String name)
name
- the action namepublic AbstractAction(java.lang.String name, java.lang.String shortDescription)
name
- the action nameshortDescription
- the short descriptionpublic AbstractAction(java.lang.String name, Icon icon)
name
- the action nameicon
- the iconpublic AbstractAction(java.lang.String name, Icon icon, int mnemonic, java.lang.String shortDescription)
name
- the action nameicon
- the iconmnemonic
- the mnemonicshortDescription
- the short descriptionpublic AbstractAction(java.lang.String name, Icon icon, int mnemonic, java.lang.String shortDescription, KeyStroke accelerator)
name
- the action nameicon
- the iconmnemonic
- the mnemonicshortDescription
- the short descriptionaccelerator
- the acceleratorMethod Detail |
public static java.lang.String getStringValue(Action action, java.lang.String key)
action
- the actionkey
- the name of the property
java.lang.NullPointerException
- if the action is nullpublic static java.lang.String getName(Action action)
action
- the action
java.lang.NullPointerException
- if the action is nullpublic static java.lang.String getShortDescription(Action action)
action
- the action
java.lang.NullPointerException
- if the action is nullpublic static java.lang.String getLongDescription(Action action)
action
- the action
java.lang.NullPointerException
- if the action is nullpublic static java.lang.String getHelpDescription(Action action)
action
- the action
java.lang.NullPointerException
- if the action is nullpublic static java.lang.String getSmallIconName(Action action)
action
- the action
java.lang.NullPointerException
- if the action is nullpublic static java.lang.String getAcceleratorKeyName(Action action)
action
- the action
java.lang.NullPointerException
- if the action is nullpublic java.lang.String getStringValue(java.lang.String key)
key
- the name of the property
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the new value of the name propertypublic Icon getSmallIcon()
public void setSmallIcon(Icon icon)
icon
- the new value of the small icon propertypublic java.lang.String getSmallIconName()
public void setSmallIconName(java.lang.String iconName)
iconName
- the new value of the small icon name propertypublic int getMnemonicKey()
public void setMnemonicKey(int mnemonic)
mnemonic
- the new value of the mnemonic key propertypublic java.lang.String getShortDescription()
public void setShortDescription(java.lang.String shortDescription)
shortDescription
- the new value of the short description propertypublic java.lang.String getLongDescription()
public void setLongDescription(java.lang.String longDescription)
longDescription
- the new value of the long description propertypublic java.lang.String getHelpDescription()
public void setHelpDescription(java.lang.String helpDescription)
helpDescription
- the new value of the help description propertypublic KeyStroke getAcceleratorKey()
public void setAcceleratorKey(KeyStroke accelerator)
accelerator
- the new value of the accelerator key propertypublic java.lang.String getAcceleratorKeyName()
public void setAcceleratorKey(java.lang.String acceleratorName)
acceleratorName
- the new value of the accelerator key name propertypublic java.lang.String getActionCommandKey()
public void setActionCommandKey(java.lang.String actionCommandKey)
actionCommandKey
- the new value of the action command key propertypublic void setProperties(java.lang.String name, Icon icon, int mnemonic, java.lang.String shortDescription, java.lang.String longDescription, KeyStroke accelerator)
name
- the value of the name propertyicon
- the value of the small icon propertymnemonic
- the value of the mnemonic key propertyshortDescription
- the value of the short description propertylongDescription
- the value of the long description propertyaccelerator
- the value of the accelerator key propertypublic void setProperties(java.lang.String name, Icon icon, int mnemonic, java.lang.String shortDescription, KeyStroke accelerator)
name
- the value of the name propertyicon
- the value of the small icon propertymnemonic
- the value of the mnemonic key propertyshortDescription
- the value of the short description propertyaccelerator
- the value of the accelerator key propertypublic void setProperties(java.lang.String name, java.lang.String shortDescription)
name
- the value of the name propertyshortDescription
- the value of the short description propertypublic void setProperties(java.lang.String name, Icon icon)
name
- the value of the name propertyicon
- the value of the small icon propertypublic java.lang.Object[] getKeys()
public java.util.Iterator getKeyIterator()
public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- the property nameoldValue
- the old value of the propertynewValue
- the new value of the propertyprotected void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
propertyName
- the property nameoldValue
- the old value of the property (as a boolean)newValue
- the new value of the property (as a boolean)public java.lang.Object getValue(java.lang.String key)
getValue
in interface Action
key
- the property key
public void putValue(java.lang.String key, java.lang.Object value)
putValue
in interface Action
key
- the property keyvalue
- the new property valuepublic boolean isEnabled()
isEnabled
in interface Action
public void setEnabled(boolean enabled)
setEnabled
in interface Action
enabled
- the new enabled statepublic boolean isSelected()
isSelected
in interface Action
public void setSelected(boolean selected)
setSelected
in interface Action
selected
- the new selected statepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface Action
listener
- the property chage listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface Action
listener
- the property chage listenerpublic java.lang.Object clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |