Class ActionGroupEnabler
- java.lang.Object
-
- net.sf.jguiraffe.gui.builder.enablers.ActionGroupEnabler
-
- All Implemented Interfaces:
ElementEnabler
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 currentActionStore
object from theBeanContext
managed by the passed inComponentBuilderData
object. This object is then used to change the enabled state of the action group in question accordingly.- Version:
- $Id: ActionGroupEnabler.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description ActionGroupEnabler(String groupName)
Creates a new instance ofActionGroupEnabler
and initializes it with the name of the action group it is responsible for.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
ActionGroupEnabler
public ActionGroupEnabler(String groupName)
Creates a new instance ofActionGroupEnabler
and initializes it with the name of the action group it is responsible for.- Parameters:
groupName
- the name of the action group (must not be null- Throws:
IllegalArgumentException
- if the group name is null
-
-
Method Detail
-
getActionGroupName
public String getActionGroupName()
Returns the name of the action group that is manipulated by this enabler.- Returns:
- the name of the affected action group
-
setEnabledState
public void setEnabledState(ComponentBuilderData compData, boolean state) throws FormBuilderException
Performs the change of the enabled state. Obtains theActionStore
from theBeanContext
maintained by specifiedComponentBuilderData
object and uses it to enable or disable the action group this enabler is responsible for.- Specified by:
setEnabledState
in interfaceElementEnabler
- Parameters:
compData
- theComponentBuilderData
instancestate
- the new enabled state- Throws:
FormBuilderException
- if an error occurs
-
-