LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyTreeNode

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyTreeNode
All Implemented Interfaces:
LyGetIdInterface, LyGetLabelInterface, LySetColorInterface, LySetFontInterface, LySetHiddenInterface, LySetImageInterface, LySetLabelInterface, LySetSelectedInterface, LySetValidityInterface

public class LyTreeNode
extends LyComponent
implements LyGetIdInterface, LyGetLabelInterface, LySetLabelInterface, LySetSelectedInterface, LySetHiddenInterface, LySetImageInterface, LySetValidityInterface, LySetFontInterface, LySetColorInterface

The LyTreeNode class is a generated Java implementation that corresponds to the element TREE_NODE of the descriptive grammar of the views (views.dtd). <TREE_NODE> : Tree node A tree node can contain a set of nodes (this node is then called parent node of these last ones). It is possible to assign a label and several images to a tree node, and to indicate if it is selected, valid or open. It is also possible to indicate the font and the different colors of the node.

See Also:
See also tag TREE_NODE of grammar leon_views.dtd.

Nested Class Summary
static class LyTreeNode.Validity
          Possible values for attribute 'validity'.
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyTreeNode()
          Default constructor.
 
Method Summary
 void addImage(LyImage image)
          Adds a sub-component image.
 void addTreeNode(LyTreeNode treeNode)
          Adds a sub-component treeNode.
 LyComponent cloneComponent()
          Method for cloning a component.
 java.lang.String getClosedDirImage()
          Gets value of closedDirImage.
 java.lang.String getColor()
          Gets value of color.
 java.lang.String getEmptyCheckboxImage()
          Gets value of emptyCheckboxImage.
 java.lang.String getFont()
          Gets value of font.
 java.lang.String getFontColor()
          Gets value of fontColor.
 java.lang.String getId()
          Gets value of id.
 java.lang.String getImage()
          Gets value of image.
 LyImage getImage(int i)
          Get sub-component Image of index i.
 int getImageCount()
          Get sub-component Image count.
 java.lang.String getInactiveSelectedBackgroundColor()
          Gets value of inactiveSelectedBackgroundColor.
 java.lang.String getLabel()
          Gets value of label.
 java.lang.String getOpenDirImage()
          Gets value of openDirImage.
 java.lang.String getSelectedBackgroundColor()
          Gets value of selectedBackgroundColor.
 java.lang.String getSelectedCheckboxImage()
          Gets value of selectedCheckboxImage.
 java.lang.String getSelectedFontColor()
          Gets value of selectedFontColor.
 LyTreeNode getTemplate()
          Gets value of template.
 java.lang.String getTooltip()
          Gets value of tooltip.
 LyTreeNode getTreeNode(int i)
          Get sub-component TreeNode of index i.
 int getTreeNodeCount()
          Get sub-component TreeNode count.
 LyTreeNode.Validity getValidity()
          Gets value of validity.
