|
Class: FileSelectionItem
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
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.
copyrightCOPYRIGHT (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.
accessing class
-
filterClassForDirectoriesOnly
-
-
filterClassForFilesOnly
-
converting
-
asFilename: aPathname
-
convert pathname to an absolute path
default icons
-
keysAndIcons
-
returns an IdentityDictionary containing a list of images and keys used
by any file entry.
initialization
-
initialize
-
instance creation
-
pathName: aPath
-
create a new node entry associated with the full pathname, aPath
accessing
-
children
-
get's list of children
-
fileName
-
returns the fileName of node
-
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.
-
imageType: anIconkeySymbolOrImage
-
see MIMETypeIconLibrary keyForFile:
-
match: aOneArgBlock
-
-
pathName
-
returns full pathname of node
-
pathName: aPathname
-
initialze attributes associated with the full pathname, aPathname
accessing-hierarchy
-
collapse
-
check to release children
-
collapseAll
-
release my childrens
-
expandAll
-
not allowed for a file directory
change & update
-
changedSelected
-
called if the node is selected
private
-
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).
-
directoryIsLocked
-
-
fileName: aFilename baseName: aBaseName parent: aParent isDirectory: aBool
-
initialze attributes associated with the full pathname, aPathname
-
matchAction
-
returns my match action
-
releaseChildren
-
release my childrens without tests and deregistration from
update task
-
stopIndicatorValidation
-
called to stop indicator validation on each child
-
stopIndicatorValidation: aModel
-
called to stop indicator validation on each child
protected
-
isVisibleFile: aFilename isDirectory: isDirectory baseName: aBasename
-
queries
-
canReleaseChildren
-
returns true if children could be released
-
defaultShowSeparator
-
returns true if the separator is shown if the contents
from the directory is not yet read
-
discardDirectories
-
returns true if children are not type of directory; could be
reimplemented for speed in any subclass
-
discardFiles
-
returns true if children are not type of file; could be
reimplemented for speed in any subclass
-
hasChildren
-
returns true if the pathname assigned to this node is a directory
otherwise false
-
hasValidIndicator
-
returns true if indication flag is uptodate
-
isDirectory
-
-
releaseCollapsedChildren
-
release collapsed children
-
setShowIndicator: aBool
-
set indication; raise no change notification
-
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)
-
showIndicator: aBool
-
indication might change; raise a change notification
repair mechanism
-
hasObsoleteNodes
-
check whether node or any child node is obsolete
-
repairObsoleteNodes
-
repair nodes
update
-
imageType
-
return my icon-image type - a symbol
-
readInChildren
-
read children from directory
Directory
File
|