eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HierarchyNode':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: HierarchyNode


Inheritance:

   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

Description:


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.


Related information:

    SelectionInHierarchy
    SelectionInHierarchyView
    SelectionInTree
    SelectionInTreeView
    TreeItem

Class protocol:

instance creation
o  new

o  newAsTreeFromSmalltalkClass: aClass
create a tree of nodes with aClass and all its
subclasses as contents.

o  newAsTreeFromSmalltalkClass: aClass level: level
create a tree of nodes with aClass and all its
subclasses as contents. Set the initial level as given.

o  newWithName: aString
create a new node with a name

o  newWithName: aString andId: anId
create a new node with a name and id


Instance protocol:

accessing
o  childCollectionClass: aCollectionClass
set the class of the child-collection.
Default is Set.

o  children
Answer my immediate children.

o  children: aCollectionWithElementsOfMyKind
set my children

o  contents
Answer the contents of me (e.g. a set of items)

o  contents: anObject
Set the contents of me to any object (e.g. a set of items)

o  disabled
return disabled

o  disabled: aBool
set disabled

o  hide: aBoolean
Set hide to aBoolean

o  hideToFalseForPath
set the hide-flag to false

o  id
return id

o  id: something
set id

o  level
answer the level in hierarchy (0=root)

o  level: anInteger
set the level in hierarchy (0=root)

o  name
return name

o  name: aString
set the name that identifys me within my parent's context.

o  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.

o  parent: something
set parent

o  pathName
return a full path name to me

constants
o  delimiter
Answer the delimiter character

o  delimiterString
Answer the delimiter character asString

copying
o  copyWithParent: aParent

hierarchy operations
o  addChild: anObjectOfMyKind
add anObjectOfMyKind to my children

o  addChildren: aCollectionWithElementsOfMyKind
add aCollectionWithElementsOfMyKind to my children

o  allChildren
Answer my immediate children plus all my grandchildren
-- in hierachical order and alphabeticaly sorted by name within one level.

o  allParents
return all my parents (next first - root last)

o  collapse
Hide my children in hierachical printouts.

o  collapseAll
Hide my children and all my grandchildren in hierachical printouts.

o  expand
Show my immediate children in hierachical printouts.

o  expandAll
Show my children and all grand children in hierachical printouts.

o  parent
return parent

o  removeAllChildren
Remove all children of me from the tree, i.e. let them
forget myself as parent.

o  removeChild: anObjectOfMyKind
remove anObjectOfMyKind from my children

o  removeYourself
remove me and all my children

o  withAllChildren
Answer me, my immediate children and all my grandchildren
-- in hierachical order and alphabeticaly sorted by name within one level.

o  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
o  addChildAndSubChildren: aHierarchyNode after: aChild
add aHierarchyNode to my children after an existing child or at end

o  addChildAndSubChildren: aHierarchyNode at: anIndex
add aHierarchyNode to my children at an index or at end

o  indexOfChild: aChild

initialization & release
o  initialize
init some defaults

private
o  addAllChildrenTo: aCollection
Add all my children in hierachical and alphabetical order
to aCollection.

o  addAllShownChildrenTo: aCollection
Add all my children in hierachical and alphabetical order
if they are not hidden.

queries
o  childrenHidden
Answer true if my children shall be hidden
in hierachical printouts etc.

o  childrenShown
Answer true if my children shall be shown
in hierachical printouts etc.

o  hasChildren

o  isCollapsable
Answer true if I have shown children

o  isExpandable
Answer true if I have hidden children



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 10 Aug 2022 11:30:50 GMT