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

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<SelectableDockAction>
          extended by bibliothek.gui.dock.themes.basic.action.dropdown.SelectableDropDownHandler
All Implemented Interfaces:
ViewItem<JComponent>, DropDownViewItem, MenuViewItem<JComponent>
Direct Known Subclasses:
SelectableDropDownHandler.Check, SelectableDropDownHandler.Radio

public abstract class SelectableDropDownHandler
extends AbstractDropDownHandler<SelectableDockAction>

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

Author:
Benjamin Sigg

Nested Class Summary
static class SelectableDropDownHandler.Check
          A connection representing a check-box.
static class SelectableDropDownHandler.Radio
          A connection representing a radio-button.
 
Field Summary
 
Fields inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler
action, dockable, item
 
Constructor Summary
SelectableDropDownHandler(SelectableDockAction action, Dockable dockable, JMenuItem item)
          Creates a new handler.
 
Method Summary
 void bind()
          Connects this handler to its action.
protected abstract  void itemTriggered()
          Called if the menuitem was clicked.
 void setView(DropDownView view)
          Sends the current settings of this item to the view.
 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
 
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.themes.basic.action.dropdown.DropDownViewItem
triggered
 
Methods inherited from interface bibliothek.gui.dock.action.view.ViewItem
getAction, getItem
 

Constructor Detail

SelectableDropDownHandler

public SelectableDropDownHandler(SelectableDockAction 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 graphical representation of the action
Method Detail

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<SelectableDockAction>

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<SelectableDockAction>

setView

public void setView(DropDownView view)
Description copied from interface: DropDownViewItem
Sends the current settings of this item to the view. The values can be changed as long as the view is registered.

Specified by:
setView in interface DropDownViewItem
Overrides:
setView in class AbstractDropDownHandler<SelectableDockAction>
Parameters:
view - the view, might be null

itemTriggered

protected abstract void itemTriggered()
Called if the menuitem was clicked.