|
|
|||||
| Package com.dassault_systemes.catweb.base.awt |
Class DialogBox
|
| Class Hierarchy |
java.lang.Object
|
+-java.awt.Component
|
+-java.awt.Container
|
+-java.awt.Window
|
+-java.awt.Dialog
|
+-com.dassault_systemes.catweb.base.awt.CATDialog
|
+-com.dassault_systemes.catweb.base.awt.DialogBox
| Class Location |
| Class Description |
public class DialogBox
Creates a DialogBox with default combination of buttons.
The default buttons combinations are:
OK_CANCEL
used: - when the user can see directly the result of his interactions into the dialog box
- when the task is so simple that the user does not need to do several attempts.
OK_CANCEL_PREVIEW
used: - when the user cannot see directly the result after modifying a parameter of the dialog box
OK_APPLY_CLOSE
used: - when interactions inside the command are not "undo-able"
CLOSE
used: - when interactions does not modify the document
- when the behavior of the dialog box is like a toolbar palette made up of several commands.
| Field Summary |
| public static final String | APPLY_CMD
|
| public static final String | CANCEL_CMD
|
| public static final int | CLOSE
|
| public static final String | CLOSE_CMD
|
| public int | counterButton
|
| protected int | currentButtonsCombi
current buttons combination |
| protected Panel | leftButtonsPanel
south west panel for buttons |
| protected Vector | listOfButton
contains the list of button (CATButtonIF) created and added to the dialog |
| protected Vector | listOfButton_old
contains the list of button (Button) created and added to the dialog Deprecated.V5R10 |
| public static final int | OK_APPLY_CLOSE
|
| public static final int | OK_CANCEL
Specifies the type of buttons combination |
| public static final int | OK_CANCEL_PREVIEW
|
| public static final String | OK_CMD
The actions command associated to default buttons |
| public static final String | PREVIEW_CMD
|
| protected Panel | rightButtonsPanel
south east panel for buttons |
| protected Panel | workarea
the area that will contain dialog components (no button) |
| Constructor Summary |
| DialogBox(Frame parent)
Constructor |
| DialogBox(Frame parent, boolean modal)
Constructor |
| DialogBox(Frame parent, String title)
Constructor |
| DialogBox(Frame parent, String title, boolean modal)
Constructor |
| DialogBox(Frame parent, String title, boolean modal, boolean useSettings)
Constructor |
| DialogBox(Window parent, String title)
|
| Method Summary |
| public Button | addButton(String label, String actionCmd)
Creates a DialogButton with the label and the action command actionCmd, and add it to the dialog at South-East Deprecated. V5R10 - Replaced by @href #addCATButtonIF |
| public void | addButtonActionListener(ActionListener listener)
Adds an action listener instance to the subscriber list. |
| public CATButtonIF | addCATButtonIF(String label, String actionCmd)
Creates a CATButtonIF with the label and the action command actionCmd, and add it to the dialog at South-East |
| public Button | addLeftButton(String label, String actionCmd)
Creates a DialogButton with the label and the action command actionCmd, and add it to the dialog at South-West Deprecated. V5R10 - Replaced by @href #addLeftCATButtonIF |
| public CATButtonIF | addLeftCATButtonIF(String label, String actionCmd)
Creates a CATButtonIF with the label and the action command actionCmd, and add it to the dialog at South-West |
| public Button | addRightButton(String label, String actionCmd)
Creates a DialogButton with the label and the action command actionCmd, and add it to the dialog at South-East Deprecated. V5R10 - Replaced by @href #addRightCATButtonIF |
| public CATButtonIF | addRightCATButtonIF(String label, String actionCmd)
Creates a CATButtonIF with the label and the action command actionCmd, and add it to the dialog at South-East |
| public void | cleanup()
Cleans the Dialog : removes buttons and listeners |
| public void | dispose()
Disposes of this dialog. |
| public Button | getButton(String actionCmd)
Returns the button specified by its action command Deprecated. V5R10 - Replaced by @href #getCATButtonIF |
| public Button[] | getButtons()
Returns the list of buttons of the DialogBox Deprecated. V5R10 - Replaced by @href #getCATButtonsIF |
| public CATButtonIF | getCATButtonIF(String actionCmd)
Returns the button specified by its action command |
| public CATButtonIF[] | getCATButtonsIF()
Returns the list of CATButtonIF of the DialogBox |
| public Container | getContentPane()
This method is just here to give the dialog a 'add' mecanism similar to a swing JDialog |
| public void | hide()
Hides this dialog. |
| public boolean | isListenDefaultCommands()
Returns true if the Dialog Box listen to default command in order to close dialog for action OK, CANCEL or CLOSE. |
| public void | removeButtonActionListener(ActionListener listener)
Removes an action listener instance from the subscriber list |
| public void | setButtonsCombination(int buttonsType)
Sets the type of buttons combination display in the dialog The possible combinations are OK_CANCEL, OK_CANCEL_PREVIEW, OK_APPLY_CLOSE and CLOSE |
| public void | setCATButtonIFName()
|
| public void | setListenDefaultCommand(boolean flag)
Listens or not the default commands in order to close dialog for action OK, CANCEL or CLOSE. |
| public void | show()
Shows this dialog. |
| Field Detail |
public static final String APPLY_CMD
public static final String CANCEL_CMD
public static final int CLOSE
public static final String CLOSE_CMD
public int counterButton
protected int currentButtonsCombi
current buttons combination
protected Panel leftButtonsPanel
south west panel for buttons
protected Vector listOfButton
contains the list of button (CATButtonIF) created and added to the dialog
protected Vector listOfButton_old
contains the list of button (Button) created and added to the dialog
Deprecated. V5R10
public static final int OK_APPLY_CLOSE
public static final int OK_CANCEL
Specifies the type of buttons combination
public static final int OK_CANCEL_PREVIEW
public static final String OK_CMD
The actions command associated to default buttons
public static final String PREVIEW_CMD
protected Panel rightButtonsPanel
south east panel for buttons
protected Panel workarea
the area that will contain dialog components (no button)
| Constructor Detail |
DialogBox(Frame parent)
Constructor
parent
DialogBox(Frame parent, boolean modal)
Constructor
parentmodal
DialogBox(Frame parent, String title)
Constructor
parenttitle
DialogBox(Frame parent, String title, boolean modal)
Constructor
parenttitlemodal
DialogBox(Frame parent, String title, boolean modal, boolean useSettings)
Constructor
parenttitlemodaluseSettings
DialogBox(Window parent, String title)
parenttitle| Method Detail |
public Button addButton(String label, String actionCmd)
Creates a DialogButton with the label and the action command actionCmd,
and add it to the dialog at South-East
Deprecated. V5R10 - Replaced by @href #addCATButtonIF
labelactionCmd
public void addButtonActionListener(ActionListener listener)
Adds an action listener instance to the subscriber list.
listener
public CATButtonIF addCATButtonIF(String label, String actionCmd)
Creates a CATButtonIF with the label and the action command actionCmd,
and add it to the dialog at South-East
labelactionCmd
public Button addLeftButton(String label, String actionCmd)
Creates a DialogButton with the label and the action command actionCmd,
and add it to the dialog at South-West
Deprecated. V5R10 - Replaced by @href #addLeftCATButtonIF
labelactionCmd
public CATButtonIF addLeftCATButtonIF(String label, String actionCmd)
Creates a CATButtonIF with the label and the action command actionCmd,
and add it to the dialog at South-West
labelactionCmd
public Button addRightButton(String label, String actionCmd)
Creates a DialogButton with the label and the action command actionCmd,
and add it to the dialog at South-East
Deprecated. V5R10 - Replaced by @href #addRightCATButtonIF
labelactionCmd
public CATButtonIF addRightCATButtonIF(String label, String actionCmd)
Creates a CATButtonIF with the label and the action command actionCmd,
and add it to the dialog at South-East
labelactionCmd
public void cleanup()
Cleans the Dialog : removes buttons and listeners
public void dispose()
Disposes of this dialog.
public Button getButton(String actionCmd)
Returns the button specified by its action command
Deprecated. V5R10 - Replaced by @href #getCATButtonIF
actionCmd
public Button[] getButtons()
Returns the list of buttons of the DialogBox
Deprecated. V5R10 - Replaced by @href #getCATButtonsIF
public CATButtonIF getCATButtonIF(String actionCmd)
Returns the button specified by its action command
actionCmd
public CATButtonIF[] getCATButtonsIF()
Returns the list of CATButtonIF of the DialogBox
public Container getContentPane()
This method is just here to give the dialog a 'add' mecanism similar to a swing JDialog
public void hide()
Hides this dialog.
public boolean isListenDefaultCommands()
Returns true if the Dialog Box listen to default command in order to close dialog for action
OK, CANCEL or CLOSE.
public void removeButtonActionListener(ActionListener listener)
Removes an action listener instance from the subscriber list
listener
public void setButtonsCombination(int buttonsType)
Sets the type of buttons combination display in the dialog
The possible combinations are OK_CANCEL, OK_CANCEL_PREVIEW, OK_APPLY_CLOSE and CLOSE
buttonsType
public void setCATButtonIFName()
public void setListenDefaultCommand(boolean flag)
Listens or not the default commands in order to close dialog for action OK, CANCEL or CLOSE.
flag
public void show()
Shows this dialog.