Class TmfTreeViewerEntry
java.lang.Object
org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry
- All Implemented Interfaces:
ITmfTreeViewerEntry
- Direct Known Subclasses:
TmfGenericTreeEntry
Basic implementation of an entry for the TMF tree viewer. A name is all that is needed for this entry.
- Author:
- Geneviève Bastien
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(TmfTreeViewerEntry child) Add a child entry to this oneList<@NonNull ITmfTreeViewerEntry> Returns the child elements of this entry.getName()Returns the name of this entry.Returns the parent of this entry, ornullif it has none.booleanReturns whether this entry has children.voidUpdate the entry nametoString()
-
Constructor Details
-
TmfTreeViewerEntry
Constructor- Parameters:
name- The name of this entry
-
-
Method Details
-
getParent
Description copied from interface:ITmfTreeViewerEntryReturns the parent of this entry, ornullif it has none.- Specified by:
getParentin interfaceITmfTreeViewerEntry- Returns:
- the parent element, or
nullif it has none
-
hasChildren
public boolean hasChildren()Description copied from interface:ITmfTreeViewerEntryReturns whether this entry has children.- Specified by:
hasChildrenin interfaceITmfTreeViewerEntry- Returns:
trueif the given element has children, andfalseif it has no children
-
getChildren
Description copied from interface:ITmfTreeViewerEntryReturns the child elements of this entry.- Specified by:
getChildrenin interfaceITmfTreeViewerEntry- Returns:
- an array of child elements
-
getName
Description copied from interface:ITmfTreeViewerEntryReturns the name of this entry.- Specified by:
getNamein interfaceITmfTreeViewerEntry- Returns:
- the entry name
-
setName
Update the entry name- Parameters:
name- the updated entry name
-
addChild
Add a child entry to this one- Parameters:
child- The child entry
-
toString
-