LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingHRefs

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.LySwingHRefs
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalHRefs, LyViewComponent, LyFreeInterface, LySetHRefsInterface, LySwingComponent

public class LySwingHRefs
extends LySwingFieldItem
implements LySwingComponent, LyGraphicalHRefs, LyActionListener

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

An input field of Hyperlinks type allows to display a graphical component containing a set of hyperlinks. Such a component is a simple list of hyperlinks. It does not contain any attribute.

See Also:
LyLabel

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingHRefs(LyHRefs hRefs)
          Class constructor of a HRefs object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 void addHRef(LyHRef hRef, int pos)
          Adds an hRef to this hRefs list.
 void addHRefComponent(java.awt.Container cont, java.awt.Component comp, int index)
          Adds a HRefComponent in this container.
 LyJHRefContainer createHRefContainer(java.awt.Color background)
          Creates the container used to place all the HRefComponents.
 java.awt.Component getComponent()
          (non-Javadoc).
 java.awt.Component getHRefComponent(int index, LyJHRefContainer hRefCont)
          Gets the HRefComponent at position index.
 int getHRefComponentCount(LyJHRefContainer hRefCont)
          Gets the current count of HRefComponents.
 LyHRef getUserData(java.awt.Component hRefComp)
          Gets the underlying data used to build hRefComponent.
 void removeAll()
          Removes all the hRefs from the hRefs list.
 void removeHRef(LyHRef hRef)
          Removes the specified hRef from the hRefs list.
 void removeHRefComponent(java.awt.Container cont, java.awt.Component comp)
          Removes a HRefComponent from its container.
 void setContent()
          Fills with HRefs.
 
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

LySwingHRefs

public LySwingHRefs(LyHRefs hRefs)
Class constructor of a HRefs object for the Swing target.

Parameters:
hRefs - a HREFS component defined for every type of view targets. This hyperlink component list is filled with the hRefs it contains.
Method Detail

createHRefContainer

public LyJHRefContainer createHRefContainer(java.awt.Color background)
Creates the container used to place all the HRefComponents.

Parameters:
background - the background color of the container
Returns:
a new component for the HRefComponents

getUserData

public LyHRef getUserData(java.awt.Component hRefComp)
Gets the underlying data used to build hRefComponent.

Parameters:
hRefComp - the HRef component
Returns:
the HRef used by the specified component

getHRefComponentCount

public int getHRefComponentCount(LyJHRefContainer hRefCont)
Gets the current count of HRefComponents.

Parameters:
hRefCont - the HRef container
Returns:
the number of HRef component contained on the specified container

getHRefComponent

public java.awt.Component getHRefComponent(int index,
                                           LyJHRefContainer hRefCont)
Gets the HRefComponent at position index.

Parameters:
index - the position of the HRef component in the container
hRefCont - the HRef container
Returns:
the HRef component at the given position in the container

addHRefComponent

public void addHRefComponent(java.awt.Container cont,
                             java.awt.Component comp,
                             int index)
Adds a HRefComponent in this container.

Parameters:
cont - the place to add the component
comp - the component to add
index - the position where to add the component in the container

removeHRefComponent

public void removeHRefComponent(java.awt.Container cont,
                                java.awt.Component comp)
Removes a HRefComponent from its container.

Parameters:
cont - HRef container of all the HRef components
comp - HRef component to remove

setContent

public void setContent()
Fills with HRefs.


actionPerformed

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

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

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

addHRef

public void addHRef(LyHRef hRef,
                    int pos)
Adds an hRef to this hRefs list.

Specified by:
addHRef in interface LyGraphicalHRefs
Specified by:
addHRef in interface LySetHRefsInterface
Parameters:
hRef - The hRefs to add to hRefs list.
pos - Position where the sub-component is inserted.
See Also:
LyGraphicalHRefs.addHRef(LyHRef, int)

removeHRef

public void removeHRef(LyHRef hRef)
Removes the specified hRef from the hRefs list.

Specified by:
removeHRef in interface LyGraphicalHRefs
Specified by:
removeHRef in interface LySetHRefsInterface
Parameters:
hRef - The hRefs to remove to hRefs list.
See Also:
LyGraphicalHRefs.removeHRef(LyHRef)

removeAll

public void removeAll()
Removes all the hRefs from the hRefs list.


(c) January 2013 - W4 S.A.

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