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.24 date: 2022/11/24 13:46:46
user: cg
file: HierarchyNode.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

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.

copyright

COPYRIGHT (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.

Class protocol:

instance creation
o  new
(comment from inherited method)
return an instance of myself without indexed variables

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  canCollapse
Answer true if I have visible children

o  canExpand
Answer true if I have hidden children and I am not already expanded

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

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  isExpandable
Answer true if I have hidden children

** This is an obsolete interface - do not use it (it may vanish in future versions) **



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:41:56 GMT