public class DropDownMenuHandler extends Object implements MenuViewItem<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(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.
|
JComponent |
getItem()
Gets this item as component.
|
void |
removeActionListener(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(ActionListener listener)
MenuViewItemaddActionListener in interface MenuViewItem<JComponent>listener - the new listenerpublic void removeActionListener(ActionListener listener)
MenuViewItemremoveActionListener in interface MenuViewItem<JComponent>listener - the listener to removepublic void bind()
ViewItembind in interface ViewItem<JComponent>public void unbind()
ViewItemunbind in interface ViewItem<JComponent>public DockAction getAction()
ViewItemgetAction in interface ViewItem<JComponent>nullpublic JComponent getItem()
ViewItemgetItem in interface ViewItem<JComponent>nullCopyright © 2017 Docking Frames. All rights reserved.