bibliothek.gui.dock.control
Class PopupController

java.lang.Object
  extended by bibliothek.gui.dock.control.PopupController
All Implemented Interfaces:
DockControllerRepresentativeListener

public class PopupController
extends Object
implements DockControllerRepresentativeListener

Adds listeners to all DockElementRepresentatives. Opens a popup-menu when the user triggers the popup-action.

Author:
Benjamin Sigg

Constructor Summary
PopupController(DockController controller)
          Creates a new popup-controller.
 
Method Summary
 DockController getController()
          Gets the DockController for which this PopupController works.
 void representativeAdded(DockController controller, DockElementRepresentative representative)
          Informs this listener that representative was added to controller.
 void representativeRemoved(DockController controller, DockElementRepresentative representative)
          Informs this listener that representative was removed from controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupController

public PopupController(DockController controller)
Creates a new popup-controller.

Parameters:
controller - the controller for which this instance works
Method Detail

representativeAdded

public void representativeAdded(DockController controller,
                                DockElementRepresentative representative)
Description copied from interface: DockControllerRepresentativeListener
Informs this listener that representative was added to controller.

Specified by:
representativeAdded in interface DockControllerRepresentativeListener
Parameters:
controller - the source of the event
representative - the element that was added

representativeRemoved

public void representativeRemoved(DockController controller,
                                  DockElementRepresentative representative)
Description copied from interface: DockControllerRepresentativeListener
Informs this listener that representative was removed from controller.

Specified by:
representativeRemoved in interface DockControllerRepresentativeListener
Parameters:
controller - the source of the event
representative - the element that was removed

getController

public DockController getController()
Gets the DockController for which this PopupController works.

Returns:
the owner of this controller