eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FileSelectionItem':

Home

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

Class: FileSelectionItem


Inheritance:

   Object
   |
   +--TreeItem
      |
      +--FileSelectionItem
         |
         +--FileSelectionItem::Directory
         |
         +--FileSelectionItem::File

Package:
stx:libwidg2
Category:
Interface-Support
Version:
rev: 1.28 date: 2023/09/07 18:27:54
user: stefan
file: FileSelectionItem.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


class to build up file tree like structures. You can define your own
icons and filter. To change the icons, look for these methods:

    class method:           #keysAndIcons      : returns a list of icons and access keys used

    instance method:        #imageType         : get type of icon assigned to file

                            #icon              : get the type of image to be drawn

Especially suited for use with FileSelectionTree.

[class variables:]
    ReadDirectoriesForIndicator     <Boolean>       if true, the directories are searched
                                                    for subdirectories to update the
                                                    indicator; on auto mounted file systems
                                                    this would take a very long time!!
                                                    therefore the default is set to false.

copyright

COPYRIGHT (c) 1997 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.

Class protocol:

accessing class
o  filterClassForDirectoriesOnly

o  filterClassForFilesOnly

converting
o  asFilename: aPathname
convert pathname to an absolute path

default icons
o  keysAndIcons
returns an IdentityDictionary containing a list of images and keys used
by any file entry.

initialization
o  initialize

instance creation
o  pathName: aPath
create a new node entry associated with the full pathname, aPath


Instance protocol:

accessing
o  children
get's list of children

o  fileName
returns the fileName of node

o  icon
returns type of image to be drawn.
Either an iconKey (such as #directoryOpen) or a real image.
If a key is returned, that is used by the owning view to
fetch a real icon - thus allowing the view to be configured
to different view styles.
Not sure, if the naming is good: this method was probably better named iconKey or similar.

o  imageType: anIconkeySymbolOrImage
see MIMETypeIconLibrary keyForFile:

o  match: aOneArgBlock

o  pathName
returns full pathname of node

o  pathName: aPathname
initialze attributes associated with the full pathname, aPathname

accessing-hierarchy
o  collapse
check to release children

o  collapseAll
release my childrens

o  expandAll
not allowed for a file directory

change & update
o  changedSelected
called if the node is selected

private
o  childFileName: aFilename baseName: aBaseName parent: aParent isDirectory: aBool matchAction: mA
initialze attributes associated with the full pathname, aPathname.
Same as #fileName:baseName:parent:isDirectory:,
but used only for children (i.e. no need to check for
being a rootDirectory).

o  directoryIsLocked

o  fileName: aFilename baseName: aBaseName parent: aParent isDirectory: aBool
initialze attributes associated with the full pathname, aPathname

o  matchAction
returns my match action

o  releaseChildren
release my childrens without tests and deregistration from
update task

o  stopIndicatorValidation
called to stop indicator validation on each child

o  stopIndicatorValidation: aModel
called to stop indicator validation on each child

protected
o  isVisibleFile: aFilename isDirectory: isDirectory baseName: aBasename

queries
o  canReleaseChildren
returns true if children could be released

o  defaultShowSeparator
returns true if the separator is shown if the contents
from the directory is not yet read

o  discardDirectories
returns true if children are not type of directory; could be
reimplemented for speed in any subclass

o  discardFiles
returns true if children are not type of file; could be
reimplemented for speed in any subclass

o  hasChildren
returns true if the pathname assigned to this node is a directory
otherwise false

o  hasValidIndicator
returns true if indication flag is uptodate

o  isDirectory

o  releaseCollapsedChildren
release collapsed children

o  setShowIndicator: aBool
set indication; raise no change notification

o  showIndicator
returns true if the node is a non-empty directory.
This information is gathered lazily: first, false is
returned and indicatorValidation is started for mySelf;
this will read directories in the background to avoid
long startup delays (of my treeView)

o  showIndicator: aBool
indication might change; raise a change notification

repair mechanism
o  hasObsoleteNodes
check whether node or any child node is obsolete

o  repairObsoleteNodes
repair nodes

update
o  imageType
return my icon-image type - a symbol

o  readInChildren
read children from directory


Private classes:

    Directory
    File


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