public class DropDownMenuHandler extends java.lang.Object implements MenuViewItem<javax.swing.JComponent>
DropDownAction
in a menu. The action is
shown as if it were an ordinary menu.Constructor and Description |
---|
DropDownMenuHandler(DropDownAction action,
Dockable dockable)
Creates a new handler
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds a listener which will be called if this view is triggered.
|
void |
bind()
Binds this item to its action
|
DockAction |
getAction()
Gets the action that is represented by this target.
|
javax.swing.JComponent |
getItem()
Gets this item as component.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes a listener from this view.
|
void |
unbind()
Unbinds this item from its action
|
public DropDownMenuHandler(DropDownAction action, Dockable dockable)
action
- the action to showdockable
- the Dockable for which the action is shownpublic void addActionListener(java.awt.event.ActionListener listener)
MenuViewItem
addActionListener
in interface MenuViewItem<javax.swing.JComponent>
listener
- the new listenerpublic void removeActionListener(java.awt.event.ActionListener listener)
MenuViewItem
removeActionListener
in interface MenuViewItem<javax.swing.JComponent>
listener
- the listener to removepublic void bind()
ViewItem
public void unbind()
ViewItem
public DockAction getAction()
ViewItem