eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HierarchicalList':

Home

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

Class: HierarchicalList


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--OrderedCollection
            |
            +--List
               |
               +--HierarchicalList
                  |
                  +--BookmarkList
                  |
                  +--HierarchicalFileList
                  |
                  +--SettingsDialog::HierarchicalApplicationList

Package:
stx:libwidg2
Category:
Views-Support
Version:
rev: 1.45 date: 2022/04/08 13:00:39
user: stefan
file: HierarchicalList.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


Hierarchical Lists are mostly like Lists, but adding and removing
elements are handled by the items itself.
Special change notifications are emitted, 
whenever the list is changed.
I am used mostly by the HierarchicalListView widget;
see comments there.    

[Instance variables:]
    root        <HierarchicalItem>  first item into list
    showRoot    <Boolean>           show or hide root item
    application <Application>       the user is able to set an application
                                    which can be accessed by an item.

copyright

COPYRIGHT (c) 1999 by eXept Software AG 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 protocol:

accessing-look
o  showRoot
return true if the root is shown

o  showRoot: aBoolean
show or hide root item

accessing-monitoring task
o  monitoringTaskDelay
get the delay time of the monitoring task measured in seconds
or nil( monitoring disabled ). The task runs through all items
of the list performing #monitoringCycle and than at end of the
list the task is suspended for monitoringTaskDelay seconds.

o  monitoringTaskDelay: inSecondsOrNil
set the delay time of the monitoring task measured in seconds
or nil( monitoring disabled ). The task runs through all items
of the list performing #monitoringCycle and than at end of the
list the task is suspended for monitoringTaskDelay seconds.

accessing-mvc
o  addDependent: anObject
restart the monitoringTask if necessary

o  application
returns the responsible application; if no application is defined,
nil is returned

o  application: anApplication
set the responsible application

o  applicationsDo: aOneArgBlock
evaluate the block on each dependent application

o  removeDependent: anObject
stop the monitoringTask if no more dependencies exists

accessing-root
o  root
get the root item

o  root: aRootItem
set the root item

private
o  initContents: aSize
setup defaults

o  itemAddAll: aListOfItems afterIndex: anIndex
insert all items after an index

o  itemAddAll: aListOfItems beforeIndex: anIndex
insert all items before an index

o  itemChanged: what with: aPara from: anItem
catch notification from item; throw changeNotifications
to dependencies;
**** don't know what to do with a parameter and argument what
**** list protocol ****

o  itemRemoveFromIndex: start toIndex: stop
remove the items stored under startIndex up to and including
the items under stopIndex.

o  parentOrModel
always returns nil

o  refreshContents
for debugging - regenerate a fresh list, in case I am outdated

private-monitoring task
o  monitoringCycle
the block evaluated

o  startMonitoringTask
start the monitoring task; backgrund process finishes, when no (more) dependencies exist,
and the additionalItemsToMonitorSemaphore is not signalled
(aka: no more background children to read)

o  stopMonitoringTask
stop the monitoring task

o  triggerUpdateCycle
must check again to avoid race condition

protocol
o  childrenFor: anItem
returns the children for an item or an empty list

o  iconFor: anItem
returns the icon for an item or nil

o  labelFor: anItem
returns the label for an item or nil

o  middleButtonMenuFor: anItem
returns the middleButton menu for an item or nil



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 05:00:52 GMT