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
public static final int APPLY_BUTTON
Button: APPLY
public static final int CANCEL_BUTTON
Button: CANCEL
public static final int CLOSE
Style: Close button
public static final int CLOSE_BUTTON
Button: CLOSE
public static final int NONE
Style: No button
public static final int OK_BUTTON
Button: OK
public static final int OKCANCEL
Style: Ok/Cancel buttons
public static final int OKCANCELAPPLY
Style: Ok/Apply/Cancel buttons

Constructor Summary
CATDialogBox(CATDialog iParent, String iName)
Creates a dialog box with the specified parent and name.

Method Summary
public boolean getAPPLYEnable()
Determines whether if the APPLY button is enabled.
public CATNotification getAPPLYNotification()
Notification for the Apply button
public String getAPPLYTitle()
Returns the APPLY button label.
public CATDialog getButtons()
Returns the buttons container component.
public boolean getCANCELEnable()
Determines whether if the CANCEL button is enabled.
public CATNotification getCANCELNotification()
Notification for the Cancel button
public String getCANCELTitle()
Returns the CANCEL button label.
public CATNotification getCLOSENotification()
Notification for the Close button
public String getCLOSETitle()
Returns the CLOSE button label.
public CATDialog getCmdButtons()
Returns the buttons container component.
public CATDialog getContent()
Returns the child component that is the content of the dialog box.
public CATButton getDefaultButton()
Retrieves the default button in the DialogBox (may be null).
public boolean getOKEnable()
Determines whether if the OK button is enabled.
public CATNotification getOKNotification()
Notification for the OK button.
public String getOKTitle()
Returns the OK button label.
public boolean getPacked()
Determines whether this dialog box is packed to its minimum size or not.
public int getStyle()
Returns the dialog box current style.
public void setAPPLYEnable(boolean iEnable)
Enables/disables the APPLY button.
public void setAPPLYTitle(String iTitle)
Sets the APPLY button label.
public void setCANCELEnable(boolean iEnable)
Enables/disables the CANCEL button.
public void setCANCELTitle(String iTitle)
Sets the CANCEL button label.
public void setCLOSETitle(String iTitle)
Sets the CLOSE button label.
public void setDefaultButton(int iButton)
Defines the default button.
public void setOKEnable(boolean iEnable)
Enables/disables the OK button.
public void setOKTitle(String iTitle)
Sets the OK button label.
public void setPacked(boolean iPacked)
Enables/disables packing this dialog box to its minimum size.
public void setStyle(int iStyle)
Sets the dialog box style (that is the buttons to display).


Field Detail

APPLY_BUTTON

    public static final int APPLY_BUTTON
Button: APPLY


CANCEL_BUTTON

    public static final int CANCEL_BUTTON
Button: CANCEL


CLOSE

    public static final int CLOSE
Style: Close button


CLOSE_BUTTON

    public static final int CLOSE_BUTTON
Button: CLOSE


NONE

    public static final int NONE
Style: No button


OK_BUTTON

    public static final int OK_BUTTON
Button: OK


OKCANCEL

    public static final int OKCANCEL
Style: Ok/Cancel buttons


OKCANCELAPPLY

    public static final int OKCANCELAPPLY
Style: Ok/Apply/Cancel buttons


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

getAPPLYEnable

    public boolean getAPPLYEnable()

Determines whether if the APPLY button is enabled.

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

getAPPLYNotification

    public CATNotification getAPPLYNotification()

Notification for the Apply button

Return:
the APPLY button notification.

getAPPLYTitle

    public String getAPPLYTitle()

Returns the APPLY button label.

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

Return:
The button's title.

getButtons

    public CATDialog getButtons()

Returns the buttons container component.

Return:
The buttons container component.

getCANCELEnable

    public boolean getCANCELEnable()

Determines whether if the CANCEL button is enabled.

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

getCANCELNotification

    public CATNotification getCANCELNotification()

Notification for the Cancel button

Return:
the CANCEL button notification.

getCANCELTitle

    public String getCANCELTitle()

Returns the CANCEL button label.

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

Return:
The button's title.

getCLOSENotification

    public CATNotification getCLOSENotification()

Notification for the Close button

Return:
the CLOSE button notification.

getCLOSETitle

    public String getCLOSETitle()

Returns the CLOSE button label.

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

Return:
The button's title.

getCmdButtons

    public CATDialog getCmdButtons()

Returns the buttons container component.

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

getContent

    public CATDialog getContent()

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

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

getDefaultButton

    public CATButton getDefaultButton()

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

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

getOKEnable

    public boolean getOKEnable()

Determines whether if the OK button is enabled.

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

getOKNotification

    public CATNotification getOKNotification()

Notification for the OK button.

Return:
the OK button notification.

getOKTitle

    public String getOKTitle()

Returns the OK button label.

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

Return:
The button's title.

getPacked

    public boolean getPacked()

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

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

getStyle

    public int getStyle()

Returns the dialog box current style.

Return:
The dialog box current style.

setAPPLYEnable

    public 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.

setAPPLYTitle

    public 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.

setCANCELEnable

    public 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.

setCANCELTitle

    public 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

    public 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.

setDefaultButton

    public 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)

setOKEnable

    public 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.

setOKTitle

    public 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.

setPacked

    public 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.

setStyle

    public void setStyle(int iStyle)

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

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


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