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

Framework : PortalBase

Module : PLBbase

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

APPLY_CMD

    public static final String APPLY_CMD


CANCEL_CMD

    public static final String CANCEL_CMD


CLOSE

    public static final int CLOSE


CLOSE_CMD

    public static final String CLOSE_CMD


counterButton

    public int counterButton


currentButtonsCombi

    protected int currentButtonsCombi
current buttons combination


leftButtonsPanel

    protected Panel leftButtonsPanel
south west panel for buttons


listOfButton

    protected Vector listOfButton
contains the list of button (CATButtonIF) created and added to the dialog


listOfButton_old

    protected Vector listOfButton_old
contains the list of button (Button) created and added to the dialog

Deprecated. V5R10


OK_APPLY_CLOSE

    public static final int OK_APPLY_CLOSE


OK_CANCEL

    public static final int OK_CANCEL
Specifies the type of buttons combination


OK_CANCEL_PREVIEW

    public static final int OK_CANCEL_PREVIEW


OK_CMD

    public static final String OK_CMD
The actions command associated to default buttons


PREVIEW_CMD

    public static final String PREVIEW_CMD


rightButtonsPanel

    protected Panel rightButtonsPanel
south east panel for buttons


workarea

    protected Panel workarea
the area that will contain dialog components (no button)


Constructor Detail

DialogBox

    DialogBox(Frame parent)

Constructor

Parameters:
parent
- the owner of the dialog

DialogBox

    DialogBox(Frame parent, boolean modal)

Constructor

Parameters:
parent
- the owner of the dialog
modal
- if true, dialog blocks input to the parent window when shown

DialogBox

    DialogBox(Frame parent, String title)

Constructor

Parameters:
parent
- the owner of the dialog
title
- the title of the dialog

DialogBox

    DialogBox(Frame parent, String title, boolean modal)

Constructor

Parameters:
parent
- the owner of the dialog
title
- the title of the dialog
modal
- if true, dialog blocks input to the parent window when shown

DialogBox

    DialogBox(Frame parent, String title, boolean modal, boolean useSettings)

Constructor

Parameters:
parent
- the owner of the dialog
title
- the title of the dialog
modal
- if true, dialog blocks input to the parent window when shown
useSettings
- if true, the size and the location of the dialog are read in the settings

DialogBox

    DialogBox(Window parent, String title)

Parameters:
parent
- The owner of the Dialog, Can be a window
title
- the title of the dialog

Method Detail

addButton

    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

Parameters:
label
- the label of the button to create
actionCmd
- the action command associated to the button to create

addButtonActionListener

    public void addButtonActionListener(ActionListener listener)

Adds an action listener instance to the subscriber list.

Parameters:
listener
- an ActionListener that will be notified when an action occured on a button.

addCATButtonIF

    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

Parameters:
label
- the label of the button to create
actionCmd
- the action command associated to the button to create
Return:
a button interface
See Also:
CATButtonIF

addLeftButton

    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

Parameters:
label
- the label of the button to create
actionCmd
- the action command associated to the button to create

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

Parameters:
label
- the label of the button to create
actionCmd
- the action command associated to the button to create
Return:
a button interface
See Also:
CATButtonIF

addRightButton

    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

Parameters:
label
- the label of the button to create
actionCmd
- the action command associated to the button to create

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

Parameters:
label
- the label of the button to create
actionCmd
- the action command associated to the button to create
Return:
a button interface
See Also:
CATButtonIF

cleanup

    public void cleanup()

Cleans the Dialog : removes buttons and listeners


dispose

    public void dispose()

Disposes of this dialog.


getButton

    public Button getButton(String actionCmd)

Returns the button specified by its action command

Deprecated. V5R10 - Replaced by @href #getCATButtonIF

Parameters:
actionCmd
- the action command of the searched button

getButtons

    public Button[] getButtons()

Returns the list of buttons of the DialogBox

Deprecated. V5R10 - Replaced by @href #getCATButtonsIF


getCATButtonIF

    public CATButtonIF getCATButtonIF(String actionCmd)

Returns the button specified by its action command

Parameters:
actionCmd
- the action command of the searched button
Return:
a button interface
See Also:
CATButtonIF

getCATButtonsIF

    public CATButtonIF[] getCATButtonsIF()

Returns the list of CATButtonIF of the DialogBox

Return:
a button interface list
See Also:
CATButtonIF

getContentPane

    public Container getContentPane()

This method is just here to give the dialog a 'add' mecanism similar to a swing JDialog

Return:
simply the container.

hide

    public void hide()

Hides this dialog.


isListenDefaultCommands

    public boolean isListenDefaultCommands()

Returns true if the Dialog Box listen to default command in order to close dialog for action OK, CANCEL or CLOSE.


removeButtonActionListener

    public void removeButtonActionListener(ActionListener listener)

Removes an action listener instance from the subscriber list

Parameters:
listener
- The ActionListener to remove.

setButtonsCombination

    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

Parameters:
buttonsType
- the type of buttons combination

setCATButtonIFName

    public void setCATButtonIFName()


setListenDefaultCommand

    public void setListenDefaultCommand(boolean flag)

Listens or not the default commands in order to close dialog for action OK, CANCEL or CLOSE.

Parameters:
flag
- the boolean flag

show

    public void show()

Shows this dialog.



Copyright © 2000, Dassault Systèmes. All rights reserved