static LyTreeNode.Validity getValidity(java.lang.String token)
          Utility method to get validity value from a string.
 void insertImage(LyImage image, int pos)
          Inserts a sub-component image at given position.
 void insertTreeNode(LyTreeNode treeNode, int pos)
          Inserts a sub-component treeNode at given position.
 boolean isDefaultClosedDirImage()
          Checks whether the closedDirImage attribute is valuated to the default value.
 boolean isDefaultColor()
          Checks whether the color attribute is valuated to the default value.
 boolean isDefaultEmptyCheckboxImage()
          Checks whether the emptyCheckboxImage attribute is valuated to the default value.
 boolean isDefaultFont()
          Checks whether the font attribute is valuated to the default value.
 boolean isDefaultFontColor()
          Checks whether the fontColor attribute is valuated to the default value.
 boolean isDefaultInactiveSelectedBackgroundColor()
          Checks whether the inactiveSelectedBackgroundColor attribute is valuated to the default value.
 boolean isDefaultOpenDirImage()
          Checks whether the openDirImage attribute is valuated to the default value.
 boolean isDefaultSelectedBackgroundColor()
          Checks whether the selectedBackgroundColor attribute is valuated to the default value.
 boolean isDefaultSelectedCheckboxImage()
          Checks whether the selectedCheckboxImage attribute is valuated to the default value.
 boolean isDefaultSelectedFontColor()
          Checks whether the selectedFontColor attribute is valuated to the default value.
 boolean isExpandable()
          Checks if value of attribute expandable is set.
 boolean isHidden()
          Checks if value of attribute hidden is set.
 boolean isOpen()
          Checks if value of attribute open is set.
 boolean isSelected()
          Checks if value of attribute selected is set.
 void removeImage(LyImage image)
          Removes a sub-component image.
 void removeTreeNode(LyTreeNode treeNode)
          Removes a sub-component treeNode.
 void setClosedDirImage(java.lang.String closedDirImage)
          Initializes attribute closedDirImage to the given value.
 void setColor(java.lang.String color)
          Sets attribute color to the given value.
 void setEmptyCheckboxImage(java.lang.String emptyCheckboxImage)
          Initializes attribute emptyCheckboxImage to the given value.
 void setExpandable(boolean expandable)
          Sets attribute expandable to the given value.
 void setFont(java.lang.String font)
          Sets attribute font to the given value.
 void setFontColor(java.lang.String fontColor)
          Initializes attribute fontColor to the given value.
 void setHidden(boolean hidden)
          Sets attribute hidden to the given value.
 void setId(java.lang.String id)
          Initializes attribute id to the given value.
 void setImage(java.lang.String image)
          Sets attribute image to the given value.
 void setInactiveSelectedBackgroundColor(java.lang.String inactiveSelectedBackgroundColor)
          Initializes attribute inactiveSelectedBackgroundColor to the given value.
 void setLabel(java.lang.String label)
          Sets attribute label to the given value.
 void setOpen(boolean open)
          Sets attribute open to the given value.
 void setOpenDirImage(java.lang.String openDirImage)
          Initializes attribute openDirImage to the given value.
 void setSelected(boolean selected)
          Sets attribute selected to the given value.
 void setSelectedBackgroundColor(java.lang.String selectedBackgroundColor)
          Initializes attribute selectedBackgroundColor to the given value.
 void setSelectedCheckboxImage(java.lang.String selectedCheckboxImage)
          Initializes attribute selectedCheckboxImage to the given value.
 void setSelectedFontColor(java.lang.String selectedFontColor)
          Initializes attribute selectedFontColor to the given value.
 void setTemplate(LyTreeNode template)
          Initializes attribute template to the given value.
 void setTooltip(java.lang.String tooltip)
          Sets attribute tooltip to the given value.
 void setValidity(LyTreeNode.Validity validity)
          Sets attribute validity to the given value.
 void writeXml(java.io.PrintWriter pw, boolean debug)
          Method to rewrite XML corresponding to this component.
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, free, freeze, getBounds, getChild, getChildCount, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEnvironment, getEventFunctions, getIdCode, getInternalId, getInternalView, getInternalView, getLock, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, reset, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, setVisible, useEventDefaultFunction, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

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

LyTreeNode

public LyTreeNode()
Default constructor.

Method Detail

getValidity

public static final LyTreeNode.Validity getValidity(java.lang.String token)
Utility method to get validity value from a string.

Parameters:
token - Token string
Returns:
Validity value corresponding to this token

cloneComponent

public LyComponent cloneComponent()
Method for cloning a component.

Specified by:
cloneComponent in class LyComponent

getId

public java.lang.String getId()
Gets value of id.

Specified by:
getId in interface LyGetIdInterface
Overrides:
getId in class LyComponent
Returns:
value of id.

getTemplate

public LyTreeNode getTemplate()
Gets value of template.

Returns:
value of template.

getLabel

public java.lang.String getLabel()
Gets value of label.

Specified by:
getLabel in interface LyGetLabelInterface
Returns:
value of label.

getTooltip

public java.lang.String getTooltip()
Gets value of tooltip.

Returns:
value of tooltip.

isSelected

public boolean isSelected()
Checks if value of attribute selected is set.

Returns:
true if selected is set, false otherwise.

isOpen

public boolean isOpen()
Checks if value of attribute open is set.

Returns:
true if open is set, false otherwise.

isHidden

public boolean isHidden()
Checks if value of attribute hidden is set.

Returns:
true if hidden is set, false otherwise.

isExpandable

public boolean isExpandable()
Checks if value of attribute expandable is set.

Returns:
true if expandable is set, false otherwise.

getImage

public java.lang.String getImage()
Gets value of image.

Returns:
value of image.

getValidity

public LyTreeNode.Validity getValidity()
Gets value of validity.

Returns:
value of validity.

getFont

