I - DropDownItemHandle used by this handlerD - Action used by this handlerpublic abstract class AbstractMenuHandler<I extends JMenuItem,D extends StandardDockAction> extends Object implements MenuViewItem<JComponent>
JMenuItem with a DockAction.| Modifier and Type | Field and Description |
|---|---|
protected D |
action
the action shown by the item of this handler, may be
null |
protected Dockable |
dockable
the Dockable for which actions are dispatched
|
protected I |
item
the visual representation of the action, may be
null |
| Constructor and Description |
|---|
AbstractMenuHandler(D action,
Dockable dockable,
I item)
Creates a new handler with predefined item.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Connects this handler to its action.
|
D |
getAction()
Gets the action that is observed by this handler.
|
Dockable |
getDockable()
Gets the element for which actions are dispatched.
|
JMenuItem |
getItem()
Gets the item whose values are updated by this handler.
|
void |
unbind()
Disconnects this handler from its action
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddActionListener, removeActionListenerprotected Dockable dockable
protected D extends StandardDockAction action
nullpublic AbstractMenuHandler(D action, Dockable dockable, I item)
action - the action to observedockable - the dockable for which actions are dispatcheditem - the item whose values have to be updated, null is
only valid if action is null too.public Dockable getDockable()
public D getAction()
getAction in interface ViewItem<JComponent>nullpublic JMenuItem getItem()
getItem in interface ViewItem<JComponent>nullpublic void bind()
bind in interface ViewItem<JComponent>public void unbind()
unbind in interface ViewItem<JComponent>Copyright © 2017 Docking Frames. All rights reserved.