public class SelectableDropDownHandler extends AbstractDropDownHandler<SelectableDockAction>
SelectableDockAction
and a
drop-down-button.action, dockable, item
Constructor and Description |
---|
SelectableDropDownHandler(SelectableDockAction action,
Dockable dockable,
JMenuItem item)
Creates a new handler.
|
Modifier and Type | Method and Description |
---|---|
void |
bind()
Connects this handler to its action.
|
protected void |
itemTriggered()
Called if the menuitem was clicked.
|
void |
setView(DropDownView view)
Sends the current settings of this item to the view.
|
void |
triggered()
Invoked if the item is triggered from outside.
|
void |
unbind()
Disconnects this handler from its action
|
addActionListener, getView, isSelectable, isTriggerable, removeActionListener
getAction, getDockable, getItem
public SelectableDropDownHandler(SelectableDockAction action, Dockable dockable, JMenuItem item)
action
- the action to observedockable
- the Dockable for which the action is shownitem
- the graphical representation of the actionpublic void bind()
AbstractMenuHandler
bind
in interface ViewItem<JComponent>
bind
in class AbstractDropDownHandler<SelectableDockAction>
public void unbind()
AbstractMenuHandler
unbind
in interface ViewItem<JComponent>
unbind
in class AbstractDropDownHandler<SelectableDockAction>
public void setView(DropDownView view)
DropDownViewItem
setView
in interface DropDownViewItem
setView
in class AbstractDropDownHandler<SelectableDockAction>
view
- the view, might be null
protected void itemTriggered()
triggered()
. This method is not called if the item
if in a drop-down-menu and cannot be triggered in the unselected-state.public void triggered()
DropDownViewItem