Class ActionModelImpl
java.lang.Object
ch.tocco.nice2.netui.impl.actions.ActionModelImpl
- All Implemented Interfaces:
ActionModel
,Serializable
- Direct Known Subclasses:
ActionGroupModelImpl
,SeparatorModelImpl
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()
boolean
getIcon()
getId()
A *non-unique* id of the action.getName()
Used for the text-resource key for the label.@Nullable Integer
getProperty
(String key) @Nullable String
int
hashCode()
boolean
boolean
isGroup()
boolean
isToggle()
void
setEnabled
(boolean enabled) void
void
void
setPosition
(@Nullable Integer pos) void
setProperties
(Map<String, Object> properties) void
setProperty
(String key, Object value) void
setRelativePosition
(@Nullable String relativePosition, String propertyName) Set the relative position of this action model, it will be placed before or after another action model with the given property-value for this property.void
setShortDescription
(@Nullable String descr) void
setToggle
(boolean toggle) toString()
-
Constructor Details
-
ActionModelImpl
-
ActionModelImpl
Copy constructor.
-
-
Method Details
-
getName
Description copied from interface:ActionModel
Used for the text-resource key for the label.- Specified by:
getName
in interfaceActionModel
- Returns:
- The label key.
-
setName
- Specified by:
setName
in interfaceActionModel
-
getShortDescription
- Specified by:
getShortDescription
in interfaceActionModel
-
setShortDescription
- Specified by:
setShortDescription
in interfaceActionModel
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceActionModel
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfaceActionModel
-
isToggle
public boolean isToggle()- Specified by:
isToggle
in interfaceActionModel
-
setToggle
public void setToggle(boolean toggle) - Specified by:
setToggle
in interfaceActionModel
-
getIcon
- Specified by:
getIcon
in interfaceActionModel
-
setIcon
- Specified by:
setIcon
in interfaceActionModel
-
isGroup
public boolean isGroup() -
getId
Description copied from interface:ActionModel
A *non-unique* id of the action. This id is used to map the serverside action representation (button) to the clientside action (perform method).For example the export actions (about 5 buttons) share the same action id, and have different
properties
. They are all handled by the same clientside action (perform).In xml this attribute is called 'path' for historical reasons.
The id is also used for the netuiactions security.
The id may also used for the jabsorb action in the BackportAction.js (legacy code).
- Specified by:
getId
in interfaceActionModel
-
setPosition
- Specified by:
setPosition
in interfaceActionModel
-
getPosition
- Specified by:
getPosition
in interfaceActionModel
-
setRelativePosition
Description copied from interface:ActionModel
Set the relative position of this action model, it will be placed before or after another action model with the given property-value for this property.- Specified by:
setRelativePosition
in interfaceActionModel
- Parameters:
relativePosition
- a string in the form "[BEFORE|AFTER]:[property-value]"propertyName
- the property name, can be any of the java beans property of the action model or one of the properties in the property map
-
getRelativePosition
- Specified by:
getRelativePosition
in interfaceActionModel
-
getRelativePositionProperty
- Specified by:
getRelativePositionProperty
in interfaceActionModel
-
deepCopy
- Specified by:
deepCopy
in interfaceActionModel
-
setProperty
- Specified by:
setProperty
in interfaceActionModel
-
getProperty
- Specified by:
getProperty
in interfaceActionModel
-
getProperties
-
setProperties
-
equals
-
hashCode
public int hashCode() -
toString
-