|
Class: HierarchicalList
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
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.
copyrightCOPYRIGHT (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.
accessing-look
-
showRoot
-
return true if the root is shown
-
showRoot: aBoolean
-
show or hide root item
accessing-monitoring task
-
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.
-
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
-
addDependent: anObject
-
restart the monitoringTask if necessary
-
application
-
returns the responsible application; if no application is defined,
nil is returned
-
application: anApplication
-
set the responsible application
-
applicationsDo: aOneArgBlock
-
evaluate the block on each dependent application
-
removeDependent: anObject
-
stop the monitoringTask if no more dependencies exists
accessing-root
-
root
-
get the root item
-
root: aRootItem
-
set the root item
private
-
initContents: aSize
-
setup defaults
-
itemAddAll: aListOfItems afterIndex: anIndex
-
insert all items after an index
-
itemAddAll: aListOfItems beforeIndex: anIndex
-
insert all items before an index
-
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 ****
-
itemRemoveFromIndex: start toIndex: stop
-
remove the items stored under startIndex up to and including
the items under stopIndex.
-
parentOrModel
-
always returns nil
-
refreshContents
-
for debugging - regenerate a fresh list, in case I am outdated
private-monitoring task
-
monitoringCycle
-
the block evaluated
-
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)
-
stopMonitoringTask
-
stop the monitoring task
-
triggerUpdateCycle
-
must check again to avoid race condition
protocol
-
childrenFor: anItem
-
returns the children for an item or an empty list
-
iconFor: anItem
-
returns the icon for an item or nil
-
labelFor: anItem
-
returns the label for an item or nil
-
middleButtonMenuFor: anItem
-
returns the middleButton menu for an item or nil
|