Package com.dassault_systemes.catjdialog

   
Class CATCheckBox

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

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATCheckBox

The checkbox graphical component.

Description:

This is a labeled graphical component that can be in either an "on" (true) or "off" (false) state. Clicking on a checkbox toggles its state. The application can be notified when its state changes.

CATCheckBox Properties:

CATCheckBox Notifications:

CATCheckBox Message Catalog Implicit Mappings:

Field Summary

Constructor Summary
CATCheckBox(CATDialog iDialog, String iName)
Creates a checkbox with the specified parent and name.

Method Summary
public boolean getEnable()
Determines whether this checkbox is enabled or not.
public boolean getState()
Returns the checkbox state.
public CATNotification getStateChangedNotification()
Returns the checkbox state changed notification.
public String getTitle()
Returns the checkbox title.
public void setEnable(boolean iEnable)
Enables or disables this checkbox.
public void setState(boolean iState)
Sets the checkbox state.
public void setTitle(String iTitle)
Sets the checkbox title.


Field Detail

Constructor Detail

CATCheckBox

    CATCheckBox(CATDialog iDialog, String iName)

Creates a checkbox with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This checkbox 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

getEnable

    public boolean getEnable()

Determines whether this checkbox is enabled or not.

Return:
true if this checkbox is enabled; false otherwise.

getState

    public boolean getState()

Returns the checkbox state.

Return:
true if this checkbox state is "on"; false otherwise.

getStateChangedNotification

    public CATNotification getStateChangedNotification()

Returns the checkbox state changed notification.

This notification is sent when the checkbox is ticked or unticked.

Return:
The checkbox state changed notification.

getTitle

    public String getTitle()

Returns the checkbox title.

Returns the programmatic value if setTitle() has been called, or tries to retrieve its title from the associated message catalog file (<checkbox_path>.Title entry).

Return:
This checkbox title.

setEnable

    public void setEnable(boolean iEnable)

Enables or disables this checkbox.

A disabled checkbox state can't be changed by the user and doesn't fire its StateChanged notification.

Parameters:
iEnable
If true, this checkbox is enabled; otherwise it is disabled.

setState

    public void setState(boolean iState)

Sets the checkbox state.

Parameters:
iState
true to set it to the "on" state; false to set it to "off"

setTitle

    public void setTitle(String iTitle)

Sets the checkbox title.

Calling this method sets programmatically the title. This should be reserved for cases where the title can only be determined by dynamic means.
The standard way of defining components messages is using CATNls catalog files (supports NLS).

Parameters:
iTitle
The string that is to be this checkbox's title.


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