LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingMessage

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingMessage
All Implemented Interfaces:
LyActionListener, LyGraphicalComponent, LyGraphicalMessage, LyViewComponent, LyFreeInterface, LySetImageInterface, LySetLabelInterface, LySwingComponent

public class LySwingMessage
extends LySwingObject
implements LySwingComponent, LyGraphicalMessage, LyActionListener

This class implements the Message object (as described in the dtd) for swing viewer.

A message is placed inside a message bar. It allows to display a text and an image.

See Also:
LySwingMessage

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingMessage(LyMessage message)
          Class constructor of a Message object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 java.awt.Container createBorderPanel(LyMessages.Border border)
          Creates a bordered panel used to contain this message.
 java.awt.Component createMessageIcon(LyEnvironment env, java.lang.String label, java.lang.String image, LyMessage.Align align, LyActionListener listener)
          Creates the icon associated with this message.
 java.awt.Component getComponent()
          (non-Javadoc).
 java.awt.Component getMessage()
          Returns message component.
 void setContent()
          Sets the content of this message component.
 void setImage(java.lang.String image)
          Sets the new message icon.
 void setLabel(java.lang.String label)
          Sets the text of the this message icon panel.
 
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
Constructor Detail

LySwingMessage

public LySwingMessage(LyMessage message)
Class constructor of a Message object for the Swing target.

Parameters:
message - a MESSAGE component defined for every type of view targets. This message component is initialized specificaly for the Swing view.
Method Detail

createBorderPanel

public java.awt.Container createBorderPanel(LyMessages.Border border)
Creates a bordered panel used to contain this message.

Parameters:
border - the type of the border. One of the following:
  • LyMessages#Border.NONE
  • LyMessages#Border.SOLID
  • LyMessages#Border.IN
  • LyMessages#Border.OUT
  • LyMessages#Border.RAISED
  • LyMessages#Border.LOWERED
Returns:
the new border panel

createMessageIcon

public java.awt.Component createMessageIcon(LyEnvironment env,
                                            java.lang.String label,
                                            java.lang.String image,
                                            LyMessage.Align align,
                                            LyActionListener listener)
Creates the icon associated with this message.

Parameters:
env - the current environment
label - message of the component
image - image name of the icon
align - alignment of the icon
listener - action listener to use on the component
Returns:
the message icon component

setContent

public void setContent()
Sets the content of this message component. Creates the message icon panel and adds it to this border panel.


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 of the this message icon panel.

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

setImage

public void setImage(java.lang.String image)
Sets the new message icon.

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

actionPerformed

public void actionPerformed(LyActionEvent actionEvent)
(non-Javadoc).

Specified by:
actionPerformed in interface LyActionListener
See Also:
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)

getMessage

public java.awt.Component getMessage()
Returns message component.

Returns:
the current message component

(c) January 2013 - W4 S.A.

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