public class SimpleMenuAction extends SimpleDockAction implements MenuDockAction
listenersBUTTON_CONTENT_FILTER| Constructor and Description |
|---|
SimpleMenuAction()
Creates a new action.
|
SimpleMenuAction(boolean monitorDisabling)
Creates a new action, the method has to be set later.
|
SimpleMenuAction(DockActionSource menu)
Creates a new action.
|
| Modifier and Type | Method and Description |
|---|---|
<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. |
DockActionSource |
getMenu()
Gets the menu of this action
|
DockActionSource |
getMenu(Dockable dockable)
Returns the menu that is represented by this action.
|
void |
setMenu(DockActionSource menu)
Sets a menu that will be displayed instead of this action.
|
boolean |
trigger(Dockable dockable)
Does the appropriate action that can be done respecting the current
state of this action.
|
bound, 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, waitaddDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListenerbind, unbindpublic SimpleMenuAction()
setMenu(DockActionSource)public SimpleMenuAction(boolean monitorDisabling)
monitorDisabling - whether the current DisablingStrategy will be monitoredpublic SimpleMenuAction(DockActionSource menu)
menu - the menu that is shown for this actionpublic void setMenu(DockActionSource menu)
menu - the menu, may be nullpublic DockActionSource getMenu(Dockable dockable)
MenuDockActiongetMenu in interface MenuDockActiondockable - the Dockable for which the menu is shownnullpublic DockActionSource getMenu()
public <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 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.