Package com.dassault_systemes.catjdialog

   
Class CATDialogBox

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjdialog.CATCallbackSource
        |
        +-com.dassault_systemes.catjdialog.CATDialog
              |
              +-com.dassault_systemes.catjdialog.CATDialogFrame
                    |
                    +-com.dassault_systemes.catjdialog.CATDialogBox
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATDialogBox

The dialog box graphical component.

Description:

This is a top-level container that: The application can be notified when any of the toolbar buttons is pressed.
The application can be notified when any of the control buttons is pressed.
This container supports only one child component, that is the content it will display.

CATDialogBox Properties:

CATDialogBox Notifications:

CATDialogBox Message Catalog Implicit Mappings:

   All Implemented Interfaces:
CATIDefaultButton
CATICmdButtons
Field Summary
int OK_BUTTON
int CANCEL_BUTTON
int APPLY_BUTTON
int CLOSE_BUTTON
int NONE
int OKCANCEL
int OKCANCELAPPLY
int CLOSE

Constructor Summary
CATDialogBox(CATDialog iParent, String iName)

Method Summary
boolean getPacked()
void setPacked(boolean iPacked)
void setDefaultButton(int iButton)
CATButton getDefaultButton()
void setOKEnable(boolean iEnable)
boolean getOKEnable()
void setCANCELEnable(boolean iEnable)
boolean getCANCELEnable()
void setAPPLYEnable(boolean iEnable)
boolean getAPPLYEnable()
void setAPPLYTitle(String iTitle)
void setOKTitle(String iTitle)
void setCANCELTitle(String iTitle)
void setCLOSETitle(String iTitle)
String getAPPLYTitle()
String getOKTitle()
String getCANCELTitle()
String getCLOSETitle()
int getStyle()
void setStyle(int iStyle)
CATDialog getCmdButtons()
CATDialog getButtons()
CATDialog getContent()
CATNotification getOKNotification()
CATNotification getCANCELNotification()
CATNotification getCLOSENotification()
CATNotification getAPPLYNotification()


Field Detail

OK_BUTTON

    int OK_BUTTON
Button: OK


CANCEL_BUTTON

    int CANCEL_BUTTON
Button: CANCEL


APPLY_BUTTON

    int APPLY_BUTTON
Button: APPLY


CLOSE_BUTTON

    int CLOSE_BUTTON
Button: CLOSE


NONE

    int NONE
Style: No button


OKCANCEL

    int OKCANCEL
Style: Ok/Cancel buttons


OKCANCELAPPLY

    int OKCANCELAPPLY
Style: Ok/Apply/Cancel buttons


CLOSE

    int CLOSE
Style: Close button


Constructor Detail

CATDialogBox

    CATDialogBox(CATDialog iParent, String iName)

Creates a dialog box with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This dialog box name. Here are some rules for this name:
  • It is set in the constructor, and cannot be changed afterwards.
  • The name must be unique for the parent (2 children with the same name are not allowed).
  • The name may not contain any ot the following characters: '.' (dot), ' ' (blank), '_' (underscore)

Method Detail

getPacked

    boolean getPacked()

Determines whether this dialog box is packed to its minimum size or not. Default is not packed.

Returns:
true if this dialog box is packed; false otherwise.

setPacked

    void setPacked(boolean iPacked)

Enables/disables packing this dialog box to its minimum size.

Parameters:
iPacked
If true, this dialog box is packed to its minimum size.

setDefaultButton

    void setDefaultButton(int iButton)

Defines the default button.

That causes the default button to be automatically triggered (as if it was pressed) when the user presses ENTER.

Parameters:
iButton
The button ID (OK_BUTTON, APPLY_BUTTON, CANCEL_BUTTON, CLOSE_BUTTON or 0 to set no default button)

getDefaultButton

    CATButton getDefaultButton()

Retrieves the default button in the DialogBox (may be null).

Returns:
The default button component if any.
See Also:
CATIDefaultButton#getDefaultButton()

setOKEnable

    void setOKEnable(boolean iEnable)

Enables/disables the OK button.

