|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.win.swing.LySwingObject
leon.view.win.swing.LySwingTreeNode
public class LySwingTreeNode
This class implements the Tree Node object (as described in the dtd) for swing viewer.
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.
LyTreeNode
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingTreeNode(LyTreeNode node)
Class constructor of a Tree node object for the Swing target. |
Method Summary | |
---|---|
void |
addImage(LyImage image,
int pos)
(non-Javadoc). |
void |
addTreeNode(LyTreeNode treeNode,
int pos)
Adds the specified node at the specified index. |
void |
computeTreeNodeValidity(LyComponent node)
Computes the subtree validity. |
LyJTreeElementImpl._LyNodeContent |
getContent()
Gets the content of this tree node tree element. |
int |
getHeightFactor()
Returns the height factor. |
java.lang.String |
getId()
Gets the identifier of this tree node. |
java.lang.String |
getLabel()
Gets this tree node label. |
javax.swing.tree.DefaultMutableTreeNode |
getMutableTreeNode()
Accessor to the internal mutable tree node. |
LyTreeNode |
getRootTreeNode(LyTreeNode treeNode)
Accesses to the top level tree node. |
LyJTreeElement |
getTreeElement()
Gets the tree element of this tree node. |
LyTreeNode |
getTreeNode()
Gets this tree node description. |
javax.swing.tree.TreePath |
getTreePath()
Returns a TreePath for this node. |
void |
initialize()
Initializes the content of this node. |
boolean |
isOpen()
Indicates if this tree node is opened or not. |
boolean |
isSelected()
Indicates if this tree node is selected or not. |
void |
removeImage(LyImage image)
(non-Javadoc). |
void |
removeTreeNode(LyTreeNode treeNode)
Removes the specified node. |
void |
setColor(java.lang.String color)
Nothing is done in this method. |
void |
setContent()
Builds the links to children nodes. |
void |
setExpandable(boolean expandable)
Sets the expandable attribute. |
void |
setFont(java.lang.String font)
Nothing is done in this method. |
void |
setForegroundColor(java.lang.String color)
Nothing is done in this method. |
void |
setHeightFactor(int factor)
Sets the height factor of this current node. |
void |
setHidden(boolean hidden)
(non-Javadoc). |
void |
setImage(java.lang.String key)
(non-Javadoc). |
void |
setLabel(java.lang.String label)
Sets the label of the title bar. |
void |
setOpen(boolean status)
(non-Javadoc). |
void |
setSelected(boolean status)
(non-Javadoc). |
void |
setTooltip(java.lang.String tooltip)
Updates attribute tooltip to the given value. |
void |
setTree(LyJTreeComponent tree)
Sets the treeComponent that display this node. |
void |
setValidity(LyTreeNode.Validity validity)
(non-Javadoc). |
void |
treeCollapsed(javax.swing.event.TreeExpansionEvent event)
Nothing is done when the tree is collapsed. |
void |
treeExpanded(javax.swing.event.TreeExpansionEvent event)
Nothing is done when the tree is expanded. |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getComponent, 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 |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySwingTreeNode(LyTreeNode node)
node
- a TREE_NODE component defined for every type of view targets. This tree node is
initialized for the swing view and filled with its default values.Method Detail |
---|
public void initialize()
public void setContent()
getContent()
public LyJTreeElement getTreeElement()
public void addTreeNode(LyTreeNode treeNode, int pos)
addTreeNode
in interface LyGraphicalTreeNode
treeNode
- the node to addpos
- the position of the insertionLyGraphicalTreeNode.addTreeNode(LyTreeNode, int)
public void removeTreeNode(LyTreeNode treeNode)
removeTreeNode
in interface LyGraphicalTreeNode
treeNode
- the node to removeLyGraphicalTreeNode.removeTreeNode(LyTreeNode)
public void setTree(LyJTreeComponent tree)
tree
- the value of the tree componentpublic void setLabel(java.lang.String label)
setLabel
in interface LyGraphicalTreeNode
setLabel
in interface LySetLabelInterface
label
- new labelgetLabel()
,
LySetLabelInterface.setLabel(String)
public void setSelected(boolean status)
setSelected
in interface LyGraphicalTreeNode
setSelected
in interface LySetSelectedInterface
status
- true to indactes that the component is selected, false otherwiseLySetSelectedInterface.setSelected(boolean)
public void setOpen(boolean status)
setOpen
in interface LyGraphicalTreeNode
status
- Boolean indicating if attribute open is set or unset.LyGraphicalTreeNode.setOpen(boolean)
public void setHidden(boolean hidden)
setHidden
in interface LyGraphicalTreeNode
setHidden
in interface LySetHiddenInterface
hidden
- Boolean indicating if attribute hidden is set or unset.LySetHiddenInterface.setHidden(boolean)
public void setImage(java.lang.String key)
setImage
in interface LyGraphicalTreeNode
setImage
in interface LySetImageInterface
key
- of the image in the properties or image pathLySetImageInterface.setImage(java.lang.String)
public void setColor(java.lang.String color)
setColor
in interface LyGraphicalTreeNode
setColor
in interface LySetColorInterface
color
- value of background color, not used herepublic void setFont(java.lang.String font)
setFont
in interface LyGraphicalTreeNode
setFont
in interface LySetFontInterface
font
- value of label fontpublic void setForegroundColor(java.lang.String color)
color
- value of foreground colorpublic LyTreeNode getTreeNode()
public javax.swing.tree.TreePath getTreePath()
public javax.swing.tree.DefaultMutableTreeNode getMutableTreeNode()
public LyJTreeElementImpl._LyNodeContent getContent()
setContent()
public java.lang.String getId()
public java.lang.String getLabel()
setLabel(String)
public boolean isSelected()
public boolean isOpen()
public void setHeightFactor(int factor)
factor
- the new height factorgetHeightFactor()
public int getHeightFactor()
setHeightFactor(int)
public void addImage(LyImage image, int pos)
addImage
in interface LyGraphicalTreeNode
image
- The images to add to images list.pos
- Position where the sub-component is inserted.LyGraphicalTreeNode.addImage(leon.view.LyImage, int)
public void removeImage(LyImage image)
removeImage
in interface LyGraphicalTreeNode
image
- The images to remove to images list.LyGraphicalTreeNode.removeImage(leon.view.LyImage)
public void setValidity(LyTreeNode.Validity validity)
setValidity
in interface LyGraphicalTreeNode
setValidity
in interface LySetValidityInterface
validity
- New value of validity.leon.view.setinterface.LySetValidityInterface#setValidity(java.lang.String)
public void computeTreeNodeValidity(LyComponent node)
node
- the current nodeleon.view.swt.widgets.LyTreeElement#computeTreeNodeValidity(leon.view.LyComponent)
public LyTreeNode getRootTreeNode(LyTreeNode treeNode)
treeNode
- the tree node
public void treeExpanded(javax.swing.event.TreeExpansionEvent event)
treeExpanded
in interface javax.swing.event.TreeExpansionListener
event
- the TreeExpansionEvent
, not used in this implementationTreeExpansionListener.treeExpanded(javax.swing.event.TreeExpansionEvent)
public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
treeCollapsed
in interface javax.swing.event.TreeExpansionListener
event
- the TreeExpansionEvent
, not used in this implementationTreeExpansionListener.treeCollapsed(javax.swing.event.TreeExpansionEvent)
public void setExpandable(boolean expandable)
setExpandable
in interface LyGraphicalTreeNode
expandable
- not used in this implementation yetLyGraphicalTreeNode.setExpandable(boolean)
public void setTooltip(java.lang.String tooltip)
LyGraphicalTreeNode
setTooltip
in interface LyGraphicalTreeNode
tooltip
- New value of tooltip.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |