LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingHRef

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.LySwingHRef
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalHRef, LyViewComponent, LyFreeInterface, LySetImageInterface, LySetLabelInterface, LySetSensitiveInterface, LySetVisitedInterface, LySwingComponent

public class LySwingHRef
extends LySwingFieldItem
implements LySwingComponent, LyGraphicalHRef, LyActionListener

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

An input field of Hyperlink type allows to display a graphical component containing an hyperlink. This link allows to launch an action by a simple click. It does not contain any element.

See Also:
LyLabel

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingHRef(LyHRef hRef)
          Class constructor of a HRef object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 java.awt.Component createHRefComponent(java.lang.String label, java.awt.Image image, java.awt.Font font, boolean isVisited, boolean isSensitive, LyHRef hRef, java.awt.Color disable, java.awt.Color color, java.awt.Color highlight, java.awt.Color visited)
          Creates and configures a Hyper Text Reference component with the specified parameters.
 LyActionTransmitter getActionTransmitter()
          (non-Javadoc).
 java.awt.Component getComponent()
          (non-Javadoc).
 LySelectionTransmitter getSelectionTransmitter()
          This HRef link doesn't handle selection events, so it has no selection transmitter.
 void setContent()
          Builds the component and registers its events.
 void setImage(java.lang.String image)
          Sets the new image.
 void setLabel(java.lang.String label)
          Sets the label of the HRef link.
 void setSensitive(boolean sensitive)
          (non-Javadoc).
 void setVisited(boolean visited)
          (Modification) Accessor (LySetVisitedInterface interface).
 
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

LySwingHRef

public LySwingHRef(LyHRef hRef)
Class constructor of a HRef object for the Swing target.

Parameters:
hRef - a HREF component defined for every type of view targets. This component is initialized with the href requesites.
Method Detail

createHRefComponent

public java.awt.Component createHRefComponent(java.lang.String label,
                                              java.awt.Image image,
                                              java.awt.Font font,
                                              boolean isVisited,
                                              boolean isSensitive,
                                              LyHRef hRef,
                                              java.awt.Color disable,
                                              java.awt.Color color,
                                              java.awt.Color highlight,
                                              java.awt.Color visited)
Creates and configures a Hyper Text Reference component with the specified parameters.

Parameters:
label - the text displayed by this reference
image - the image displayed by this reference
font - the font used to display the label
isVisited - true if the link has already been visited
isSensitive - the sensitive property of the link
hRef - the underlying data used to properly configure this reference
disable - the disable color
color - the normal color
highlight - the color used to display text when cursor is over the reference
visited - the visited color
Returns:
the new hypertext component

setContent

public void setContent()
Builds the component and registers its events.


actionPerformed

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

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

getActionTransmitter

public LyActionTransmitter getActionTransmitter()
(non-Javadoc).

Specified by:
getActionTransmitter in interface LyEventTransmitter
Overrides:
getActionTransmitter in class LySwingFieldItem
Returns:
the action transmitter of this component
See Also:
LyEventTransmitter.getActionTransmitter()

getSelectionTransmitter

public LySelectionTransmitter getSelectionTransmitter()
This HRef link doesn't handle selection events, so it has no selection transmitter.

Specified by:
getSelectionTransmitter in interface LyEventTransmitter
Overrides:
getSelectionTransmitter in class LySwingFieldItem
Returns:
null
See Also:
LyEventTransmitter.getSelectionTransmitter()

setLabel

public void setLabel(java.lang.String label)
Sets the label of the HRef link.

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

setImage

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

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

setSensitive

public void setSensitive(boolean sensitive)
(non-Javadoc).

Specified by:
setSensitive in interface LyGraphicalHRef
Specified by:
setSensitive in interface LySetSensitiveInterface
Parameters:
sensitive - Boolean indicating if attribute sensitive is set or unset.
See Also:
LySetSensitiveInterface.setSensitive(boolean)

setVisited

public void setVisited(boolean visited)
(Modification) Accessor (LySetVisitedInterface interface).

Specified by:
setVisited in interface LyGraphicalHRef
Specified by:
setVisited in interface LySetVisitedInterface
Parameters:
visited - Boolean indicating if attribute visited is set or unset.

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