LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingTree

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.LySwingPanel
                  extended by leon.view.win.swing.LySwingTree
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LySelectionListener, LyGetLockInterface, LyIsIdleInterface, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalPanel, LyGraphicalTree, LyViewComponent, LyFreeInterface, LySetIdleInterface, LySetLabelInterface, LySetPopupMenuInterface, LySetWaitingInterface, LySwingComponent

public class LySwingTree
extends LySwingPanel
implements LySwingComponent, LyActionListener, LySelectionListener, LySetWaitingInterface, LyGraphicalTree, LyIsIdleInterface, LySetIdleInterface, LyGetLockInterface

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

A tree allows to display a set of elements under the form of a tree. It is possible to specify its selection mode (none, simple, multiple or sensitive).

Such a component is interesting to display a hierarchy of objects of an application. It allows to not display some sub-sets of these objects.

See Also:
LySwingTree

Nested Class Summary
 class LySwingTree._LyTreeComponentAdapter
          Handles component resize and checks if minimum sizes are valid.
 
Field Summary
static java.lang.String __VERSION
           
static java.awt.Dimension MINIMUM_SIZE
          Minimum size for the viewport.
 
Constructor Summary
LySwingTree(LyTree tree)
          Class constructor of a Tree object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 LyActionTransmitter getActionTransmitter()
          (non-Javadoc).
 java.awt.Component getComponent()
          (non-Javadoc).
 java.lang.Object getLock()
          Get a lock on the table to prevent concurrent access on rows
 LySelectionTransmitter getSelectionTransmitter()
          (non-Javadoc).
 void initialize()
          Initializes the tree component cell renderers, fonts and colors, then register its events listeners.
 boolean isIdle()
          Returns the idle mode of this tree.
 void selectionPerformed(LySelectionEvent selectionEvent)
          (non-Javadoc).
 void setActiveNode(java.lang.String activeNode)
          This tree doesn't have active nodes.
 void setColor(java.lang.String color)
          This implementation does not set the tree background color yet.
 void setContent()
          The tree is empty, thus this content setting doesn't do anything.
 void setFont(java.lang.String font)
          This implementation does not set the font yet.
 void setForegroundColor(java.lang.String color)
          This implementation does not set the tree foreground color yet.
 void setIdle(boolean status)
          (non-Javadoc).
 void setLabel(java.lang.String label)
          This implementation does not set the tree title label.
 void setPopupMenu(LyPopupMenu popupMenu)
          Adds the specified popup menu to the tree component and shows it.
 void setTreeNode(LyTreeNode treeNode)
          Sets the root tree node.
 void setWaiting(boolean status)
          Sets the waiting status of the swing tree component.
 
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

MINIMUM_SIZE

public static java.awt.Dimension MINIMUM_SIZE
Minimum size for the viewport.

Constructor Detail

LySwingTree

public LySwingTree(LyTree tree)
Class constructor of a Tree object for the Swing target.

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

initialize

public void initialize()
Initializes the tree component cell renderers, fonts and colors, then register its events listeners.


setContent

public void setContent()
The tree is empty, thus this content setting doesn't do anything.


setLabel

public void setLabel(java.lang.String label)
This implementation does not set the tree title label.

Specified by:
setLabel in interface LyGraphicalTree
Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - new label, not used in this implementation
See Also:
LySetLabelInterface.setLabel(java.lang.String)

setColor

public void setColor(java.lang.String color)
This implementation does not set the tree background color yet.

Parameters:
color - value of background color, not used

setFont

public void setFont(java.lang.String font)
This implementation does not set the font yet.

Parameters:
font - value of label font, not used

setForegroundColor

public void setForegroundColor(java.lang.String color)
This implementation does not set the tree foreground color yet.

Parameters:
color - value of foreground color, not used

setTreeNode

public void setTreeNode(LyTreeNode treeNode)
Sets the root tree node.

Specified by:
setTreeNode in interface LyGraphicalTree
Parameters:
treeNode - new node at the top level of the tree
See Also:
LyGraphicalTree.setTreeNode(LyTreeNode)

actionPerformed

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

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

selectionPerformed

public void selectionPerformed(LySelectionEvent selectionEvent)
(non-Javadoc).

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

setWaiting

public void setWaiting(boolean status)
Sets the waiting status of the swing tree component. This waiting status changes the cursor on the component (LySwingViewManager.DEFAULT_CURSOR or LySwingViewManager.WAIT_CURSOR) as well as the enabled property of this tree.

Specified by:
setWaiting in interface LySetWaitingInterface
Parameters:
status - the waiting status to use on this tree component
See Also:
LySetWaitingInterface.setWaiting(boolean)

setIdle

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

Specified by:
setIdle in interface LySetIdleInterface
Parameters:
status - new idle status (LySetIdleInterface interface)
See Also:
LySetIdleInterface.setIdle(boolean)

setPopupMenu

public void setPopupMenu(LyPopupMenu popupMenu)
Adds the specified popup menu to the tree component and shows it.

Specified by:
setPopupMenu in interface LySetPopupMenuInterface
Overrides:
setPopupMenu in class LySwingPanel
Parameters:
popupMenu - the popup menu to show
See Also:
LySetPopupMenuInterface.setPopupMenu(LyPopupMenu)

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()
(non-Javadoc).

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

setActiveNode

public void setActiveNode(java.lang.String activeNode)
This tree doesn't have active nodes. This method don't do anything.

Specified by:
setActiveNode in interface LyGraphicalTree
Parameters:
activeNode - node to activate. Not used in this implementation.
See Also:
LyGraphicalTree.setActiveNode(java.lang.String)

isIdle

public boolean isIdle()
Returns the idle mode of this tree.

Specified by:
isIdle in interface LyIsIdleInterface
Returns:
current idle status
See Also:
LyIsIdleInterface.isIdle()

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

getLock

public java.lang.Object getLock()
Get a lock on the table to prevent concurrent access on rows

Specified by:
getLock in interface LyGetLockInterface
Returns:
a valid lock for synchronized()

(c) January 2013 - W4 S.A.

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