eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HierarchicalItem':

Home

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

Class: HierarchicalItem


Inheritance:

   Object
   |
   +--AbstractHierarchicalItem
      |
      +--HierarchicalItem
         |
         +--Bookmark
         |
         +--HierarchicalFileList::HierarchicalFileItem
         |
         +--HierarchicalItem::Example
         |
         +--HierarchicalItemWithLabel
         |
         +--HierarchicalItemWithValue
         |
         +--Tools::ChangeList::ListEntry
         |
         +--Tools::HierarchicalChangesetDialog::Change
         |
         +--Tools::LintRuleList::ListEntry
         |
         +--Tools::ProfilerInfoItem
         |
         +--Tools::TestRunner2::ResultList::ListEntry
         |
         +--Tools::VisualProfilerCanvas::CallTreeItem
         |
         +--VersionDiffBrowser::ClassChangeSet

Package:
stx:libwidg2
Category:
Views-Support
Version:
rev: 1.117 date: 2017/07/14 09:45:14
user: cg
file: HierarchicalItem.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Atzkern

Description:


Hierarchical Items are mostly like Models, but the list of
dependencies are kept by its HierarchicalList.
Instances of (subclasses of) me are used to build up hierarchical trees.
This class is usually subclassed, to add label, icon or value (reference to some info)
to the tree item.

[Instance variables:]
    parent      <Item, List or nil>         parent or my HierarchicalList.
    children    <Collection or nil>         list of children
    isExpanded  <Boolean>                   indicates whether the item is
                                            expanded or collapsed
    width       <Integer>                   cached width of displayed label
    height      <Integer>                   cached height of displayed label


Related information:

    HierarchicalList
    HierarchicalListView

Instance protocol:

accessing
o  height
return the cached height

o  height: something
set the cached height

o  width
return the cached width

o  width: something
set the cached width

private
o  fetchChildren
should compute the list of children via the model.
Be aware, that the somewhat stupid 'optimization' of how the model is fetched may lead to
a O(n*log n) or even O(n^2) behavior here.
*** to optimize: redefine #model by subClass

o  makeWidthAndHeightUnknown

o  setExpanded: aBoolean
set expanded flag without any computation or notification

protocol-displaying
o  heightOn: aGC
return the height of the receiver, if it is to be displayed on aGC

o  widthOn: aGC
return the width of the receiver, if it is to be displayed on aGC

queries
o  isExpanded
returns true if the item is expanded


Private classes:

    Example


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Thu, 23 May 2019 19:46:53 GMT