be.ugent.caagt.swirl.actions
Class ToolBarToggleButton
JToggleButtonbe.ugent.caagt.swirl.actions.ToolBarToggleButton
public class ToolBarToggleButton
extends JToggleButton
Button for use on a tool bar. Has the same functionality as
JToggleButton but with a slightly different look and feel. See
the documentation of ToolBarToggleButton for details.
ToolBarToggleButton
public ToolBarToggleButton(Action action)
Create a tool bar toggle button from the given action. The following
action properties are used:
- The text of the button is set to
null - and not to
Action.NAME as might be expected. - The tool tip text is set to
Action.SHORT_DESCRIPTION
if it is non null, and otherwise to Action.NAME. - The icon is taken from
SimpleAction.MEDIUM_ICON, unless
this is null in which case Action.SMALL_ICON is used. - The icon for the disabled button is taken from
SimpleAction.MEDIUM_DISABLED_ICON if it is non-null. - The button model is taken from
SimpleAction.TOGGLE_BUTTON_MODEL if it is non-null.
Note that no accelerator key or mnemonic is installed.
PropertyChangeListener createActionPropertyChangeListener
protected @Override PropertyChangeListener createActionPropertyChangeListener(Action a)
void configurePropertiesFromAction
protected @Override void configurePropertiesFromAction(Action a)