bibliothek.gui.dock.common.action.panel
Class AbstractPanelPopupWindow

java.lang.Object
  extended by bibliothek.gui.dock.common.action.panel.AbstractPanelPopupWindow
All Implemented Interfaces:
PanelPopupWindow
Direct Known Subclasses:
DialogWindow, MenuWindow

public abstract class AbstractPanelPopupWindow
extends Object
implements PanelPopupWindow

Abstract implementation of PanelPopupWindow, handles the PanelPopupWindowListeners.
Subclasses should call validateBounds(Rectangle, GraphicsConfiguration) before they get visible

Author:
Benjamin Sigg

Constructor Summary
AbstractPanelPopupWindow()
           
 
Method Summary
 void addListener(PanelPopupWindowListener listener)
          Adds a listener to this window.
protected  void fireClosed()
          Informs all listeners that this window has been closed
protected  PanelPopupWindowListener[] listeners()
          Returns an array containing all the listeners of this AbstractPanelPopupWindow.
 void removeListener(PanelPopupWindowListener listener)
          Removes a listener from this window.
protected  Rectangle validateBounds(Rectangle bounds, GraphicsConfiguration configuration)
          Should be called before this window is made visible, ensure that the boundaries are valid.
 
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.common.action.panel.PanelPopupWindow
close, isOpen
 

Constructor Detail

AbstractPanelPopupWindow

public AbstractPanelPopupWindow()
Method Detail

addListener

public void addListener(PanelPopupWindowListener listener)
Description copied from interface: PanelPopupWindow
Adds a listener to this window.

Specified by:
addListener in interface PanelPopupWindow
Parameters:
listener - the new listener

removeListener

public void removeListener(PanelPopupWindowListener listener)
Description copied from interface: PanelPopupWindow
Removes a listener from this window.

Specified by:
removeListener in interface PanelPopupWindow
Parameters:
listener - the listener

listeners

protected PanelPopupWindowListener[] listeners()
Returns an array containing all the listeners of this AbstractPanelPopupWindow.

Returns:
all the listeners

fireClosed

protected void fireClosed()
Informs all listeners that this window has been closed


validateBounds

protected Rectangle validateBounds(Rectangle bounds,
                                   GraphicsConfiguration configuration)
Should be called before this window is made visible, ensure that the boundaries are valid.

Parameters:
bounds - the proposed boundaries
configuration - the screen on which this window is going to be visible, might be null
Returns:
the actual boundaries, can be null to indicate that bounds is valid