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
ElementEnablerinterface 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 currentActionStoreobject from theBeanContextmanaged by the passed inComponentBuilderDataobject. 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 ofActionGroupEnablerand 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 StringgetActionGroupName()Returns the name of the action group that is manipulated by this enabler.voidsetEnabledState(ComponentBuilderData compData, boolean state)Performs the change of the enabled state.
-
-
-
Constructor Detail
-
ActionGroupEnabler
public ActionGroupEnabler(String groupName)
Creates a new instance ofActionGroupEnablerand 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 theActionStorefrom theBeanContextmaintained by specifiedComponentBuilderDataobject and uses it to enable or disable the action group this enabler is responsible for.- Specified by:
setEnabledStatein interfaceElementEnabler- Parameters:
compData- theComponentBuilderDatainstancestate- the new enabled state- Throws:
FormBuilderException- if an error occurs
-
-