SelectionBrowser.st
author Claus Gittinger <cg@exept.de>
Thu, 22 Jan 1998 21:06:47 +0100
changeset 458 daa7b41dd2e3
parent 402 246e36541b1b
child 504 1ff52096d1d3
permissions -rw-r--r--
care for exclas in spec-code (labels with exclamation marks)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
402
246e36541b1b intitial checkin
tz
parents:
diff changeset
     1
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
246e36541b1b intitial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
246e36541b1b intitial checkin
tz
parents:
diff changeset
     4
246e36541b1b intitial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
246e36541b1b intitial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
246e36541b1b intitial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
246e36541b1b intitial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
246e36541b1b intitial checkin
tz
parents:
diff changeset
     9
 other person. No title to or ownership of the software is
246e36541b1b intitial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
246e36541b1b intitial checkin
tz
parents:
diff changeset
    11
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    12
246e36541b1b intitial checkin
tz
parents:
diff changeset
    13
246e36541b1b intitial checkin
tz
parents:
diff changeset
    14
246e36541b1b intitial checkin
tz
parents:
diff changeset
    15
SimpleDialog subclass:#SelectionBrowser
246e36541b1b intitial checkin
tz
parents:
diff changeset
    16
	instanceVariableNames:'title'
246e36541b1b intitial checkin
tz
parents:
diff changeset
    17
	classVariableNames:''
246e36541b1b intitial checkin
tz
parents:
diff changeset
    18
	poolDictionaries:''
246e36541b1b intitial checkin
tz
parents:
diff changeset
    19
	category:'Interface-Advanced-Tools'
246e36541b1b intitial checkin
tz
parents:
diff changeset
    20
!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    21
246e36541b1b intitial checkin
tz
parents:
diff changeset
    22
SelectionBrowser class instanceVariableNames:'lastSelection'
246e36541b1b intitial checkin
tz
parents:
diff changeset
    23
246e36541b1b intitial checkin
tz
parents:
diff changeset
    24
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    25
 The following class instance variables are inherited by this class:
246e36541b1b intitial checkin
tz
parents:
diff changeset
    26
246e36541b1b intitial checkin
tz
parents:
diff changeset
    27
	SimpleDialog - 
246e36541b1b intitial checkin
tz
parents:
diff changeset
    28
	ApplicationModel - ClassResources
246e36541b1b intitial checkin
tz
parents:
diff changeset
    29
	Model - 
246e36541b1b intitial checkin
tz
parents:
diff changeset
    30
	Object - 
246e36541b1b intitial checkin
tz
parents:
diff changeset
    31
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    32
!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    33
246e36541b1b intitial checkin
tz
parents:
diff changeset
    34
!SelectionBrowser class methodsFor:'documentation'!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    35
246e36541b1b intitial checkin
tz
parents:
diff changeset
    36
copyright
246e36541b1b intitial checkin
tz
parents:
diff changeset
    37
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    38
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
246e36541b1b intitial checkin
tz
parents:
diff changeset
    39
              All Rights Reserved
246e36541b1b intitial checkin
tz
parents:
diff changeset
    40
246e36541b1b intitial checkin
tz
parents:
diff changeset
    41
 This software is furnished under a license and may be used
246e36541b1b intitial checkin
tz
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
246e36541b1b intitial checkin
tz
parents:
diff changeset
    43
 inclusion of the above copyright notice. This software may not
246e36541b1b intitial checkin
tz
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
246e36541b1b intitial checkin
tz
parents:
diff changeset
    45
 other person. No title to or ownership of the software is
246e36541b1b intitial checkin
tz
parents:
diff changeset
    46
 hereby transferred.
246e36541b1b intitial checkin
tz
parents:
diff changeset
    47
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    48
246e36541b1b intitial checkin
tz
parents:
diff changeset
    49
246e36541b1b intitial checkin
tz
parents:
diff changeset
    50
!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    51
246e36541b1b intitial checkin
tz
parents:
diff changeset
    52
documentation
246e36541b1b intitial checkin
tz
parents:
diff changeset
    53
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    54
    documentation to be added.
246e36541b1b intitial checkin
tz
parents:
diff changeset
    55
"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    56
!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    57
246e36541b1b intitial checkin
tz
parents:
diff changeset
    58
