bibliothek.gui.dock.themes.basic.action.dropdown
Class ButtonDropDownHandler

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler<JMenuItem,S>
      extended by bibliothek.gui.dock.themes.basic.action.dropdown.AbstractDropDownHandler<ButtonDockAction>
          extended by bibliothek.gui.dock.themes.basic.action.dropdown.ButtonDropDownHandler
All Implemented Interfaces:
ViewItem<JComponent>, DropDownViewItem, MenuViewItem<JComponent>

public class ButtonDropDownHandler
extends AbstractDropDownHandler<ButtonDockAction>

A connection between a ButtonDockAction and a drop-down-button.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler
action, dockable, item
 
Constructor Summary
ButtonDropDownHandler(ButtonDockAction action, Dockable dockable, JMenuItem item)
          Creates a new handler.
 
Method Summary
 void bind()
          Connects this handler to its action.
 void triggered()
          Invoked if the item is triggered from outside.
 void unbind()
          Disconnects this handler from its action
 
Methods inherited from class bibliothek.gui.dock.themes.basic.action.dropdown.AbstractDropDownHandler
addActionListener, getView, isSelectable, isTriggerable, removeActionListener, setView
 
Methods inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler
getAction, getDockable, getItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.action.view.ViewItem
getAction, getItem
 

Constructor Detail

ButtonDropDownHandler

public ButtonDropDownHandler(ButtonDockAction action,
                             Dockable dockable,
                             JMenuItem item)
Creates a new handler.

Parameters:
action - the action to observe
dockable - the Dockable for which the action is shown
item - the item that represents the action, can be null
Method Detail

triggered

public void triggered()
Description copied from interface: DropDownViewItem
Invoked if the item is triggered from outside. The item should call the method of its action that causes the action to execute its natural code (for example: a checkbox may change its selected-state).


bind

public void bind()
Description copied from class: AbstractMenuHandler
Connects this handler to its action.

Specified by:
bind in interface ViewItem<JComponent>
Overrides:
bind in class AbstractDropDownHandler<ButtonDockAction>

unbind

public void unbind()
Description copied from class: AbstractMenuHandler
Disconnects this handler from its action

Specified by:
unbind in interface ViewItem<JComponent>
Overrides:
unbind in class AbstractDropDownHandler<ButtonDockAction>