public class ActionGroupEnabler extends Object implements ElementEnabler
A specialized implementation of the ElementEnabler
interface that can
change the enabled state of action groups.
An instance of this class is initialized with the name of the action group it
should manipulate. The implementation of the setEnabledState()
method
obtains the current ActionStore
object from the BeanContext
managed by the passed in ComponentBuilderData
object. This object is
then used to change the enabled state of the action group in question
accordingly.
Constructor and Description |
---|
ActionGroupEnabler(String groupName)
Creates a new instance of
ActionGroupEnabler and initializes it
with the name of the action group it is responsible for. |
Modifier and Type | Method and Description |
---|---|
String |
getActionGroupName()
Returns the name of the action group that is manipulated by this enabler.
|
void |
setEnabledState(ComponentBuilderData compData,
boolean state)
Performs the change of the enabled state.
|
public ActionGroupEnabler(String groupName)
ActionGroupEnabler
and initializes it
with the name of the action group it is responsible for.groupName
- the name of the action group (must not be nullIllegalArgumentException
- if the group name is nullpublic String getActionGroupName()
public void setEnabledState(ComponentBuilderData compData, boolean state) throws FormBuilderException
ActionStore
from the BeanContext
maintained by specified
ComponentBuilderData
object and uses it to enable or disable the
action group this enabler is responsible for.setEnabledState
in interface ElementEnabler
compData
- the ComponentBuilderData
instancestate
- the new enabled stateFormBuilderException
- if an error occursCopyright © 2016 The JGUIraffe Team. All rights reserved.