public java.lang.String getFont()
Gets value of font.

Returns:
value of font.

isDefaultFont

public boolean isDefaultFont()
Checks whether the font attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getColor

public java.lang.String getColor()
Gets value of color.

Returns:
value of color.

isDefaultColor

public boolean isDefaultColor()
Checks whether the color attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getFontColor

public java.lang.String getFontColor()
Gets value of fontColor.

Returns:
value of fontColor.

isDefaultFontColor

public boolean isDefaultFontColor()
Checks whether the fontColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getSelectedBackgroundColor

public java.lang.String getSelectedBackgroundColor()
Gets value of selectedBackgroundColor.

Returns:
value of selectedBackgroundColor.

isDefaultSelectedBackgroundColor

public boolean isDefaultSelectedBackgroundColor()
Checks whether the selectedBackgroundColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getInactiveSelectedBackgroundColor

public java.lang.String getInactiveSelectedBackgroundColor()
Gets value of inactiveSelectedBackgroundColor.

Returns:
value of inactiveSelectedBackgroundColor.

isDefaultInactiveSelectedBackgroundColor

public boolean isDefaultInactiveSelectedBackgroundColor()
Checks whether the inactiveSelectedBackgroundColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getSelectedFontColor

public java.lang.String getSelectedFontColor()
Gets value of selectedFontColor.

Returns:
value of selectedFontColor.

isDefaultSelectedFontColor

public boolean isDefaultSelectedFontColor()
Checks whether the selectedFontColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getEmptyCheckboxImage

public java.lang.String getEmptyCheckboxImage()
Gets value of emptyCheckboxImage.

Returns:
value of emptyCheckboxImage.

isDefaultEmptyCheckboxImage

public boolean isDefaultEmptyCheckboxImage()
Checks whether the emptyCheckboxImage attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getSelectedCheckboxImage

public java.lang.String getSelectedCheckboxImage()
Gets value of selectedCheckboxImage.

Returns:
value of selectedCheckboxImage.

isDefaultSelectedCheckboxImage

public boolean isDefaultSelectedCheckboxImage()
Checks whether the selectedCheckboxImage attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getOpenDirImage

public java.lang.String getOpenDirImage()
Gets value of openDirImage.

Returns:
value of openDirImage.

isDefaultOpenDirImage

public boolean isDefaultOpenDirImage()
Checks whether the openDirImage attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getClosedDirImage

public java.lang.String getClosedDirImage()
Gets value of closedDirImage.

Returns:
value of closedDirImage.

isDefaultClosedDirImage

public boolean isDefaultClosedDirImage()
Checks whether the closedDirImage attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getImage

public LyImage getImage(int i)
Get sub-component Image of index i.

Parameters:
i - the index of the Image to get.
Returns:
sub-component Image of index i.

getImageCount

public int getImageCount()
Get sub-component Image count.

Returns:
sub-component Image count.

getTreeNode

public LyTreeNode getTreeNode(int i)
Get sub-component TreeNode of index i.

Parameters:
i - the index of the TreeNode to get.
Returns:
sub-component TreeNode of index i.

getTreeNodeCount

public int getTreeNodeCount()
Get sub-component TreeNode count.

Returns:
sub-component TreeNode count.

setId

public void setId(java.lang.String id)
Initializes attribute id to the given value.

Parameters:
id - New value of id.

setTemplate

public void setTemplate(LyTreeNode template)
Initializes attribute template to the given value.

Parameters:
template - New value of template.

setLabel

public void setLabel(java.lang.String label)
Sets attribute label to the given value.

Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - New value of label.

setTooltip

public void setTooltip(java.lang.String tooltip)
Sets attribute tooltip to the given value.

Parameters:
tooltip - New value of tooltip.

setSelected

public void setSelected(boolean selected)
Sets attribute selected to the given value.

Specified by:
setSelected in interface LySetSelectedInterface
Parameters:
selected - Boolean indicating if attribute selected is set or unset.

setOpen

public void setOpen(boolean open)
Sets attribute open to the given value.

Parameters:
open - Boolean indicating if attribute open is set or unset.

setHidden

public void setHidden(boolean hidden)
Sets attribute hidden to the given value.

Specified by:
setHidden in interface LySetHiddenInterface
Parameters:
hidden - Boolean indicating if attribute hidden is set or unset.

setExpandable

public void setExpandable(boolean expandable)
Sets attribute expandable to the given value.

