com.hp.hpl.guess.ui
Class ExtendedOptionPane

java.lang.Object
  extended bycom.hp.hpl.guess.ui.ExtendedOptionPane

public class ExtendedOptionPane
extends Object


Constructor Summary
ExtendedOptionPane()
           
 
Method Summary
static JDialog createDialog(Component t, Component parentComponent, String title)
          Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame.
static Frame getRootFrame()
           
static int showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedOptionPane

public ExtendedOptionPane()
Method Detail

showOptionDialog

public static int showOptionDialog(Component parentComponent,
                                   Object message,
                                   String title,
                                   int optionType,
                                   int messageType,
                                   Icon icon,
                                   Object[] options,
                                   Object initialValue)
                            throws HeadlessException
Throws:
HeadlessException

createDialog

public static JDialog createDialog(Component t,
                                   Component parentComponent,
                                   String title)
                            throws HeadlessException
Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame. title is the title of the returned dialog. The returned JDialog will not be resizable by the user, however programs can invoke setResizable on the JDialog instance to change this property. The returned JDialog will be set up such that once it is closed, or the user clicks on one of the buttons, the optionpane's value property will be set accordingly and the dialog will be closed. Each time the dialog is made visible, it will reset the option pane's value property to JOptionPane.UNINITIALIZED_VALUE to ensure the user's subsequent action closes the dialog properly.

Parameters:
parentComponent - determines the frame in which the dialog is displayed; if the parentComponent has no Frame, a default Frame is used
title - the title string for the dialog
Returns:
a new JDialog containing this instance
Throws:
HeadlessException - if GraphicsEnvironment.isHeadless returns true
See Also:
GraphicsEnvironment.isHeadless()

getRootFrame

public static Frame getRootFrame()
                          throws HeadlessException
Throws:
HeadlessException