LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsTree

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.struts.LyStrutsFieldItem
              extended by leon.view.web.struts.LyStrutsPanel
                  extended by leon.view.web.struts.LyStrutsTree
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalPanel, LyGraphicalTree, LyViewComponent, LyFreeInterface, LySetLabelInterface, LySetPopupMenuInterface, LySetVisibleInterface, LyWebComponent

public class LyStrutsTree
extends LyStrutsPanel
implements LyGraphicalTree, LySetVisibleInterface

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


TREE: Tree
A tree allows displaying a set of elements under the form of a tree. It is possible to specify its selection mode. Such a component is interesting to display a hierarchy of objects of an application. It allows not displaying some sub-sets of these objects.


Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsTree(LyTree tree)
          Constructor.
 
Method Summary
 java.lang.String getBackgroundHexColor()
          Gets the background color.
 int getScrollHeightForSplitter(LyWebPageWriter pw)
          Indicates whether this component needs scrollbars when inserted in a splitter.
 void initialize()
          Initialization method.
 boolean isRootVisible()
          Indicates whether the root node must be shown or not.
 void setActiveNode(java.lang.String activeNode)
          (non-Javadoc).
 void setColor(java.lang.String color)
          (non-Javadoc).
 void setFont(java.lang.String font)
          (non-Javadoc).
 void setForegroundColor(java.lang.String color)
          (non-Javadoc).
 void setHideRoot(boolean hideRoot)
          Indicates whether the root node must be shown or not.
 void setLabel(java.lang.String label)
          (non-Javadoc).
 void setTreeNode(LyTreeNode treeNode)
          (non-Javadoc).
 void setVisible(boolean status)
          (non-Javadoc).
 void writeHtml(LyWebPageWriter pw)
          (non-Javadoc).
 
Methods inherited from class leon.view.web.struts.LyStrutsPanel
getPopupMenuView, setPopupMenu
 
Methods inherited from class leon.view.web.struts.LyStrutsFieldItem
canDisabled, getCaption, getController, getFieldItem, getForm, getFormField, getFormName, getHtmlForm, getId, isEditable, isNetscape, isOptional, needCheck
 
Methods inherited from class leon.view.web.LyWebObject
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, free, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getUrl, getWebViewManager, refresh, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, getBounds, getChildrenBounds, getEnv, getEnvironment, getIdCode, getIntResource, 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

LyStrutsTree

public LyStrutsTree(LyTree tree)
Constructor.

Parameters:
tree - the tree component
Method Detail

getScrollHeightForSplitter

public int getScrollHeightForSplitter(LyWebPageWriter pw)
Description copied from class: LyWebObject
Indicates whether this component needs scrollbars when inserted in a splitter.

Overrides:
getScrollHeightForSplitter in class LyWebObject
Parameters:
pw - current page writer
Returns:
a positive value if this component needs scrollbars, a negative or null value otherwise.

initialize

public void initialize()
Initialization method.
Sets the background color and the node font.


setActiveNode

public void setActiveNode(java.lang.String activeNode)
(non-Javadoc).

Specified by:
setActiveNode in interface LyGraphicalTree
Parameters:
activeNode - New value of activeNode.
See Also:
LyGraphicalTree.setActiveNode(java.lang.String)

getBackgroundHexColor

public java.lang.String getBackgroundHexColor()
Gets the background color.

Returns:
the node background color

setHideRoot

public void setHideRoot(boolean hideRoot)
Indicates whether the root node must be shown or not.

Parameters:
hideRoot - true if root node must be hidden, false otherwise.

isRootVisible

public boolean isRootVisible()
Indicates whether the root node must be shown or not.

Returns:
true if root node must be shown, false otherwise.

writeHtml

public void writeHtml(LyWebPageWriter pw)
(non-Javadoc).

Specified by:
writeHtml in interface LyWebComponent
Parameters:
pw - the page writer
See Also:
LyWebComponent.writeHtml(leon.view.web.LyWebPageWriter)

setVisible

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

Specified by:
setVisible in interface LySetVisibleInterface
Parameters:
status - new visibility status, if true the component will be shown, if false it will be hiden
See Also:
LySetVisibleInterface.setVisible(boolean)

setTreeNode

public void setTreeNode(LyTreeNode treeNode)
(non-Javadoc).

Specified by:
setTreeNode in interface LyGraphicalTree
Parameters:
treeNode - New value of treeNode
See Also:
LyGraphicalTree.setTreeNode(leon.view.LyTreeNode)

setLabel

public void setLabel(java.lang.String label)
(non-Javadoc).

Specified by:
setLabel in interface LyGraphicalTree
Specified by:
setLabel in interface LySetLabelInterface
Overrides:
setLabel in class LyStrutsFieldItem
Parameters:
label - new label
See Also:
LyStrutsFieldItem.setLabel(java.lang.String)

setColor

public void setColor(java.lang.String color)
(non-Javadoc).

See Also:
LySetColorInterface.setColor(java.lang.String)

setFont

public void setFont(java.lang.String font)
(non-Javadoc).

See Also:
LySetFontInterface.setFont(java.lang.String)

setForegroundColor

public void setForegroundColor(java.lang.String color)
(non-Javadoc).

See Also:
leon.view.graphic.LyGraphicalTree#setForegroundColor(java.lang.String)

(c) January 2013 - W4 S.A.

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