public class SimpleButtonAction extends SimpleDropDownItemAction implements ButtonDockAction
BUTTON_CONTENT_FILTER| Constructor and Description |
|---|
SimpleButtonAction()
Creates a new action
|
SimpleButtonAction(boolean monitorDisabling)
Creates a new action
|
| Modifier and Type | Method and Description |
|---|---|
void |
action(Dockable dockable)
Invoked when this action is triggered by the user.
|
void |
addActionListener(ActionListener listener)
Adds a listener to this action.
|
<V> V |
createView(ViewTarget<V> target,
ActionViewConverter converter,
Dockable dockable)
Creates a view for this action, for the platform
target and
with help of converter. |
String |
getCommand()
Gets the command of this action.
|
void |
removeActionListener(ActionListener listener)
Removes a listener from this action.
|
void |
setCommand(String command)
Sets the command of this action.
|
boolean |
trigger(Dockable dockable)
Does the appropriate action that can be done respecting the current
state of this action.
|
isDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelectedbound, getAccelerator, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getIcon, getIcon, getIcon, getIconContexts, getText, getText, getTooltip, getTooltipText, getTooltipText, isAcceleratorGlobal, isEnabled, isEnabled, setAccelerator, setAcceleratorIsGlobal, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltip, trigger, unboundaddDockActionListener, bind, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbindclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisDropDownSelectable, isDropDownTriggerableaddDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListenerbind, unbindgetAccelerator, getDisabledIcon, getDockableRepresentation, getIcon, getIcon, getText, getTooltip, getTooltipText, isAcceleratorGlobal, isEnabled, setAccelerator, setAcceleratorIsGlobal, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltippublic SimpleButtonAction()
public SimpleButtonAction(boolean monitorDisabling)
monitorDisabling - whether to monitor the current DisablingStrategypublic <V> V createView(ViewTarget<V> target, ActionViewConverter converter, Dockable dockable)
DockActiontarget and
with help of converter. Clients might use their own
code to create a new view, but the preferred way is to call
ActionViewConverter.createView(ActionType, DockAction, ViewTarget, Dockable)
with an ActionType that fits to this DockAction.createView in interface DockActionV - the type of view requestedtarget - The platform on which the view will be usedconverter - A set of methods that can be used to create a viewdockable - The Dockable for which the view will be shown. Note that
this action may not yet be bound to this action.public void setCommand(String command)
command will be
set in each ActionEvent that is created and fired by
this action.command - the command, might be nullpublic String getCommand()
nullsetCommand(String)public void addActionListener(ActionListener listener)
listener - the new listenerpublic void removeActionListener(ActionListener listener)
listener - the listener to removepublic void action(Dockable dockable)
ButtonDockActionaction in interface ButtonDockActiondockable - The Dockable which is associated with
this DockAction, and which shall be used for the current action.public boolean trigger(Dockable dockable)
DockActiontrigger in interface DockActiondockable - the element for which this action is calledtrue if this action could do anything, false
if this action was not able to react in any way to the event.Copyright © 2017 Docking Frames. All rights reserved.