LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingLabel

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingFieldItem
              extended by leon.view.win.swing.LySwingLabel
All Implemented Interfaces:
LyEventTransmitter, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalLabel, LyViewComponent, LyFreeInterface, LySetFontInterface, LySetImageInterface, LySetLabelInterface, LySwingComponent

public class LySwingLabel
extends LySwingFieldItem
implements LySwingComponent, LySetFontInterface, LyGraphicalLabel

This class implements a text shown as a label (as described in the dtd) for swing viewer.

An input field of label type allows to display a simple, non-editable label inside a form. It is used in the consultation forms to show different types of fields (date, number, choice,...). It can be made up of one or several lines. It does not comprise any element.

See Also:
LyLabel

Field Summary
static java.lang.String __VERSION
           
static int LABEL_BORDER
          Number of pixels of the border.
 
Constructor Summary
LySwingLabel(LyLabel label)
          Class constructor of a Label object for the Swing target.
 
Method Summary
 java.awt.Component createLabel(java.lang.String label, LyLabel.HAlign align)
          Creates the swing label component.
 java.awt.Component getComponent()
          (non-Javadoc).
 void setContent()
          Builds the component with the default properties of a label.
 void setFont(java.lang.String fontValue)
          Sets the font of the label component.
 void setImage(java.lang.String key)
          Sets the image of the component.
 void setLabel(java.lang.String label)
          Sets the text label.
 
Methods inherited from class leon.view.win.swing.LySwingFieldItem
getActionTransmitter, getSelectionTransmitter
 
Methods inherited from class leon.view.win.swing.LySwingObject
getBounds, getChildrenBounds, getDefaultFrame
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, free, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.graphic.LyGraphicalComponent
free, getViewComponent
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

LABEL_BORDER

public static int LABEL_BORDER
Number of pixels of the border.

Constructor Detail

LySwingLabel

public LySwingLabel(LyLabel label)
Class constructor of a Label object for the Swing target.

Parameters:
label - a LABEL component defined for every type of view targets. This label is initialized with the default values.
Method Detail

createLabel

public java.awt.Component createLabel(java.lang.String label,
                                      LyLabel.HAlign align)
Creates the swing label component.

Parameters:
label - the text displayed by this label
align - an int specifying the alignment of this label (LyLabel#H_Align.LEFT, LyLabel#H_Align.RIGHT or LyLabel#H_Align.CENTER)
Returns:
the new label

setContent

public void setContent()
Builds the component with the default properties of a label.


getComponent

public java.awt.Component getComponent()
(non-Javadoc).

Specified by:
getComponent in interface LySwingComponent
Overrides:
getComponent in class LySwingObject
Returns:
this Swing view component
See Also:
LySwingComponent.getComponent()

setLabel

public void setLabel(java.lang.String label)
Sets the text label.

Specified by:
setLabel in interface LyGraphicalLabel
Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - new label
See Also:
LySetLabelInterface.setLabel(String)

setFont

public void setFont(java.lang.String fontValue)
Sets the font of the label component.

Specified by:
setFont in interface LyGraphicalLabel
Specified by:
setFont in interface LySetFontInterface
Parameters:
fontValue - new font value
See Also:
LySetFontInterface.setFont(String)

setImage

public void setImage(java.lang.String key)
Sets the image of the component.

Specified by:
setImage in interface LyGraphicalLabel
Specified by:
setImage in interface LySetImageInterface
Parameters:
key - new image key
See Also:
LySetImageInterface.setImage(String)

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com