|
Class: HierarchyNode
Object
|
+--HierarchyNode
- Package:
- stx:libwidg2
- Category:
- Interface-Support
- Version:
- rev:
1.20
date: 2018/04/17 17:00:59
- user: stefan
- file: HierarchyNode.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- W. Olberding AEG Factory Automation
class to build up tree like structures to represent
file-trees, class tress etc.
Especially suited for use with SelectionInHierarchy and
SelectionInHierarchyView.
See examples in SelectionInHierarchyView.
Notice: this class (together with SelectionInHierarchy and
SelectionInHierarchyView) has been obsoleted by
corresponding SelectionInTree* classes.
These provide similar (but more) functionality.
SelectionInHierarchy
SelectionInHierarchyView
SelectionInTree
SelectionInTreeView
TreeItem
instance creation
-
new
-
-
newAsTreeFromSmalltalkClass: aClass
-
create a tree of nodes with aClass and all its
subclasses as contents.
-
newAsTreeFromSmalltalkClass: aClass level: level
-
create a tree of nodes with aClass and all its
subclasses as contents. Set the initial level as given.
-
newWithName: aString
-
create a new node with a name
-
newWithName: aString andId: anId
-
create a new node with a name and id
accessing
-
childCollectionClass: aCollectionClass
-
set the class of the child-collection.
Default is Set.
-
children
-
Answer my immediate children.
-
children: aCollectionWithElementsOfMyKind
-
set my children
-
contents
-
Answer the contents of me (e.g. a set of items)
-
contents: anObject
-
Set the contents of me to any object (e.g. a set of items)
-
disabled
-
return disabled
-
disabled: aBool
-
set disabled
-
hide: aBoolean
-
Set hide to aBoolean
-
hideToFalseForPath
-
set the hide-flag to false
-
id
-
return id
-
id: something
-
set id
-
level
-
answer the level in hierarchy (0=root)
-
level: anInteger
-
set the level in hierarchy (0=root)
-
name
-
return name
-
name: aString
-
set the name that identifys me within my parent's context.
-
ordered: aBoolean
-
set/clear the children-are-ordered flag.
If unordered (the default), children are kept in a set;
if ordered, they are kept in an orderedCollection.
-
parent: something
-
set parent
-
pathName
-
return a full path name to me
constants
-
delimiter
-
Answer the delimiter character
-
delimiterString
-
Answer the delimiter character asString
copying
-
copyWithParent: aParent
-
hierarchy operations
-
addChild: anObjectOfMyKind
-
add anObjectOfMyKind to my children
-
addChildren: aCollectionWithElementsOfMyKind
-
add aCollectionWithElementsOfMyKind to my children
-
allChildren
-
Answer my immediate children plus all my grandchildren
-- in hierachical order and alphabeticaly sorted by name within one level.
-
allParents
-
return all my parents (next first - root last)
-
collapse
-
Hide my children in hierachical printouts.
-
collapseAll
-
Hide my children and all my grandchildren in hierachical printouts.
-
expand
-
Show my immediate children in hierachical printouts.
-
expandAll
-
Show my children and all grand children in hierachical printouts.
-
parent
-
return parent
-
removeAllChildren
-
Remove all children of me from the tree, i.e. let them
forget myself as parent.
-
removeChild: anObjectOfMyKind
-
remove anObjectOfMyKind from my children
-
removeYourself
-
remove me and all my children
-
withAllChildren
-
Answer me, my immediate children and all my grandchildren
-- in hierachical order and alphabeticaly sorted by name within one level.
-
withAllShownChildren
-
Answer me, my immediate children and all my grandchildren which are
currently not hidden.
-- in hierachical order and alphabeticaly sorted by name within one level.
hierarchy sequencable operations
-
addChildAndSubChildren: aHierarchyNode after: aChild
-
add aHierarchyNode to my children after an existing child or at end
-
addChildAndSubChildren: aHierarchyNode at: anIndex
-
add aHierarchyNode to my children at an index or at end
-
indexOfChild: aChild
-
initialization & release
-
initialize
-
init some defaults
private
-
addAllChildrenTo: aCollection
-
Add all my children in hierachical and alphabetical order
to aCollection.
-
addAllShownChildrenTo: aCollection
-
Add all my children in hierachical and alphabetical order
if they are not hidden.
queries
-
childrenHidden
-
Answer true if my children shall be hidden
in hierachical printouts etc.
-
childrenShown
-
Answer true if my children shall be shown
in hierachical printouts etc.
-
hasChildren
-
-
isCollapsable
-
Answer true if I have shown children
-
isExpandable
-
Answer true if I have hidden children
|