Package com.dassault_systemes.catjdialog

   
Class CATLabel

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

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATLabel

The label graphical component.

Description:

A label displays a single line of read-only text and/or an image. The text can be changed by the application, but a user cannot edit it directly.

CATLabel Properties:

CATLabel Notifications:

CATLabel Message Catalog Implicit Mappings:

Field Summary

Constructor Summary
CATLabel(CATDialog iDialog, String iName)
CATLabel(CATDialog iDialog, String iName, int iLevel)

Method Summary
String getTitle()
void setTitle(String iTitle)
boolean hasTitle()
int getLevel()
void setLevel(int iLevel)
String getImage()
void setImage(String iImage)
boolean hasImage()
String getTooltip()
void setTooltip(String iTooltip)


Field Detail

Constructor Detail

CATLabel

    CATLabel(CATDialog iDialog, String iName)

Creates a label with the specified parent and name. Level is 0.

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

CATLabel

    CATLabel(CATDialog iDialog, String iName, int iLevel)

Creates a label with the specified parent, name and level.

Parameters:
iParent
The parent component.
iName
This label name.
iLevel
This label level.

Method Detail

getTitle

    String getTitle()

Returns the label title.

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

Returns:
This label title.

setTitle

    void setTitle(String iTitle)

Sets the label title.

Calling this method sets programmatically the text. 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 label's title.

hasTitle

    boolean hasTitle()

Determines whether this label has a title or not.

Returns:
true if this label has a title; false otherwise.

getLevel

    int getLevel()

Returns the label level.

Returns:
The label level.

setLevel

    void setLevel(int iLevel)

Sets the label level.

0 for default, 1 biggest, >1 smaller.

Parameters:
iLevel
The label level.

getImage

    String getImage()

Returns the image resource URI.

Returns:
The image resource URI. It may be null (it means no image).

setImage

    void setImage(String iImage)

Sets the image resource URI.

Parameters:
iImage
An image resource URI. It can be either a relative path from the resources/graphic directory of the runtime view, or a full URL to an image resource. A null value unsets the image in this label.

hasImage

    boolean hasImage()

Determines whether this label has an image or not.

Returns:
true if this label has an image; false otherwise.

getTooltip

    String getTooltip()

Returns the label's tooltip.

Returns the programmatic value if setTooltip() has been called, or tries to retrieve its value from the associated message catalog file (<label_path>.Tooltip entry).

Returns:
This label tooltip.

setTooltip

    void setTooltip(String iTooltip)

Sets the label's tooltip.

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

Parameters:
iTooltip
The string that is to be this label's tooltip.


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