com.lc.util.swing
Class DialogDisplay

java.lang.Object
  |
  +--com.lc.util.swing.DialogDisplay
Direct Known Subclasses:
ErrorDisplay

public class DialogDisplay
extends java.lang.Object

Provides easier access to JOptionPane features, with pre-validation behavior. Also allows re-using the same instance for showing it several times, after changing properties.

Version:
$Revision: 1.3 $ $Date: 2002/04/01 16:25:36 $
Author:
Laurent Caillette

Constructor Summary
DialogDisplay()
           
DialogDisplay(java.awt.Component owner)
           
DialogDisplay(java.awt.Component owner, java.lang.Object message)
           
DialogDisplay(java.awt.Component owner, java.lang.Object message, java.lang.String title)
           
 
Method Summary
 javax.swing.Icon getIcon()
           
 java.lang.Object getMessage()
           
 int getMessageType()
           
 java.lang.Object[] getOptions()
          Returns the array of available choices appearing as buttons.
 java.awt.Component getOwner()
           
 boolean getShouldPack()
           
 java.awt.Dimension getSize()
           
 java.lang.String getTitle()
           
 IDialogValidator getValidator()
           
 boolean isCenteringOnScreen()
           
 void setCenteringOnScreen(boolean centering)
           
 void setIcon(javax.swing.Icon icon)
           
 void setMessage(java.lang.Object message)
           
 void setMessageType(int type)
           
 void setOptions(java.lang.Object[] options)
          Sets the array of available choices appearing as buttons.
 void setShouldPack(boolean shouldPack)
           
 void setSize(java.awt.Dimension dim)
           
 void setSize(int width, int height)
           
 void setTitle(java.lang.String title)
           
 void setValidator(IDialogValidator validator)
           
 boolean show()
           
 boolean wasUserValidated()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogDisplay

public DialogDisplay(java.awt.Component owner,
                     java.lang.Object message,
                     java.lang.String title)

DialogDisplay

public DialogDisplay(java.awt.Component owner)

DialogDisplay

public DialogDisplay(java.awt.Component owner,
                     java.lang.Object message)

DialogDisplay

public DialogDisplay()
Method Detail

getOwner

public java.awt.Component getOwner()

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getMessage

public java.lang.Object getMessage()

setMessage

public void setMessage(java.lang.Object message)

getOptions

public java.lang.Object[] getOptions()
Returns the array of available choices appearing as buttons.
Returns:
A copy of the currently array of choices.

setOptions

public void setOptions(java.lang.Object[] options)
Sets the array of available choices appearing as buttons.
Parameters:
options - Array of choices.

getMessageType

public int getMessageType()

setMessageType

public void setMessageType(int type)

getIcon

public javax.swing.Icon getIcon()

setIcon

public void setIcon(javax.swing.Icon icon)

getSize

public java.awt.Dimension getSize()

setSize

public void setSize(int width,
                    int height)

setSize

public void setSize(java.awt.Dimension dim)

getValidator

public IDialogValidator getValidator()

setValidator

public void setValidator(IDialogValidator validator)

isCenteringOnScreen

public boolean isCenteringOnScreen()

setCenteringOnScreen

public void setCenteringOnScreen(boolean centering)

getShouldPack

public boolean getShouldPack()

setShouldPack

public void setShouldPack(boolean shouldPack)

wasUserValidated

public boolean wasUserValidated()

show

public boolean show()