I
- DropDownItemHandle used by this handlerD
- Action used by this handlerpublic abstract class AbstractMenuHandler<I extends javax.swing.JMenuItem,D extends StandardDockAction> extends java.lang.Object implements MenuViewItem<javax.swing.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.
|
javax.swing.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, wait
addActionListener, removeActionListener
protected I extends javax.swing.JMenuItem item
null
protected Dockable dockable
protected D extends StandardDockAction action
null
public 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()
public javax.swing.JMenuItem getItem()
public void bind()