@OpenApiAll public class PropertyAction extends MDAction implements java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MANAGER_CHANGED |
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
Constructor and Description |
---|
PropertyAction(PropertyManager manager,
java.lang.String propertyID)
The constructor for action with given property.
|
PropertyAction(java.lang.String actionID,
PropertyManager manager,
java.lang.String propertyID)
The constructor for action with given property.
|
PropertyAction(java.lang.String actionID,
PropertyManager manager,
java.lang.String propertyID,
boolean useShortcutSchema)
The constructor for action with given property.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ActionsVisitor visitor)
Accepts visitor.
|
void |
addChangeListener(java.beans.PropertyChangeListener listener)
Add the listener which will be notified about the
change of underlying property manager of this action
|
void |
addChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Add the listener which will be notified about the
change of underlying property manager of this action
|
protected void |
changePropertyValue(java.lang.Object newValue)
Change value of a property
|
protected void |
fireManagerChanged(PropertyManager oldManager,
PropertyManager newManager)
Fires the notification about the property manager change
|
PropertyManager |
getManager()
Get the manager.
|
java.lang.Object |
getNewValue()
Gets the new property value.
|
Property |
getProperty()
Returns the property.
|
java.lang.String |
getPropertyID()
Get the property id.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
void |
removeChangeListener(java.beans.PropertyChangeListener listener)
Remove the listener from this action
|
void |
removeChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Remove the listener from this action
|
void |
setManager(PropertyManager manager)
Set the manager.
|
void |
setNewValue(java.lang.Object newValue)
Sets the new property value.
|
protected void |
setPropertyId(java.lang.String id)
Sets property id
|
actionPerformed, isUseShortcutSchema, updateState
addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, forEach, forEachIncludingSelf, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removeIf, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
public static final java.lang.String MANAGER_CHANGED
public PropertyAction(PropertyManager manager, java.lang.String propertyID)
manager
- property managerpropertyID
- id of the propertypublic PropertyAction(java.lang.String actionID, PropertyManager manager, java.lang.String propertyID)
actionID
- id of the actionmanager
- property managerpropertyID
- id of the propertypublic PropertyAction(java.lang.String actionID, PropertyManager manager, java.lang.String propertyID, boolean useShortcutSchema)
actionID
- id of the actionmanager
- property managerpropertyID
- id of the propertyuseShortcutSchema
- use shortcuts schema for this actionpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void setNewValue(java.lang.Object newValue)
newValue
- the new property value.public java.lang.Object getNewValue()
public Property getProperty()
protected void changePropertyValue(java.lang.Object newValue)
newValue
- new valuepublic void accept(ActionsVisitor visitor)
public PropertyManager getManager()
public void setManager(PropertyManager manager)
manager
- the new manager.protected void fireManagerChanged(PropertyManager oldManager, PropertyManager newManager)
oldManager
- old managernewManager
- new managerpublic java.lang.String getPropertyID()
protected void setPropertyId(java.lang.String id)
id
- property idpublic void addChangeListener(java.beans.PropertyChangeListener listener)
listener
- for property change notificationspublic void addChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the listener will be notified only about this property changeslistener
- for property change notificationsMANAGER_CHANGED
public void removeChangeListener(java.beans.PropertyChangeListener listener)
listener
- to be removedpublic void removeChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the propertylistener
- to be removed