Class TreeNode
- java.lang.Object
-
- net.ssehub.easy.producer.ui.productline_editor.instantiator.TreeNode
-
- Direct Known Subclasses:
ElementTreeNode,RuleTreeNode,TextTreeNode
abstract class TreeNode extends java.lang.ObjectA display tree node.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTreeNode.InsertableLanguage elements to be inserted.(package private) static classTreeNode.InsertionPointDenotes insertion points around this node.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) TreeNode[]getChildren()Returns the children.(package private) org.eclipse.swt.graphics.ImagegetImage()Returns the display image.(package private) TreeNodegetParent()Returns the parent node.(package private) abstract java.lang.StringgetText()Returns the display text.(package private) booleanhasChildren()Returns whether this node has children.(package private) voidsetChildren(TreeNode[] children)Defines the children.(package private) abstract TreeNode.InsertionPointsupportedInsertionPoint(TreeNode.Insertable insertable)Returns the supported insertion point within the tree forinsertable.
-
-
-
Constructor Detail
-
TreeNode
TreeNode(TreeNode parent, org.eclipse.swt.graphics.Image image)
Creates a tree node.- Parameters:
parent- the parent nodeimage- the image of the node (may be null)
-
-
Method Detail
-
getParent
TreeNode getParent()
Returns the parent node.- Returns:
- the parent node (may be null)
-
setChildren
void setChildren(TreeNode[] children)
Defines the children.- Parameters:
children- the children
-
hasChildren
boolean hasChildren()
Returns whether this node has children.- Returns:
trueif this node has children,falseelse
-
getChildren
TreeNode[] getChildren()
Returns the children.- Returns:
- the children (may be null)
-
getImage
org.eclipse.swt.graphics.Image getImage()
Returns the display image.- Returns:
- the display image (may be null)
-
getText
abstract java.lang.String getText()
Returns the display text.- Returns:
- the display text
-
supportedInsertionPoint
abstract TreeNode.InsertionPoint supportedInsertionPoint(TreeNode.Insertable insertable)
Returns the supported insertion point within the tree forinsertable.- Parameters:
insertable- the element to be inserted- Returns:
- the supported rule insertion point
-
-