LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingIcon

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.LySwingIcon
All Implemented Interfaces:
LyEventTransmitter, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalIcon, LyViewComponent, LyFreeInterface, LySetImageInterface, LySwingComponent

public class LySwingIcon
extends LySwingFieldItem
implements LySwingComponent, LyGraphicalIcon

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

An icon allows to define an image to which a text can be associated.

See Also:
LyIcon

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingIcon(LyIcon icon)
          Class constructor of an Icon object for the Swing target.
 
Method Summary
 java.awt.Component createIcon()
          Creates the swing icon.
 java.awt.Component getComponent()
          (non-Javadoc).
 java.awt.Image getImage()
          Gets the image displayed by this icon.
 void setImage(java.awt.Image image)
          Sets the image displayed by this icon.
 void setImage(java.lang.String image)
          Sets the new image of this icon from an image on the filesystem or in the resources.
 
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
Constructor Detail

LySwingIcon

public LySwingIcon(LyIcon icon)
Class constructor of an Icon object for the Swing target.

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

createIcon

public java.awt.Component createIcon()
Creates the swing icon.

Returns:
the default icon for this component

setImage

public void setImage(java.awt.Image image)
Sets the image displayed by this icon.

Parameters:
image - the image to use for the icon
See Also:
getImage()

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()

getImage

public java.awt.Image getImage()
Gets the image displayed by this icon.

Returns:
the image of the icon
See Also:
setImage(Image)

setImage

public void setImage(java.lang.String image)
Sets the new image of this icon from an image on the filesystem or in the resources.

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

(c) January 2013 - W4 S.A.

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