http://www.jpicedt.org

jpicedt.graphic.toolkit
Class DefaultDialogFactory

java.lang.Object
  extended by jpicedt.graphic.toolkit.DefaultDialogFactory
All Implemented Interfaces:
DialogFactory

public class DefaultDialogFactory
extends Object
implements DialogFactory

Provides functionalities to show a dialog box in a GUI.


Constructor Summary
DefaultDialogFactory(Frame root)
           
 
Method Summary
 CustomizerDialog createCustomizerDialog(AbstractCustomizer customizer, boolean modal, EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
          Builds a new dialog box from a single customizer.
 CustomizerDialog createCustomizerDialog(ArrayList<AbstractCustomizer> customizers, int selected, String title, boolean modal, EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
          Creates a new dialog box from the given array of AbstractCustomizer's, laying them out in a JTabbedPane.
 MDIComponent createDialog(String title, boolean modal, JComponent p)
          Wraps the given component in a dialog box appropriate for the current GUI.
 void setRootFrame(Frame root)
           
 int showConfirmDialog(Object message, String title, int optionType)
           
 int showConfirmDialog(Object message, String title, int optionType, int msgType)
           
 int showDontAskMeAgainConfirmDialog(String message, String title, String dontAskMeAgainKey, int messageType)
          Describe showDontAskMeAgainConfirmDialog method here.
 String showInputDialog(Object message, String title, int messageType)
           
 Object showInputDialog(Object message, String title, int messageType, Object[] choices, Object initialChoice)
           
 String showInputDialog(Object message, String title, int messageType, String initialValue)
           
 void showMessageDialog(Object message, String title, int messageType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDialogFactory

public DefaultDialogFactory(Frame root)
Method Detail

setRootFrame

public void setRootFrame(Frame root)

createDialog

public MDIComponent createDialog(String title,
                                 boolean modal,
                                 JComponent p)
Wraps the given component in a dialog box appropriate for the current GUI.

Specified by:
createDialog in interface DialogFactory

createCustomizerDialog

public CustomizerDialog createCustomizerDialog(ArrayList<AbstractCustomizer> customizers,
                                               int selected,
                                               String title,
                                               boolean modal,
                                               EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
Creates a new dialog box from the given array of AbstractCustomizer's, laying them out in a JTabbedPane.
By default, clicking the OK button does not close this dialog box, this must be set separately by invoking setOkButtonClosesDialog.

Specified by:
createCustomizerDialog in interface DialogFactory
Parameters:
title - the dialog title ; if null, the title of the first customizer is used.
selected - index of the selected customizer on start-up
buttonsMask - buttons to be displayed : a mask computed from predefinite masks OR'd together

createCustomizerDialog

public CustomizerDialog createCustomizerDialog(AbstractCustomizer customizer,
                                               boolean modal,
                                               EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
Builds a new dialog box from a single customizer.

Specified by:
createCustomizerDialog in interface DialogFactory

showMessageDialog

public void showMessageDialog(Object message,
                              String title,
                              int messageType)
Specified by:
showMessageDialog in interface DialogFactory
See Also:
JOptionPane

showConfirmDialog

public int showConfirmDialog(Object message,
                             String title,
                             int optionType)
Specified by:
showConfirmDialog in interface DialogFactory
See Also:
JOptionPane

showConfirmDialog

public int showConfirmDialog(Object message,
                             String title,
                             int optionType,
                             int msgType)
Specified by:
showConfirmDialog in interface DialogFactory
See Also:
JOptionPane

showInputDialog

public String showInputDialog(Object message,
                              String title,
                              int messageType)
Specified by:
showInputDialog in interface DialogFactory
See Also:
JOptionPane

showInputDialog

public String showInputDialog(Object message,
                              String title,
                              int messageType,
                              String initialValue)
Specified by:
showInputDialog in interface DialogFactory
See Also:
JOptionPane

showInputDialog

public Object showInputDialog(Object message,
                              String title,
                              int messageType,
                              Object[] choices,
                              Object initialChoice)
Specified by:
showInputDialog in interface DialogFactory
See Also:
JOptionPane

showDontAskMeAgainConfirmDialog

public int showDontAskMeAgainConfirmDialog(String message,
                                           String title,
                                           String dontAskMeAgainKey,
                                           int messageType)
Description copied from interface: DialogFactory
Describe showDontAskMeAgainConfirmDialog method here.

Specified by:
showDontAskMeAgainConfirmDialog in interface DialogFactory
Parameters:
message - Un message textuel.
title - voir javax.swing#JOptionPane
dontAskMeAgainKey - une clef de propriété de type jpicedt.ui.dialog.
messageType - voir javax.swing.JOptionPane.
Returns:
voir javax.swing#JOptionPane, renvoie JOptionPane.YES_OPTION ou JOptionPane.NO_OPTION.

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org