Package ch.tocco.nice2.netui.api.actions
Interface ActionGroupModel
- All Superinterfaces:
ActionModel
,Iterable<ActionModel>
- All Known Implementing Classes:
ActionGroupModelImpl
Deprecated.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.static final int
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns a List of the containing actions.void
addAction
(ActionModel action) Deprecated.Adds the specified action unmodified to this action array.Deprecated.deepCopy()
Deprecated.Creates a deep copy of this group.findActionModel
(String propertyName, String propertyValue) Deprecated.findActionModels
(String propertyName, String propertyValue) Deprecated.Deprecated.void
Deprecated.If this group has no default action set, it finds the first enabled action in this group and sets it as the default action.int
Deprecated.boolean
isEmpty()
Deprecated.Returns whether this group has any actions.boolean
Deprecated.void
mergeGroup
(ActionGroupModel group) Deprecated.Merges the actions from the specified group into this group.void
preserveOrder
(boolean overwrite) Deprecated.Adds position objects to the child actions that reflect their current order.boolean
removeAction
(ActionModel action) Deprecated.Removes the specified action from this group.void
removeActions
(Predicate<ActionModel> predicate) Deprecated.Removes all actions which match the given predicate.void
Deprecated.Recursively removes all empty action groups from this group.void
replaceAction
(ActionModel modelToReplace, ActionModel newActionModel) Deprecated.void
setDefaultAction
(int actionIndex) Deprecated.void
setMutualExclusive
(boolean flag) Deprecated.void
sort()
Deprecated.Recursively sorts this groups children with respect to itsActionModel.getPosition()
property.Methods inherited from interface ch.tocco.nice2.netui.api.actions.ActionModel
getIcon, getId, getName, getPosition, getProperty, getRelativePosition, getRelativePositionProperty, getShortDescription, isEnabled, isToggle, setEnabled, setIcon, setName, setPosition, setProperty, setRelativePosition, setShortDescription, setToggle
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Field Details
-
NO_DEFAULT_ACTION
static final int NO_DEFAULT_ACTIONDeprecated.- See Also:
-
UNSPECIFIED_DEFAULT_ACTION
static final int UNSPECIFIED_DEFAULT_ACTIONDeprecated.- See Also:
-
-
Method Details
-
setDefaultAction
void setDefaultAction(int actionIndex) Deprecated. -
getDefaultAction
int getDefaultAction()Deprecated. -
setMutualExclusive
void setMutualExclusive(boolean flag) Deprecated. -
isMutualExclusive
boolean isMutualExclusive()Deprecated. -
findById
Deprecated. -
addAction
Deprecated.Adds the specified action unmodified to this action array. -
removeAction
Deprecated.Removes the specified action from this group.
Only remove from root action array. This method does not iterate recursively through all actions.
- Parameters:
action
- action in this action array to remove
-
removeActions
Deprecated.Removes all actions which match the given predicate. Not only root actions are removed; this method iterates recursively through all actions.- Parameters:
predicate
- the predicate to apply.
-
deepCopy
ActionGroupModel deepCopy()Deprecated.Creates a deep copy of this group.- Specified by:
deepCopy
in interfaceActionModel
- Returns:
- a new this
-
isEmpty
boolean isEmpty()Deprecated.Returns whether this group has any actions.- Returns:
- true if there is at least one action in this group, false if there are none
-
actionList
List<ActionModel> actionList()Deprecated.Returns a List of the containing actions.
In opposition to
Iterable.iterator()
this method keeps the structure of the actions and action groups and doesn't put it all in the same level.- Returns:
- a List of the containing actions
-
sort
void sort()Deprecated.Recursively sorts this groups children with respect to itsActionModel.getPosition()
property. -
mergeGroup
Deprecated.Merges the actions from the specified group into this group.
The properties of the given group itself are discarded. Only their containing actions are added to the actions of this group. If the given action contains a group that is already defined in here, their actions will be added to the existing group, such that no doublet groups arise.
-
removeEmptyGroups
void removeEmptyGroups()Deprecated.Recursively removes all empty action groups from this group. -
findDefaultAction
void findDefaultAction()Deprecated.If this group has no default action set, it finds the first enabled action in this group and sets it as the default action. Does this recursively for any other action group encountered. -
preserveOrder
void preserveOrder(boolean overwrite) Deprecated.Adds position objects to the child actions that reflect their current order. This method does not step into any child group.- Parameters:
overwrite
- if true overwrite existing position entries
-
replaceAction
Deprecated. -
findActionModel
Deprecated. -
collectActionModels
List<ActionModel> collectActionModels()Deprecated.- Returns:
- all action models contained in this model
-
findActionModels
Deprecated.- Parameters:
propertyName
- name of a propertypropertyValue
- value for property- Returns:
- all action models contained in this model with the specified property
-