|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.value.support.AbstractPropertyChangePublisher
org.springframework.richclient.command.AbstractCommand
org.springframework.richclient.command.ActionCommand
org.springframework.richclient.command.ToggleCommand
public abstract class ToggleCommand
Field Summary | |
---|---|
static String |
SELECTED_PROPERTY
|
Fields inherited from class org.springframework.richclient.command.ActionCommand |
---|
ACTION_COMMAND_PARAMETER_KEY, ACTION_COMMAND_PROPERTY, ACTION_EVENT_PARAMETER_KEY, MODIFIERS_PARAMETER_KEY |
Fields inherited from class org.springframework.richclient.command.AbstractCommand |
---|
ENABLED_PROPERTY_NAME, VISIBLE_PROPERTY_NAME |
Fields inherited from class org.springframework.binding.value.support.AbstractPropertyChangePublisher |
---|
logger |
Fields inherited from interface org.springframework.richclient.core.Authorizable |
---|
AUTHORIZED_PROPERTY |
Constructor Summary | |
---|---|
ToggleCommand()
|
|
ToggleCommand(String commandId)
|
|
ToggleCommand(String id,
CommandFaceDescriptor face)
|
|
ToggleCommand(String id,
String encodedLabel)
|
|
ToggleCommand(String id,
String encodedLabel,
Icon icon,
String caption)
|
Method Summary | |
---|---|
AbstractButton |
createButton(String faceDescriptorId,
ButtonFactory buttonFactory,
CommandButtonConfigurer configurer)
Creates a button using the provided id, factory and configurer. |
AbstractButton |
createCheckBox()
|
AbstractButton |
createCheckBox(ButtonFactory buttonFactory)
|
AbstractButton |
createCheckBox(String faceDescriptorId,
ButtonFactory buttonFactory)
|
AbstractButton |
createCheckBox(String faceDescriptorId,
ButtonFactory buttonFactory,
CommandButtonConfigurer configurer)
|
JMenuItem |
createMenuItem(String faceDescriptorId,
MenuFactory factory,
CommandButtonConfigurer buttonConfigurer)
Create a menuItem using the provided id, factory and configurer. |
AbstractButton |
createRadioButton()
|
AbstractButton |
createRadioButton(ButtonFactory buttonFactory)
|
AbstractButton |
createRadioButton(String faceDescriptorId,
ButtonFactory buttonFactory)
|
AbstractButton |
createRadioButton(String faceDescriptorId,
ButtonFactory buttonFactory,
CommandButtonConfigurer configurer)
|
protected void |
doExecuteCommand()
Executing a toggleCommand will flip its select state. |
boolean |
isExclusiveGroupMember()
|
boolean |
isSelected()
Returns true if the command is selected. |
protected void |
onButtonAttached(AbstractButton button)
Additional code to execute when attaching a button. |
protected void |
onDeselection()
Convenience hook method for processing a deselection action. |
protected void |
onSelection()
Convenience hook method for processing a selection action. |
protected boolean |
onSelection(boolean selected)
Hook method to perform the toggle action. |
void |
requestDefaultIn(RootPaneContainer container)
|
protected boolean |
requestSetSelection(boolean selected)
Handles the switching of the selected state. |
void |
setExclusiveController(ExclusiveCommandGroupSelectionController exclusiveController)
|
void |
setSelected(boolean selected)
Set the selection state of the command. |
Methods inherited from class org.springframework.richclient.command.ActionCommand |
---|
addCommandInterceptor, addParameter, execute, execute, getActionAdapter, getActionCommand, getModifiers, getParameter, getParameter, getParameters, isDisplaysInputDialog, onPostExecute, onPreExecute, removeCommandInterceptor, setActionCommand, setDefaultButton, setDefaultButtonIn, setDisplaysInputDialog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SELECTED_PROPERTY
Constructor Detail |
---|
public ToggleCommand()
public ToggleCommand(String commandId)
public ToggleCommand(String id, CommandFaceDescriptor face)
public ToggleCommand(String id, String encodedLabel)
public ToggleCommand(String id, String encodedLabel, Icon icon, String caption)
Method Detail |
---|
public void setExclusiveController(ExclusiveCommandGroupSelectionController exclusiveController)
public boolean isExclusiveGroupMember()
public JMenuItem createMenuItem(String faceDescriptorId, MenuFactory factory, CommandButtonConfigurer buttonConfigurer)
AbstractCommand
createMenuItem
in class AbstractCommand
faceDescriptorId
- id of the faceDescriptor used to configure the
button.factory
- factory that delivers the menuItem.buttonConfigurer
- configurer mapping the faceDescriptor on the
button.
public AbstractButton createButton(String faceDescriptorId, ButtonFactory buttonFactory, CommandButtonConfigurer configurer)
AbstractCommand
createButton
in class AbstractCommand
faceDescriptorId
- id of the faceDescriptor used to configure the
button.buttonFactory
- factory that delivers the button.configurer
- configurer mapping the faceDescriptor on the
button.
public final AbstractButton createCheckBox()
public final AbstractButton createCheckBox(ButtonFactory buttonFactory)
public final AbstractButton createCheckBox(String faceDescriptorId, ButtonFactory buttonFactory)
public AbstractButton createCheckBox(String faceDescriptorId, ButtonFactory buttonFactory, CommandButtonConfigurer configurer)
public final AbstractButton createRadioButton()
public final AbstractButton createRadioButton(ButtonFactory buttonFactory)
public final AbstractButton createRadioButton(String faceDescriptorId, ButtonFactory buttonFactory)
public AbstractButton createRadioButton(String faceDescriptorId, ButtonFactory buttonFactory, CommandButtonConfigurer configurer)
protected void onButtonAttached(AbstractButton button)
onButtonAttached
in class ActionCommand
button
- the button that has been attached.public final boolean isSelected()
true
if the command is selected.
public final void setSelected(boolean selected)
protected boolean requestSetSelection(boolean selected)
selected
- select state to set.
protected final void doExecuteCommand()
doExecuteCommand
in class ActionCommand
protected boolean onSelection(boolean selected)
The toggle selection request can be vetoed by returning a boolean result (for example if onSelected is handed 'true', signaling the toggle command was activated, a subclass can veto that by returning false.)
selected
- The newly requested selection state of this toggle command
protected void onSelection()
protected void onDeselection()
public void requestDefaultIn(RootPaneContainer container)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |