|
Class: HierarchyNode
Object
|
+--HierarchyNode
- Package:
- stx:libwidg2
- Category:
- Interface-Support
- Version:
- rev:
1.24
date: 2022/11/24 13:46:46
- user: cg
- file: HierarchyNode.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
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.
copyrightCOPYRIGHT (c) 1994 by AEG Industry Automation
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
instance creation
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
-
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
-
canCollapse
-
Answer true if I have visible children
-
canExpand
-
Answer true if I have hidden children and I am not already expanded
-
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
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
isExpandable
-
Answer true if I have hidden children
** This is an obsolete interface - do not use it (it may vanish in future versions) **
|