|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.bs.mdi.swing.SwingCommandTrigger
org.bs.mdi.swing.SwingCommandButton
A Wrapper for AbstractButtons which adds CommandTrigger functionality.
| Field Summary | |
protected static int |
TYPE_BUTTON
|
protected static int |
TYPE_CHECKBOX
|
protected static int |
TYPE_CUSTOM
|
protected static int |
TYPE_MENUITEM
|
protected static int |
TYPE_RADIOBUTTON
|
protected static int |
TYPE_TOOLBUTTON
|
protected static int |
TYPE_TOOLTOGGLEBUTTON
|
| Constructor Summary | |
|
SwingCommandButton(SwingCommand command,
AbstractButton button)
Creates a new custom SwingCommandButton based on an AbstractButton. |
protected |
SwingCommandButton(SwingCommand command,
AbstractButton button,
int type)
This constructor is for framework internal use only. |
| Method Summary | |
void |
actionPerformed(ActionEvent e)
|
void |
commandExecuted(CommandTrigger trigger)
Informs this trigger that the associated command has been executed. |
void |
commandUpdated()
Informs this trigger that the associated command has changed. |
static AbstractButton |
createButton(SwingCommand command)
Creates a new standard button and associates it with the given command. |
static AbstractButton |
createCheckBox(SwingCommand command)
Creates a new checkbox and associates it with the given command. |
static AbstractButton |
createMenuItem(SwingCommand command)
Creates a new menu item and associates it with the given command. |
static AbstractButton |
createRadioButton(SwingCommand command)
Creates a new radio button and associates it with the given command. |
static AbstractButton |
createToolButton(SwingCommand command)
Creates a new toolbar button and associates it with the given command. |
static AbstractButton |
createToolToggleButton(SwingCommand command)
Creates a new toolbar togglebutton and associates it with the given command. |
AbstractButton |
getButton()
Gets the button "wrapped" behind this object. |
boolean |
removeFrom(Container container)
Removes this trigger from the sepecified container. |
void |
setEnabled(boolean enabled)
Enables or disables this command trigger. |
| Methods inherited from class org.bs.mdi.swing.SwingCommandTrigger |
execute, getCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int TYPE_CUSTOM
protected static final int TYPE_TOOLBUTTON
protected static final int TYPE_TOOLTOGGLEBUTTON
protected static final int TYPE_BUTTON
protected static final int TYPE_MENUITEM
protected static final int TYPE_CHECKBOX
protected static final int TYPE_RADIOBUTTON
| Constructor Detail |
public SwingCommandButton(SwingCommand command,
AbstractButton button)
command - the command to be associated with the SwingCommandButtonbutton - the component to be wrapped
protected SwingCommandButton(SwingCommand command,
AbstractButton button,
int type)
command - button - type - | Method Detail |
public static AbstractButton createToolButton(SwingCommand command)
command - the command to be associated with the button
public static AbstractButton createToolToggleButton(SwingCommand command)
command - the command to be associated with the button
public static AbstractButton createButton(SwingCommand command)
command - the command to be associated with the button
public static AbstractButton createMenuItem(SwingCommand command)
command - the command to be associated with the menu item
public static AbstractButton createCheckBox(SwingCommand command)
command - the command to be associated with the checkbox
public static AbstractButton createRadioButton(SwingCommand command)
command - the command to be associated with the radio button
public AbstractButton getButton()
public void setEnabled(boolean enabled)
CommandTrigger
setEnabled in interface CommandTriggersetEnabled in class SwingCommandTriggerpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void commandExecuted(CommandTrigger trigger)
CommandTrigger
commandExecuted in interface CommandTriggercommandExecuted in class SwingCommandTriggerpublic void commandUpdated()
CommandTrigger
commandUpdated in interface CommandTriggercommandUpdated in class SwingCommandTriggerpublic boolean removeFrom(Container container)
SwingCommandTrigger
removeFrom in class SwingCommandTriggercontainer - the container which is supposed to contain this trigger
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||