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
int OK_CANCEL
int OK_CANCEL_PREVIEW
int OK_APPLY_CLOSE
int CLOSE
String OK_CMD
String CANCEL_CMD
String APPLY_CMD
String PREVIEW_CMD
String CLOSE_CMD
int currentButtonsCombi
Panel workarea
Panel leftButtonsPanel
Panel rightButtonsPanel
Vector listOfButton
Vector listOfButton_old
int counterButton

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

Method Summary
void setButtonsCombination(int buttonsType)
Button addButton(String label, String actionCmd)
CATButtonIF addCATButtonIF(String label, String actionCmd)
Button addRightButton(String label, String actionCmd)
CATButtonIF addRightCATButtonIF(String label, String actionCmd)
Button addLeftButton(String label, String actionCmd)
CATButtonIF addLeftCATButtonIF(String label, String actionCmd)
Button[] getButtons()
CATButtonIF[] getCATButtonsIF()
void setCATButtonIFName()
Button getButton(String actionCmd)
CATButtonIF getCATButtonIF(String actionCmd)
boolean isListenDefaultCommands()
void setListenDefaultCommand(boolean flag)
void addButtonActionListener(ActionListener listener)
void removeButtonActionListener(ActionListener listener)
void dispose()
void show()
void hide()
void cleanup()
Container getContentPane()


Field Detail

OK_CANCEL

    int OK_CANCEL
Specifies the type of buttons combination


OK_CANCEL_PREVIEW

    int OK_CANCEL_PREVIEW


OK_APPLY_CLOSE

    int OK_APPLY_CLOSE


CLOSE

    int CLOSE


OK_CMD

    String OK_CMD
The actions command associated to default buttons


CANCEL_CMD

    String CANCEL_CMD


APPLY_CMD

    String APPLY_CMD


PREVIEW_CMD

    String PREVIEW_CMD


CLOSE_CMD

    String CLOSE_CMD


currentButtonsCombi

    int currentButtonsCombi
current buttons combination


workarea

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


leftButtonsPanel

    Panel leftButtonsPanel
south west panel for buttons


rightButtonsPanel

    Panel rightButtonsPanel
south east panel for buttons


listOfButton

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


listOfButton_old

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

Deprecated. V5R10


counterButton

    int counterButton


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

Method Detail

setButtonsCombination

    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

addButton

    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

addCATButtonIF

    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
Returns:
a button interface
See Also:
CATButtonIF

addRightButton

    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

    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
Returns:
a button interface
See Also:
CATButtonIF

addLeftButton

    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

    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
Returns:
a button interface
See Also:
CATButtonIF

getButtons

    Button[] getButtons()

Returns the list of buttons of the DialogBox

Deprecated. V5R10 - Replaced by @href #getCATButtonsIF


getCATButtonsIF

    CATButtonIF[] getCATButtonsIF()

Returns the list of CATButtonIF of the DialogBox

Returns:
a button interface list
See Also:
CATButtonIF

setCATButtonIFName

    void setCATButtonIFName()


getButton

    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

getCATButtonIF

    CATButtonIF getCATButtonIF(String actionCmd)

Returns the button specified by its action command

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

isListenDefaultCommands

    boolean isListenDefaultCommands()

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


setListenDefaultCommand

    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

addButtonActionListener

    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.

removeButtonActionListener

    void removeButtonActionListener(ActionListener listener)

Removes an action listener instance from the subscriber list

Parameters:
listener
- The ActionListener to remove.

dispose

    void dispose()

Disposes of this dialog.


show

    void show()

Shows this dialog.


hide

    void hide()

Hides this dialog.


cleanup

    void cleanup()

Cleans the Dialog : removes buttons and listeners


getContentPane

    Container getContentPane()

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

Returns:
simply the container.


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