SelectionBrowser.st
author tz
Wed, 03 Dec 1997 22:10:53 +0100
changeset 383 c643ead8ede7
permissions -rw-r--r--
intitial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
383
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     1
SimpleDialog subclass:#SelectionBrowser
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     2
	instanceVariableNames:'title'
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     3
	classVariableNames:''
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     4
	poolDictionaries:''
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     5
	category:'Interface-Advanced-Tools'
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     6
!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     7
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     8
SelectionBrowser class instanceVariableNames:'lastSelection'
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
     9
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    10
"
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    11
 The following class instance variables are inherited by this class:
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    12
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    13
	SimpleDialog - 
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    14
	ApplicationModel - ClassResources
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    15
	Model - 
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    16
	Object - 
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    17
"
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    18
!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    19
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    20
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    21
!SelectionBrowser class methodsFor:'accessing'!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    22
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    23
label
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    24
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    25
    |label|
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    26
    label := ''.
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    27
    self name do:
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    28
    [:c|
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    29
        c isUppercase ifTrue: [label := label, $ ].
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    30
        label := label, c
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    31
    ].
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    32
    ^label trimBlanks
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    33
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    34
!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    35
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    36
lastSelection
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    37
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    38
    ^lastSelection
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    39
!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    40
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    41
lastSelection: aString
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    42
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    43
    lastSelection := aString
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    44
! !
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    45
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    46
!SelectionBrowser methodsFor:'initialization'!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    47
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    48
postBuildWith:aBuilder
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    49
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    50
    self setLabel.
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    51
    ^super postBuildWith:aBuilder
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    52
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    53
!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    54
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    55
setLabel
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    56
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    57
    builder window label: title ? self class label
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    58
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    59
! !
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    60
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    61
!SelectionBrowser class methodsFor:'documentation'!
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    62
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    63
version
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    64
    ^ '$Header$'
c643ead8ede7 intitial checkin
tz
parents:
diff changeset
    65
! !