ti.chimera
Interface Dialog


public interface Dialog

The interface implemented by a dialog window. Like with swing's JDialog or JInternalFrame, you don't actually add components to the dialog itself, but rather to it's content pane, which is returned by getContentPane().

Version:
0.2
Author:
Rob Clark

Method Summary
 void addCloseRunnable(java.lang.Runnable r)
          Add a runnable that will be invoked when this dialog is closed.
 void addWindowListener(java.awt.event.WindowListener l)
          Adds the specified window listener to receive window events.
 void center()
          Center this dialog on the screen.
 void dispose()
          Dispose of this dialog.
 java.awt.Rectangle getBounds()
          Get the bounds of this dialog, ie the position and size of the window.
 java.awt.Container getContentPane()
          Return the content-pane.
 java.lang.String getTitle()
          Get the title of this dialog.
 void pack()
          Cause the dialog to be sized to fit the preferred size of it's sub- components.
 void removeCloseRunnable(java.lang.Runnable r)
          Remove the runnable from the list of runnables that will get run when this dialog is closed.
 void removeWindowListener(java.awt.event.WindowListener l)
          Removes the specified window listener so that it no longer receives window events from this component
 void setBounds(java.awt.Rectangle r)
          Set the bounds of this dialog, ie.
 void setVisible(boolean visible)
          Called to set the visible state of this dialog.
 void showModal()
          Show as modal dialog.
 void toFront()
          Bring this dialog to the front.
 

Method Detail

getTitle

public java.lang.String getTitle()
Get the title of this dialog.

Returns:
a string

setVisible

public void setVisible(boolean visible)
Called to set the visible state of this dialog.

Parameters:
visible - the new visible state

getBounds

public java.awt.Rectangle getBounds()
Get the bounds of this dialog, ie the position and size of the window.

Returns:
a rectangle

setBounds

public void setBounds(java.awt.Rectangle r)
Set the bounds of this dialog, ie. the size and position of the window.

Parameters:
r - the new bounds

toFront

public void toFront()
Bring this dialog to the front.


center

public void center()
Center this dialog on the screen.


getContentPane

public java.awt.Container getContentPane()
Return the content-pane. This is the component that the contents of the window are to be added to.

Returns:
a container

pack

public void pack()
Cause the dialog to be sized to fit the preferred size of it's sub- components.


dispose

public void dispose()
Dispose of this dialog.


showModal

public void showModal()
Show as modal dialog. Do not return until dialog closed.


addCloseRunnable

public void addCloseRunnable(java.lang.Runnable r)
Add a runnable that will be invoked when this dialog is closed. This gives the user of the dialog a way to perform cleanup when the dialog is closed.

Parameters:
r - the runnable

removeCloseRunnable

public void removeCloseRunnable(java.lang.Runnable r)
Remove the runnable from the list of runnables that will get run when this dialog is closed.

Parameters:
r - the runnable

addWindowListener

public void addWindowListener(java.awt.event.WindowListener l)
Adds the specified window listener to receive window events.

Parameters:
l - the listener

removeWindowListener

public void removeWindowListener(java.awt.event.WindowListener l)
Removes the specified window listener so that it no longer receives window events from this component

Parameters:
l - the listener