LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.component
Class LyAbstractMessageIconManager

java.lang.Object
  extended by leon.view.win.swing.component.LyAbstractMessageIconManager
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener
Direct Known Subclasses:
LyJMessageIcon._LyJMessageIconManager

public abstract class LyAbstractMessageIconManager
extends java.lang.Object
implements java.awt.event.MouseListener

This class manages a message icon component. This component is composed of a text message and an icon image. An action is triggered when this component is double clicked.


Field Summary
static java.lang.String __VERSION
           
 int IMAGE_HEIGHT
          Height of the icon image.
 int MESSAGE_GAP
          Size, in pixels, of the empty border around this message component.
 
Constructor Summary
LyAbstractMessageIconManager(LyEnvironment environment, java.lang.String text, java.lang.String image, LyMessage.Align align, java.awt.Component comp, LyActionListener listener)
          Creates and initializes a new message icon manager.
 
Method Summary
 java.awt.Dimension getPreferredSize()
          Gets the component preferred size.
 void mouseClicked(java.awt.event.MouseEvent e)
          Generates an action event for the associated listener when this icon component is double clicked.
 void mouseEntered(java.awt.event.MouseEvent e)
          Does nothing.
 void mouseExited(java.awt.event.MouseEvent e)
          Does nothing.
 void mousePressed(java.awt.event.MouseEvent e)
          Does nothing.
 void mouseReleased(java.awt.event.MouseEvent e)
          Does nothing.
 void setAlign(LyMessage.Align align)
          Sets the alignment policy of the message text.
 void setImage(java.lang.String image)
          Sets the image icon of the message component.
 void setText(java.lang.String text)
          Sets the text of the message component.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

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

IMAGE_HEIGHT

public final int IMAGE_HEIGHT
Height of the icon image.

See Also:
Constant Field Values

MESSAGE_GAP

public final int MESSAGE_GAP
Size, in pixels, of the empty border around this message component.

See Also:
Constant Field Values
Constructor Detail

LyAbstractMessageIconManager

public LyAbstractMessageIconManager(LyEnvironment environment,
                                    java.lang.String text,
                                    java.lang.String image,
                                    LyMessage.Align align,
                                    java.awt.Component comp,
                                    LyActionListener listener)
Creates and initializes a new message icon manager. Sets its attributes to the default values.

Parameters:
environment - the current environment
text - the text of the message component
image - the image associated to the icon
align - the alignment policy. One of the following:
  • LyMessage.Align.LEFT
  • LyMessage.Align.RIGHT
  • LyMessage.Align.CENTER
comp - the associated component for this manager
listener - the action listener used when double click event is sent.
Method Detail

setText

public void setText(java.lang.String text)
Sets the text of the message component.

Parameters:
text - the new text label

setImage

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

Parameters:
image - the new icon image

setAlign

public void setAlign(LyMessage.Align align)
Sets the alignment policy of the message text.

Parameters:
align - the new alignemnt policy
See Also:
_align

getPreferredSize

public java.awt.Dimension getPreferredSize()
Gets the component preferred size.

Returns:
the size of the message icon component depending on the image dimensions and its font metrics

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Does nothing.

Specified by:
mousePressed in interface java.awt.event.MouseListener
See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Generates an action event for the associated listener when this icon component is double clicked.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Does nothing.

Specified by:
mouseExited in interface java.awt.event.MouseListener
See Also:
MouseListener.mouseExited(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Does nothing.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Does nothing.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
See Also:
MouseListener.mouseEntered(java.awt.event.MouseEvent)

(c) January 2013 - W4 S.A.

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