history
246e36541b1b intitial checkin
tz
parents:
diff changeset
    59
    "Created: / 10.1.1998 / 11:00:51 / tz"
246e36541b1b intitial checkin
tz
parents:
diff changeset
    60
! !
246e36541b1b intitial checkin
tz
parents:
diff changeset
    61
246e36541b1b intitial checkin
tz
parents:
diff changeset
    62
!SelectionBrowser class methodsFor:'accessing'!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    63
246e36541b1b intitial checkin
tz
parents:
diff changeset
    64
label
246e36541b1b intitial checkin
tz
parents:
diff changeset
    65
246e36541b1b intitial checkin
tz
parents:
diff changeset
    66
    |label|
246e36541b1b intitial checkin
tz
parents:
diff changeset
    67
    label := ''.
246e36541b1b intitial checkin
tz
parents:
diff changeset
    68
    self name do:
246e36541b1b intitial checkin
tz
parents:
diff changeset
    69
    [:c|
246e36541b1b intitial checkin
tz
parents:
diff changeset
    70
        c isUppercase ifTrue: [label := label, $ ].
246e36541b1b intitial checkin
tz
parents:
diff changeset
    71
        label := label, c
246e36541b1b intitial checkin
tz
parents:
diff changeset
    72
    ].
246e36541b1b intitial checkin
tz
parents:
diff changeset
    73
    ^label trimBlanks
246e36541b1b intitial checkin
tz
parents:
diff changeset
    74
246e36541b1b intitial checkin
tz
parents:
diff changeset
    75
!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    76
246e36541b1b intitial checkin
tz
parents:
diff changeset
    77
lastSelection
246e36541b1b intitial checkin
tz
parents:
diff changeset
    78
246e36541b1b intitial checkin
tz
parents:
diff changeset
    79
    ^lastSelection
246e36541b1b intitial checkin
tz
parents:
diff changeset
    80
!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    81
246e36541b1b intitial checkin
tz
parents:
diff changeset
    82
lastSelection: aString
246e36541b1b intitial checkin
tz
parents:
diff changeset
    83
246e36541b1b intitial checkin
tz
parents:
diff changeset
    84
    lastSelection := aString
246e36541b1b intitial checkin
tz
parents:
diff changeset
    85
! !
246e36541b1b intitial checkin
tz
parents:
diff changeset
    86
246e36541b1b intitial checkin
tz
parents:
diff changeset
    87
!SelectionBrowser methodsFor:'accessing'!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    88
246e36541b1b intitial checkin
tz
parents:
diff changeset
    89
title: aString
246e36541b1b intitial checkin
tz
parents:
diff changeset
    90
246e36541b1b intitial checkin
tz
parents:
diff changeset
    91
    title := aString
246e36541b1b intitial checkin
tz
parents:
diff changeset
    92
246e36541b1b intitial checkin
tz
parents:
diff changeset
    93
! !
246e36541b1b intitial checkin
tz
parents:
diff changeset
    94
246e36541b1b intitial checkin
tz
parents:
diff changeset
    95
!SelectionBrowser methodsFor:'initialization'!
246e36541b1b intitial checkin
tz
parents:
diff changeset
    96
246e36541b1b intitial checkin
tz
parents:
diff changeset
    97
postBuildWith:aBuilder
246e36541b1b intitial checkin
tz
parents:
diff changeset
    98
246e36541b1b intitial checkin
tz
parents:
diff changeset
    99
    builder window label: title ? self class label.
246e36541b1b intitial checkin
tz
parents:
diff changeset
   100
246e36541b1b intitial checkin
tz
parents:
diff changeset
   101
    ^super postBuildWith:aBuilder
246e36541b1b intitial checkin
tz
parents:
diff changeset
   102
246e36541b1b intitial checkin
tz
parents:
diff changeset
   103
! !
246e36541b1b intitial checkin
tz
parents:
diff changeset
   104
246e36541b1b intitial checkin
tz
parents:
diff changeset
   105
!SelectionBrowser class methodsFor:'documentation'!
246e36541b1b intitial checkin
tz
parents:
diff changeset
   106
246e36541b1b intitial checkin
tz
parents:
diff changeset
   107
version
246e36541b1b intitial checkin
tz
parents:
diff changeset
   108
    ^ '$Header$'
246e36541b1b intitial checkin
tz
parents:
diff changeset
   109
! !