bibliothek.gui.dock.themes.basic.action.menu
Class ButtonMenuHandler

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

public class ButtonMenuHandler
extends AbstractMenuHandler<JMenuItem,ButtonDockAction>

A handler building a connection between a JMenuItem and a ButtonDockAction.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler
action, dockable, item
 
Constructor Summary
ButtonMenuHandler(ButtonDockAction action, Dockable dockable)
          Creates a new handler.
 
Method Summary
 void addActionListener(ActionListener listener)
          Adds a listener which will be called if this view is triggered.
 void removeActionListener(ActionListener listener)
          Removes a listener from this view.
 
Methods inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler
bind, getAction, getDockable, getItem, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonMenuHandler

public ButtonMenuHandler(ButtonDockAction action,
                         Dockable dockable)
Creates a new handler.

Parameters:
action - the action to observe
dockable - the dockable for which actions are dispatched
Method Detail

addActionListener

public void addActionListener(ActionListener listener)
Description copied from interface: MenuViewItem
Adds a listener which will be called if this view is triggered. The listener should only be called, if the user clicked directly onto this view.

Parameters:
listener - the new listener

removeActionListener

public void removeActionListener(ActionListener listener)
Description copied from interface: MenuViewItem
Removes a listener from this view.

Parameters:
listener - the listener to remove