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

java.lang.Object
  extended by bibliothek.gui.dock.common.action.panel.AbstractPanelPopupWindow
      extended by bibliothek.gui.dock.common.action.panel.DialogWindow
All Implemented Interfaces:
PanelPopupWindow

public class DialogWindow
extends AbstractPanelPopupWindow

A PanelPopupWindow managing a JDialog.

Author:
Benjamin Sigg

Constructor Summary
DialogWindow(Component owner, CPanelPopup panel)
          Creates a new window.
 
Method Summary
 void close()
          Makes this window invisible
protected  JDialog createDialog(Component owner)
          Creates a new dialog with the ancestor window of owner as owner.
 boolean isOpen()
          Tells whether this window is visible or not.
 void open(Component relativeTo)
          Opens the dialog relative to relativeTo.
 void open(int x, int y)
          Shows the dialog at the given screen location.
 void setContent(Component content)
          Sets the contents of the dialog.
 void setUndecorated(boolean undecorated)
          Sets whether the dialog has a decoration or not.
 
Methods inherited from class bibliothek.gui.dock.common.action.panel.AbstractPanelPopupWindow
addListener, fireClosed, listeners, removeListener, validateBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogWindow

public DialogWindow(Component owner,
                    CPanelPopup panel)
Creates a new window.

Parameters:
owner - the parent of the dialog
panel - the owner of the dialog
Method Detail

setUndecorated

public void setUndecorated(boolean undecorated)
Sets whether the dialog has a decoration or not.

Parameters:
undecorated - whether to decorate or not
See Also:
Dialog.setUndecorated(boolean)

setContent

public void setContent(Component content)
Sets the contents of the dialog.

Parameters:
content - the contents, may be null

open

public void open(int x,
                 int y)
Shows the dialog at the given screen location.

Parameters:
x - the dialogs location
y - the dialogs location

open

public void open(Component relativeTo)
Opens the dialog relative to relativeTo.

Parameters:
relativeTo - some component

isOpen

public boolean isOpen()
Description copied from interface: PanelPopupWindow
Tells whether this window is visible or not.

Returns:
true if visible

close

public void close()
Description copied from interface: PanelPopupWindow
Makes this window invisible


createDialog

protected JDialog createDialog(Component owner)
Creates a new dialog with the ancestor window of owner as owner.

Parameters:
owner - some component
Returns:
the new dialog