bibliothek.gui.dock.themes.basic.action.menu
Class MenuMenuHandler.Listener

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.action.menu.MenuMenuHandler.Listener
All Implemented Interfaces:
DockActionSourceListener
Enclosing class:
MenuMenuHandler

private class MenuMenuHandler.Listener
extends java.lang.Object
implements DockActionSourceListener

A listener to the source of the enclosing handler.

Author:
Benjamin Sigg

Constructor Summary
private MenuMenuHandler.Listener()
           
 
Method Summary
 void actionsAdded(DockActionSource source, int firstIndex, int lastIndex)
          Invoked when one or more actions are added to the source.
 void actionsRemoved(DockActionSource source, int firstIndex, int lastIndex)
          Invoked if one or more actions are removed from the source.
private  void reput()
          Removes all items of the menu, and then adds them again.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuMenuHandler.Listener

private MenuMenuHandler.Listener()
Method Detail

reput

private void reput()
Removes all items of the menu, and then adds them again. In this way, all items have the correct order, and separators can be inserted easely between the items.


actionsAdded

public void actionsAdded(DockActionSource source,
                         int firstIndex,
                         int lastIndex)
Description copied from interface: DockActionSourceListener
Invoked when one or more actions are added to the source.

Specified by:
actionsAdded in interface DockActionSourceListener
Parameters:
source - the origin of the event
firstIndex - the index of the first new action
lastIndex - the index of the last new action. This value must be greater or equal to firstIndex.

actionsRemoved

public void actionsRemoved(DockActionSource source,
                           int firstIndex,
                           int lastIndex)
Description copied from interface: DockActionSourceListener
Invoked if one or more actions are removed from the source.

Specified by:
actionsRemoved in interface DockActionSourceListener
Parameters:
source - the origin of the event.
firstIndex - the index of the first action that was removed
lastIndex - the index of the last action that was removed. This argument is greater or equal to firstIndex.