http://www.jpicedt.org

jpicedt.graphic.toolkit
Class CustomizerDialog

java.lang.Object
  extended by jpicedt.graphic.toolkit.CustomizerDialog

public class CustomizerDialog
extends Object

A modal or non-modal dialog box that lays out an array of AbstractCustomizer's inside a JPanel or a JTabbedPane, depending on the number of customizers fed to the constructor. It further provides three default actions, namely : ok (store and dispose), cancel (marks as cancelled), load default, reload. Note that cancel() makes sense only if the hosting dialog is modal.

Since:
jPicEdt 1.3.2
Version:
$Id: CustomizerDialog.java,v 1.15 2013/03/27 06:58:56 vincentb1 Exp $
Author:
Sylvain Reynal

Nested Class Summary
static class CustomizerDialog.ButtonMask
           
 
Constructor Summary
CustomizerDialog(MDIComponent host, AbstractCustomizer customizer, EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
          Builds a new dialog box from a single customizer.
CustomizerDialog(MDIComponent host, ArrayList<AbstractCustomizer> customizers, int selected, String title, EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
          Creates a new dialog box from the given array of AbstractCustomizer's, laying them out in a JTabbedPane.
 
Method Summary
 void dispose()
          simply delegates to hosting component
 boolean isCancelled()
           
 void paneActivated(AbstractCustomizer c)
          If this dialog was constructed with more than one inner-pane, this methods is invoked when a new pane gets activated.
 void setOkButtonClosesDialog(boolean b)
          Whether clicking the OK button, beside storing widgets content, also closes this dialog or not.
 void setVisible(boolean b)
          simply delegates to hosting component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizerDialog

public CustomizerDialog(MDIComponent host,
                        ArrayList<AbstractCustomizer> customizers,
                        int selected,
                        String title,
                        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.

Parameters:
title - the JDialog title ; if null, we use the first customizer title.
selected - index of the selected customizer on start-up
buttonsMask - buttons to be displayed : a mask computed from predefinite masks OR'd together
host - the hosting component

CustomizerDialog

public CustomizerDialog(MDIComponent host,
                        AbstractCustomizer customizer,
                        EnumSet<CustomizerDialog.ButtonMask> buttonsMask)
Builds a new dialog box from a single customizer.
By default, clicking the OK button does not close this dialog box, this must be set separately by invoking setOkButtonClosesDialog.

Parameters:
buttonsMask - buttons to be displayed : a mask computed from predefinite masks OR'd together
host - the hosting component; a JDialog if null
Method Detail

isCancelled

public boolean isCancelled()
Returns:
true if the user pressed the Cancel action

paneActivated

public void paneActivated(AbstractCustomizer c)
If this dialog was constructed with more than one inner-pane, this methods is invoked when a new pane gets activated.


setOkButtonClosesDialog

public void setOkButtonClosesDialog(boolean b)
Whether clicking the OK button, beside storing widgets content, also closes this dialog or not. It is valid to call this method at any time, e.g. to change behaviour once this dialog has been made visible.


setVisible

public void setVisible(boolean b)
simply delegates to hosting component


dispose

public void dispose()
simply delegates to hosting component


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org