LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingDictionary

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.LySwingDictionary
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LySelectionListener, LyGetValueInterface, LyGraphicalComponent, LyGraphicalDictionary, LyGraphicalFieldItem, LyViewComponent, LyFreeInterface, LySetEditableInterface, LySetEnabledInterface, LySetEntryInterface, LySwingComponent

public class LySwingDictionary
extends LySwingFieldItem
implements LyGraphicalDictionary, LySelectionListener, LyActionListener, LySetEntryInterface, LySetEnabledInterface, LySetEditableInterface, LyGetValueInterface

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

An input field of dictionary type allows to display a graphical component containing a combo with a tree.

See Also:
LyDictionary

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingDictionary(LyDictionary dico)
          Class constructor of a Dictionary object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 void free()
          (non-Javadoc).
 java.awt.Component getComponent()
          (non-Javadoc).
 java.lang.String getDisplayedValue()
          Gets the current values for all the dictionary entries, separated with LyString.VISIBLE_SEP2.
 java.lang.String getValue()
          Gets the current ids for all the dictionary entries, separated with LyString.SEP.
 void initialize()
          Initializes this component.
 void selectionPerformed(LySelectionEvent selectionEvent)
          Checks or unchecks the selected element in this dictionary.
 void setContent()
          Fills the tree with the dictionary entries.
 void setEditable(boolean status)
          (non-Javadoc).
 void setEnabled(boolean status)
          (non-Javadoc).
 void setEntry(LyEntry entry)
          Sets the root entry of the tree.
 void update()
          Updates the current component.
 
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, 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
getViewComponent
 

Field Detail

__VERSION

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

LySwingDictionary

public LySwingDictionary(LyDictionary dico)
Class constructor of a Dictionary object for the Swing target.

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

initialize

public void initialize()
Initializes this component. The tree component is created and populated with the dictionary entries. Then it is placed inside a popup selector.


free

public void free()
(non-Javadoc).

Specified by:
free in interface LyGraphicalComponent
Specified by:
free in interface LyFreeInterface
Overrides:
free in class LyGraphicalObject
See Also:
LyFreeInterface.free()

setContent

public void setContent()
Fills the tree with the dictionary entries.


update

public void update()
Updates the current component.


setEntry

public void setEntry(LyEntry entry)
Sets the root entry of the tree.

Specified by:
setEntry in interface LyGraphicalDictionary
Specified by:
setEntry in interface LySetEntryInterface
Parameters:
entry - the new root entry
See Also:
LyGraphicalDictionary.setEntry(LyEntry)

getValue

public java.lang.String getValue()
Gets the current ids for all the dictionary entries, separated with LyString.SEP.

Specified by:
getValue in interface LyGetValueInterface
Returns:
the value as a string

getDisplayedValue

public java.lang.String getDisplayedValue()
Gets the current values for all the dictionary entries, separated with LyString.VISIBLE_SEP2.

Returns:
the value as a string

selectionPerformed

public void selectionPerformed(LySelectionEvent selectionEvent)
Checks or unchecks the selected element in this dictionary. This method checks every dictionary entry to find the selected one, thus the selectionEvent parameter is never used and may be null.

Specified by:
selectionPerformed in interface LySelectionListener
Parameters:
selectionEvent - description of the selection which has occured
See Also:
LySelectionListener.selectionPerformed(leon.view.event.LySelectionEvent)

actionPerformed

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

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

setEnabled

public void setEnabled(boolean status)
(non-Javadoc).

Specified by:
setEnabled in interface LySetEnabledInterface
See Also:
LySetEnabledInterface.setEnabled(boolean)

setEditable

public void setEditable(boolean status)
(non-Javadoc).

Specified by:
setEditable in interface LySetEditableInterface
See Also:
LySetEditableInterface.setEditable(boolean)

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