Parameters:
expandable - Boolean indicating if attribute expandable is set or unset.

setImage

public void setImage(java.lang.String image)
Sets attribute image to the given value.

Specified by:
setImage in interface LySetImageInterface
Parameters:
image - New value of image.

setValidity

public void setValidity(LyTreeNode.Validity validity)
Sets attribute validity to the given value.

Specified by:
setValidity in interface LySetValidityInterface
Parameters:
validity - New value of validity.
Throws:
java.lang.IllegalArgumentException - if validity parameter is null.

setFont

public void setFont(java.lang.String font)
Sets attribute font to the given value.

Specified by:
setFont in interface LySetFontInterface
Parameters:
font - New value of font.

setColor

public void setColor(java.lang.String color)
Sets attribute color to the given value.

Specified by:
setColor in interface LySetColorInterface
Parameters:
color - New value of color.

setFontColor

public void setFontColor(java.lang.String fontColor)
Initializes attribute fontColor to the given value.

Parameters:
fontColor - New value of fontColor.

setSelectedBackgroundColor

public void setSelectedBackgroundColor(java.lang.String selectedBackgroundColor)
Initializes attribute selectedBackgroundColor to the given value.

Parameters:
selectedBackgroundColor - New value of selectedBackgroundColor.

setInactiveSelectedBackgroundColor

public void setInactiveSelectedBackgroundColor(java.lang.String inactiveSelectedBackgroundColor)
Initializes attribute inactiveSelectedBackgroundColor to the given value.

Parameters:
inactiveSelectedBackgroundColor - New value of inactiveSelectedBackgroundColor.

setSelectedFontColor

public void setSelectedFontColor(java.lang.String selectedFontColor)
Initializes attribute selectedFontColor to the given value.

Parameters:
selectedFontColor - New value of selectedFontColor.

setEmptyCheckboxImage

public void setEmptyCheckboxImage(java.lang.String emptyCheckboxImage)
Initializes attribute emptyCheckboxImage to the given value.

Parameters:
emptyCheckboxImage - New value of emptyCheckboxImage.

setSelectedCheckboxImage

public void setSelectedCheckboxImage(java.lang.String selectedCheckboxImage)
Initializes attribute selectedCheckboxImage to the given value.

Parameters:
selectedCheckboxImage - New value of selectedCheckboxImage.

setOpenDirImage

public void setOpenDirImage(java.lang.String openDirImage)
Initializes attribute openDirImage to the given value.

Parameters:
openDirImage - New value of openDirImage.

setClosedDirImage

public void setClosedDirImage(java.lang.String closedDirImage)
Initializes attribute closedDirImage to the given value.

Parameters:
closedDirImage - New value of closedDirImage.

addImage

public void addImage(LyImage image)
Adds a sub-component image.

Parameters:
image - The image to add to images list.

insertImage

public void insertImage(LyImage image,
                        int pos)
Inserts a sub-component image at given position.

Parameters:
image - The image to add to images list.
pos - Position where the sub-component is inserted.

removeImage

public void removeImage(LyImage image)
Removes a sub-component image.

Parameters:
image - The image to remove to images list.
Throws:
java.lang.IllegalStateException - if images list is empty.
java.lang.IllegalArgumentException - if images list doesn't contain image.

addTreeNode

public void addTreeNode(LyTreeNode treeNode)
Adds a sub-component treeNode.

Parameters:
treeNode - The treeNode to add to treeNodes list.

insertTreeNode

public void insertTreeNode(LyTreeNode treeNode,
                           int pos)
Inserts a sub-component treeNode at given position.

Parameters:
treeNode - The treeNode to add to treeNodes list.
pos - Position where the sub-component is inserted.

removeTreeNode

public void removeTreeNode(LyTreeNode treeNode)
Removes a sub-component treeNode.

Parameters:
treeNode - The treeNode to remove to treeNodes list.
Throws:
java.lang.IllegalStateException - if treeNodes list is empty.
java.lang.IllegalArgumentException - if treeNodes list doesn't contain treeNode.

writeXml

public void writeXml(java.io.PrintWriter pw,
                     boolean debug)
Method to rewrite XML corresponding to this component.

Specified by:
writeXml in class LyComponent
Parameters:
pw - the printWriter on which the XML is written.
debug - true if debug mode (full dump).

(c) January 2013 - W4 S.A.

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