LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingMessages

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingMessages
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalMessages, LyViewComponent, LyFreeInterface, LySwingComponent

public class LySwingMessages
extends LySwingObject
implements LySwingComponent, LyGraphicalMessages

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

A message bar can be used in a main window to provide the user with information about the displayed data (number of objects, printing in progress...).

See Also:
LyMessages

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingMessages(LyMessages messages)
          Class constructor of a Message bar object for the Swing target.
 
Method Summary
 void addMessage(java.awt.Component message, int size)
          Adds a message at the end of the panel with the specified size.
 void addMessage(LyMessage message, int pos)
          Adds a message to this message bar at its end.
 java.awt.Container createPanel()
          Creates the panel used to place all the messages.
 java.awt.Component getComponent()
          (non-Javadoc).
 void initialize()
          Initializes the graphic component and sets its background color.
 void removeMessage(java.awt.Component message)
          Removes a message from panel.
 void removeMessage(LyMessage message)
          Removes the specified message from this message bar.
 void setContent()
          Fills the panel with its messages.
 
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

LySwingMessages

public LySwingMessages(LyMessages messages)
Class constructor of a Message bar object for the Swing target.

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

createPanel

public java.awt.Container createPanel()
Creates the panel used to place all the messages.

Returns:
the panel for the messages

initialize

public void initialize()
Initializes the graphic component and sets its background color.


setContent

public void setContent()
Fills the panel with its messages.


removeMessage

public void removeMessage(java.awt.Component message)
Removes a message from panel.

Parameters:
message - the message to remove

addMessage

public void addMessage(LyMessage message,
                       int pos)
Adds a message to this message bar at its end.

Specified by:
addMessage in interface LyGraphicalMessages
Parameters:
message - the message to add
pos - the position is not used
See Also:
LyGraphicalMessages.addMessage(leon.view.LyMessage, int)

removeMessage

public void removeMessage(LyMessage message)
Removes the specified message from this message bar.

Specified by:
removeMessage in interface LyGraphicalMessages
Parameters:
message - the message to remove
See Also:
LyGraphicalMessages.removeMessage(leon.view.LyMessage)

addMessage

public void addMessage(java.awt.Component message,
                       int size)
Adds a message at the end of the panel with the specified size.

Parameters:
message - the message to add
size - the size of the message on the 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()

(c) January 2013 - W4 S.A.

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