A disabled button doesn't fire its ButtonActivated notification.

Parameters:
iEnable
If true, the button is enabled; otherwise it is disabled.

getOKEnable

    boolean getOKEnable()

Determines whether if the OK button is enabled.

Returns:
true if the button is enabled; false otherwise.

setCANCELEnable

    void setCANCELEnable(boolean iEnable)

Enables/disables the CANCEL button.

A disabled button doesn't fire its ButtonActivated notification.

Parameters:
iEnable
If true, the button is enabled; otherwise it is disabled.

getCANCELEnable

    boolean getCANCELEnable()

Determines whether if the CANCEL button is enabled.

Returns:
true if the button is enabled; false otherwise.

setAPPLYEnable

    void setAPPLYEnable(boolean iEnable)

Enables/disables the APPLY button.

A disabled button doesn't fire its ButtonActivated notification.

Parameters:
iEnable
If true, the button is enabled; otherwise it is disabled.

getAPPLYEnable

    boolean getAPPLYEnable()

Determines whether if the APPLY button is enabled.

Returns:
true if the button is enabled; false otherwise.

setAPPLYTitle

    void setAPPLYTitle(String iTitle)

Sets the APPLY button label.

Calling this method overwrites programmatically the default NLS label ("Apply" in English).

Parameters:
iTitle
The string that is to be the button's title.

setOKTitle

    void setOKTitle(String iTitle)

Sets the OK button label.

Calling this method overwrites programmatically the default NLS label ("Ok" in English).

Parameters:
iTitle
The string that is to be the button's title.

setCANCELTitle

    void setCANCELTitle(String iTitle)

Sets the CANCEL button label.

Calling this method overwrites programmatically the default NLS label ("Cancel" in English).

Parameters:
iTitle
The string that is to be the button's title.

setCLOSETitle

    void setCLOSETitle(String iTitle)

Sets the CLOSE button label.

Calling this method overwrites programmatically the default NLS label ("Close" in English).

Parameters:
iTitle
The string that is to be the button's title.

getAPPLYTitle

    String getAPPLYTitle()

Returns the APPLY button label.

Returns the overwritting label (set by setAPPLYTitle() method) or the default label (NLS).

Returns:
The button's title.

getOKTitle

    String getOKTitle()

Returns the OK button label.

Returns the overwritting label (set by setOKTitle() method) or the default label (NLS).

Returns:
The button's title.

getCANCELTitle

    String getCANCELTitle()

Returns the CANCEL button label.

Returns the overwritting label (set by setCANCELTitle() method) or the default label (NLS).

Returns:
The button's title.

getCLOSETitle

    String getCLOSETitle()

Returns the CLOSE button label.

Returns the overwritting label (set by setCLOSETitle() method) or the default label (NLS).

Returns:
The button's title.

getStyle

    int getStyle()

Returns the dialog box current style.

Returns:
The dialog box current style.

setStyle

    void setStyle(int iStyle)

Sets the dialog box style (that is the buttons to display).

Parameters:
iStyle
A value among NONE, OKCANCEL, OKCANCELAPPLY, CLOSE.

getCmdButtons

    CATDialog getCmdButtons()

Returns the buttons container component.

Returns:
The buttons container component.
See Also:
CATICmdButtons#getCmdButtons()

getButtons

    CATDialog getButtons()

Returns the buttons container component.

Returns:
The buttons container component.

getContent

    CATDialog getContent()

Returns the child component that is the content of the dialog box.

Returns:
The top content component.
See Also:
CATIContentDialog#getContent()

getOKNotification

    CATNotification getOKNotification()

Notification for the OK button.

Returns:
the OK button notification.

getCANCELNotification

    CATNotification getCANCELNotification()

Notification for the Cancel button

Returns:
the CANCEL button notification.

getCLOSENotification

    CATNotification getCLOSENotification()

Notification for the Close button

Returns:
the CLOSE button notification.

getAPPLYNotification

    CATNotification getAPPLYNotification()

Notification for the Apply button

Returns:
the APPLY button notification.


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