ResourceSelectionBrowser.st
author tz
Fri, 20 Mar 1998 19:38:13 +0100
changeset 742 688fd0a0b0fd
parent 733 6454aaabda51
child 746 8b3532f50ea9
permissions -rw-r--r--
code generation comment
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     1
"
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
     4
cf47d420764a initial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
     9
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    11
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    12
cf47d420764a initial checkin
tz
parents:
diff changeset
    13
cf47d420764a initial checkin
tz
parents:
diff changeset
    14
SelectionBrowser subclass:#ResourceSelectionBrowser
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
    15
	instanceVariableNames:'resourceMethod resourceClass resourceSuperclass resourceTypes
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
    16
		allClasses classSelectionBlock classAndResourceSelectionProcess'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    17
	classVariableNames:''
cf47d420764a initial checkin
tz
parents:
diff changeset
    18
	poolDictionaries:''
619
36c9d07f7dc3 class category changed
tz
parents: 616
diff changeset
    19
	category:'Interface-Dialogs'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    20
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    21
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    22
Object subclass:#Row
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    23
	instanceVariableNames:'method icon resourceType selector'
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    24
	classVariableNames:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    25
	poolDictionaries:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    26
	privateIn:ResourceSelectionBrowser
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    27
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    28
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    29
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    30
cf47d420764a initial checkin
tz
parents:
diff changeset
    31
copyright
cf47d420764a initial checkin
tz
parents:
diff changeset
    32
"
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    33
 COPYRIGHT (c) 1997 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    34
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
    35
cf47d420764a initial checkin
tz
parents:
diff changeset
    36
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
    37
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
    38
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
    39
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
    40
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    41
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    42
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    43
cf47d420764a initial checkin
tz
parents:
diff changeset
    44
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    45
cf47d420764a initial checkin
tz
parents:
diff changeset
    46
documentation
cf47d420764a initial checkin
tz
parents:
diff changeset
    47
"
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    48
    [start with:]
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    49
        ResourceSelectionBrowser open
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    50
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    51
    [author:]
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    52
        Thomas Zwick
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    53
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    54
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    55
cf47d420764a initial checkin
tz
parents:
diff changeset
    56
!ResourceSelectionBrowser class methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    57
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    58
request: aTitle onSuperclass: aSuperclass andClass: aClass andSelector: aSelector withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    59
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    60
    "
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    61
    ResourceSelectionBrowser
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    62
        request: 'Select a Resource Selector'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    63
        onSuperclass: #ApplicationModel 
cf47d420764a initial checkin
tz
parents:
diff changeset
    64
        andClass: #ToolApplicationModel 
cf47d420764a initial checkin
tz
parents:
diff changeset
    65
        andSelector: #saveIcon 
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
    66
        withResourceTypes: #(image) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    67
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
    68
cf47d420764a initial checkin
tz
parents:
diff changeset
    69
    ^self new
cf47d420764a initial checkin
tz
parents:
diff changeset
    70
        title: aTitle;
cf47d420764a initial checkin
tz
parents:
diff changeset
    71
        openOnSuperclass: aSuperclass
cf47d420764a initial checkin
tz
parents:
diff changeset
    72
        andClass: aClass
cf47d420764a initial checkin
tz
parents:
diff changeset
    73
        andSelector: aSelector
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    74
        withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    75
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    76
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    77
!ResourceSelectionBrowser class methodsFor:'callbacks - default'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    78
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    79
treeViewChildren
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    80
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
    81
    ^[:aTreeItem|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
    82
        |classes|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
    83
        classes := OrderedCollection new.    
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    84
        classes addAll: ((aTreeItem contents subclasses reject: [:cls| cls isPrivate]) asSortedCollection: [:i1 :i2| i1 name < i2 name]).
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    85
        classes addAll: (aTreeItem contents privateClasses asSortedCollection: [:i1 :i2| i1 name < i2 name]).
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    86
        classes
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    87
     ]
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    88
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    89
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    90
treeViewContents
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    91
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    92
    ^Smalltalk at: #Object
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    93
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    94
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    95
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    96
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    97
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    98
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    99
treeViewIcon
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   100
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   101
    ^[:aTreeItem|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   102
        |icon|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   103
        icon := self iconClass.
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   104
        aTreeItem contents isPrivate 
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   105
        ifTrue:
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   106
        [
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   107
           icon := self iconPrivateClass
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   108
        ].
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   109
    icon]
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   110
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   111
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   112
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   113
treeViewLabel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   114
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   115
    ^[:aTreeItem|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   116
        |label superCls|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   117
        label := aTreeItem contents name.
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   118
        (aTreeItem contents isPrivate and: [aTreeItem parent contents ~~ (superCls := aTreeItem contents superclass)])
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   119
            ifTrue: [label := label, ' (', superCls name, ')'].
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   120
        label
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   121
     ]
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   122
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   123
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   124
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   125
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   126
!ResourceSelectionBrowser class methodsFor:'image specs'!
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   127
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   128
iconClass
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   129
    "Generated by the Image Editor"
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   130
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   131
    ImageEditor openOnClass:self andSelector:#iconClass
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   132
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   133
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   134
    <resource: #image>
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   135
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   136
    ^Icon
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   137
        constantNamed:#'ResourceSelectionBrowser iconClass'
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   138
        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@UUUUUAQ****(@F**** @Z****@A****(@F**** @Z****@A****(LF**** TZ****@A****(@F**** @Z****@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]!
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   139
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   140
iconPrivateClass
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   141
    "Generated by the Image Editor"
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   142
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   143
    ImageEditor openOnClass:self andSelector:#iconPrivateClass
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   144
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   145
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   146
    <resource: #image>
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   147
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   148
    ^Icon
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   149
        constantNamed:#'ResourceSelectionBrowser iconPrivateClass'
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   150
        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@PUUUUU@A****(@F*??* @Z+??*@A*/*>(OF*>+: @Z+??*@A*/?:(DF*>** @Z+:**@A*/**(@F*>** @Z****C0@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]! !
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   151
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   152
!ResourceSelectionBrowser class methodsFor:'interface specs'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   153
cf47d420764a initial checkin
tz
parents:
diff changeset
   154
windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   155
    "this window spec was automatically generated by the ST/X UIPainter"
cf47d420764a initial checkin
tz
parents:
diff changeset
   156
cf47d420764a initial checkin
tz
parents:
diff changeset
   157
    "do not manually edit this - the painter/builder may not be able to
cf47d420764a initial checkin
tz
parents:
diff changeset
   158
     handle the specification if its corrupted."
cf47d420764a initial checkin
tz
parents:
diff changeset
   159
cf47d420764a initial checkin
tz
parents:
diff changeset
   160
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   161
     UIPainter new openOnClass:ResourceSelectionBrowser andSelector:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   162
     ResourceSelectionBrowser new openInterface:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   163
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   164
    "ResourceSelectionBrowser open"
cf47d420764a initial checkin
tz
parents:
diff changeset
   165
cf47d420764a initial checkin
tz
parents:
diff changeset
   166
    <resource: #canvas>
cf47d420764a initial checkin
tz
parents:
diff changeset
   167
cf47d420764a initial checkin
tz
parents:
diff changeset
   168
    ^
468
bb4e776b9210 levels changed
tz
parents: 467
diff changeset
   169
     
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   170
       #(#FullSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   171
          #window: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   172
           #(#WindowSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   173
              #name: 'Resource Selection Browser'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   174
              #layout: #(#LayoutFrame 197 0 172 0 796 0 521 0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   175
              #label: 'Resource Selection Browser'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   176
              #min: #(#Point 400 300)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   177
              #max: #(#Point 1152 864)
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   178
              #bounds: #(#Rectangle 197 172 797 522)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   179
              #usePreferredExtent: false
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   180
          )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   181
          #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   182
           #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   183
              #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   184
               #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   185
                 #(#VariableHorizontalPanelSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   186
                    #name: 'variableHorizontalPanel'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   187
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -40 1.0)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   188
                    #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   189
                     #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   190
                        #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   191
                         #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   192
                           #(#ViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   193
                              #name: 'view1'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   194
                              #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   195
                               #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   196
                                  #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   197
                                   #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   198
                                     #(#SelectionInTreeViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   199
                                        #name: 'listOfClassesView'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   200
                                        #layout: #(#LayoutFrame 0 0.0 23 0.0 0 1.0 -22 1.0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   201
                                        #model: #selectionOfClass
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   202
                                        #hasHorizontalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   203
                                        #hasVerticalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   204
                                        #miniScrollerHorizontal: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   205
                                        #showDirectoryIndicatorForRoot: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   206
                                        #showDirectoryIndicator: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   207
                                        #valueChangeSelector: #classSelected:
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   208
                                        #hierarchicalList: #listOfClasses
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   209
                                        #contentsSelector: #treeViewContents
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   210
                                        #labelSelector: #treeViewLabel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   211
                                        #childrenSelector: #treeViewChildren
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   212
                                        #iconSelector: #treeViewIcon
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   213
                                    )
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   214
                                     #(#InputFieldSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   215
                                        #name: 'classNameInputField'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   216
                                        #layout: #(#LayoutFrame 2 0.0 -22 1 -1 1.0 0 1)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   217
                                        #model: #valueOfClassName
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   218
                                    )
664
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   219
                                     #(#LabelSpec
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   220
                                        #name: 'ClassHierarchyLabel'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   221
                                        #layout: #(#LayoutFrame 0 0 2 0 297 0 23 0)
664
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   222
                                        #label: ' Class Hierarchy'
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   223
                                        #level: 1
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   224
                                        #adjust: #left
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   225
                                    )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   226
                                  )
cf47d420764a initial checkin
tz
parents:
diff changeset
   227
                              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   228
                          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   229
                           #(#ViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   230
                              #name: 'view2'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   231
                              #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   232
                               #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   233
                                  #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   234
                                   #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   235
                                     #(#DataSetSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   236
                                        #name: 'resourcesDataSetView'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   237
                                        #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -22 1.0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   238
                                        #model: #selectionOfResource
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   239
                                        #hasHorizontalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   240
                                        #hasVerticalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   241
                                        #miniScrollerHorizontal: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   242
                                        #rowClassName: 'ResourceSelectionBrowser::Row'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   243
                                        #dataList: #listOfResources
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   244
                                        #useIndex: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   245
                                        #has3Dsepartors: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   246
                                        #doubleClickSelector: #resourceDoubleClicked
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   247
                                        #columnHolder: #columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   248
                                        #valueChangeSelector: #resourceSelected
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   249
                                        #verticalSpacing: 1
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   250
                                    )
cf47d420764a initial checkin
tz
parents:
diff changeset
   251
                                     #(#InputFieldSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   252
                                        #name: 'selectorInputField'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   253
                                        #layout: #(#LayoutFrame 2 0.0 -22 1 -2 1.0 0 1)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   254
                                        #model: #valueOfSelector
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   255
                                    )
cf47d420764a initial checkin
tz
parents:
diff changeset
   256
                                  )
cf47d420764a initial checkin
tz
parents:
diff changeset
   257
                              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   258
                          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   259
                        )
cf47d420764a initial checkin
tz
parents:
diff changeset
   260
                    )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   261
                    #handles: #(#Any 0.5 1.0)
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   262
                )
436
07be1c96bb58 *** empty log message ***
tz
parents: 435
diff changeset
   263
                 #(#UISubSpecification
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   264
                    #name: 'SubSpecification'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   265
                    #layout: #(#LayoutFrame 301 0.0 -32 1 -2 1.0 -8 1.0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   266
                    #majorKey: #ToolApplicationModel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   267
                    #minorKey: #windowSpecForCommitWithoutChannels
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   268
                )
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   269
                 #(#HorizontalPanelViewSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   270
                    #name: 'HorizontalPanelView1'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   271
                    #layout: #(#LayoutFrame 3 0 76 0.691429 300 0 0 0.977143)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   272
                    #component: 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   273
                     #(#SpecCollection
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   274
                        #collection: 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   275
                         #(
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   276
                           #(#LabelSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   277
                              #name: 'Label2'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   278
                              #label: 'Create: '
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   279
                              #adjust: #right
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   280
                              #extent: #(#Point 67 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   281
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   282
                           #(#ActionButtonSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   283
                              #name: 'CreateClassButton'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   284
                              #activeHelpKey: #dss
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   285
                              #label: 'Class'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   286
                              #model: #createClass:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   287
                              #actionValue: 'class'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   288
                              #extent: #(#Point 72 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   289
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   290
                           #(#ActionButtonSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   291
                              #name: 'CreateSubclassButton'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   292
                              #activeHelpKey: #dss
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   293
                              #label: 'Subclass'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   294
                              #model: #createClass:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   295
                              #actionValue: 'subclass'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   296
                              #extent: #(#Point 72 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   297
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   298
                           #(#ActionButtonSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   299
                              #name: 'CreatePrivateClassButton'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   300
                              #activeHelpKey: #dss
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   301
                              #label: 'Private'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   302
                              #model: #createClass:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   303
                              #actionValue: 'private'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   304
                              #extent: #(#Point 72 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   305
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   306
                        )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   307
                    )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   308
                    #horizontalLayout: #fit
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   309
                    #verticalLayout: #fit
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   310
                )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   311
              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   312
          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   313
      )
cf47d420764a initial checkin
tz
parents:
diff changeset
   314
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   315
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   316
!ResourceSelectionBrowser class methodsFor:'list specs'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   317
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   318
columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   319
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   320
  ^ #(#(#DataSetColumnSpec
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   321
      #width: 20
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   322
      #height: 20
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   323
      #printSelector: #iconOn:
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   324
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   325
  )
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   326
   #(#DataSetColumnSpec
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   327
      #label: ' Selector'
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   328
      #'labelAlignment:' #left
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   329
      #model: #selector
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   330
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   331
  )
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   332
   (#DataSetColumnSpec
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   333
      #label: ' Resource Type'
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   334
      #'labelAlignment:' #left
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   335
      #model: #resourceType
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   336
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   337
  ))
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   338
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   339
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   340
!ResourceSelectionBrowser methodsFor:'accessing - views'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   341
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   342
classNameInputField
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   343
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   344
    ^builder componentAt: #classNameInputField
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   345
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   346
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   347
listOfClassesView
cf47d420764a initial checkin
tz
parents:
diff changeset
   348
cf47d420764a initial checkin
tz
parents:
diff changeset
   349
    ^builder componentAt: #listOfClassesView
cf47d420764a initial checkin
tz
parents:
diff changeset
   350
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   351
cf47d420764a initial checkin
tz
parents:
diff changeset
   352
!ResourceSelectionBrowser methodsFor:'aspects'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   353
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   354
columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   355
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   356
    |holder|
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   357
    (holder := builder bindingAt:#columnsOfDataSetView) isNil ifTrue:[
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   358
        builder aspectAt:#columnsOfDataSetView put:(holder := List new).
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   359
        holder addAll: (self class columnsOfDataSetView collect: [:i| i decodeAsLiteralArray]).
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   360
    ].
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   361
    ^ holder
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   362
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   363
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   364
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   365
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   366
listOfClasses
cf47d420764a initial checkin
tz
parents:
diff changeset
   367
cf47d420764a initial checkin
tz
parents:
diff changeset
   368
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   369
    (holder := builder bindingAt:#listOfClasses) isNil ifTrue:[
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   370
        builder aspectAt:#listOfClasses put: (holder := TreeItem new)
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   371
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   372
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   373
cf47d420764a initial checkin
tz
parents:
diff changeset
   374
cf47d420764a initial checkin
tz
parents:
diff changeset
   375
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   376
cf47d420764a initial checkin
tz
parents:
diff changeset
   377
listOfResources
cf47d420764a initial checkin
tz
parents:
diff changeset
   378
cf47d420764a initial checkin
tz
parents:
diff changeset
   379
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   380
    (holder := builder bindingAt:#listOfResources) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   381
        builder aspectAt:#listOfResources put:(holder :=  List new).
cf47d420764a initial checkin
tz
parents:
diff changeset
   382
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   383
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   384
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   385
cf47d420764a initial checkin
tz
parents:
diff changeset
   386
selectionOfClass
cf47d420764a initial checkin
tz
parents:
diff changeset
   387
cf47d420764a initial checkin
tz
parents:
diff changeset
   388
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   389
    (holder := builder bindingAt:#selectionOfClass) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   390
        builder aspectAt:#selectionOfClass put:(holder :=  ValueHolder new).
cf47d420764a initial checkin
tz
parents:
diff changeset
   391
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   392
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   393
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   394
cf47d420764a initial checkin
tz
parents:
diff changeset
   395
selectionOfResource
cf47d420764a initial checkin
tz
parents:
diff changeset
   396
cf47d420764a initial checkin
tz
parents:
diff changeset
   397
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   398
    (holder := builder bindingAt:#selectionOfResource) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   399
        builder aspectAt:#selectionOfResource put:(holder :=  '' asValue).
cf47d420764a initial checkin
tz
parents:
diff changeset
   400
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   401
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   402
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   403
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   404
valueOfClassName
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   405
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   406
    |holder|
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   407
    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   408
        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   409
    ].
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   410
    ^ holder
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   411
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   412
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   413
valueOfSelector
cf47d420764a initial checkin
tz
parents:
diff changeset
   414
cf47d420764a initial checkin
tz
parents:
diff changeset
   415
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   416
    (holder := builder bindingAt:#valueOfSelector) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   417
        builder aspectAt:#valueOfSelector put:(holder :=  '' asValue).
cf47d420764a initial checkin
tz
parents:
diff changeset
   418
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   419
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   420
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   421
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   422
!ResourceSelectionBrowser methodsFor:'callbacks - tree view'!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   423
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   424
treeViewContents
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   425
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   426
    ^(Smalltalk at: resourceSuperclass) ? self class treeViewContents
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   427
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   428
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   429
! !
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   430
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   431
!ResourceSelectionBrowser methodsFor:'callbacks - user'!
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   432
cf47d420764a initial checkin
tz
parents:
diff changeset
   433
classSelected: anIndex
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   434
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   435
    self selectionOfClass value isNil ifTrue: [^nil].
cf47d420764a initial checkin
tz
parents:
diff changeset
   436
    self withWaitCursorDo:
cf47d420764a initial checkin
tz
parents:
diff changeset
   437
    [
cf47d420764a initial checkin
tz
parents:
diff changeset
   438
        |clsName|
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   439
        resourceTypes isNil ifTrue: [resourceTypes := Method resourceTypes].
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   440
        clsName := ((self listOfClassesView list at: anIndex) upTo: $ ) asSymbol.
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
   441
        self valueOfClassName value: clsName.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   442
        self class lastSelection: clsName.
cf47d420764a initial checkin
tz
parents:
diff changeset
   443
        self listOfResources contents:
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   444
            ((((Smalltalk at: clsName) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   445
                class methodDictionary
cf47d420764a initial checkin
tz
parents:
diff changeset
   446
                asOrderedCollection select: 
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   447
                    [:m| m resources notNil and: [resourceTypes includes: m resourceType]]))
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   448
             collect: [:m| Row new method: m]).
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   449
    ]
cf47d420764a initial checkin
tz
parents:
diff changeset
   450
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   451
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   452
createClass: what
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   453
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   454
    |clsCandidat cls|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   455
    clsCandidat := self valueOfClassName value asSymbol.
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   456
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   457
    (Smalltalk at: clsCandidat) notNil 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   458
        ifTrue: [^self warn: 'Cannot create class ', clsCandidat asBoldText,
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   459
                '!!\Key with that name in dictionary ' withCRs, 'Smalltalk' asBoldText, ' detected.'].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   460
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   461
    cls := self selectionOfClass value contents.
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   462
    what = 'class' ifTrue: [cls := cls superclass].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   463
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   464
    cls isNil ifTrue: [^self warn: 'May not create class with superclass ', 'nil' asBoldText, '!!'].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   465
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   466
    what = 'private' 
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   467
    ifFalse: 
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   468
    [
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   469
        cls subclass: clsCandidat
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   470
            instanceVariableNames:''
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   471
            classVariableNames:''
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   472
            poolDictionaries:''
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   473
            category: cls category
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   474
    ]
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   475
    ifTrue:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   476
    [
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   477
        |superClsCandidate|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   478
        superClsCandidate := (Dialog 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   479
                request: 'Enter name of superclass of private class.'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   480
                initialAnswer: 'Object') asSymbol.
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   481
        (Smalltalk at: superClsCandidate) isNil ifTrue: [^self warn: 'Class ', superClsCandidate asBoldText, ' does not exist!!'].
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   482
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   483
        ((superClsCandidate := Smalltalk at: superClsCandidate) isClass and: [superClsCandidate isPrivate not])
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   484
            ifFalse: [^self warn: 'May not create private class with superclass ', superClsCandidate asBoldText, '!!'].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   485
        superClsCandidate subclass: clsCandidat
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   486
            instanceVariableNames:''
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   487
            classVariableNames:''
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   488
            poolDictionaries:''
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   489
            privateIn: cls
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   490
    ].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   491
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   492
    allClasses := Object withAllSubclasses.
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   493
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   494
    what = 'class' 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   495
        ifTrue:  [self selectionOfClass value parent changed: #children]
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   496
        ifFalse: [self selectionOfClass value changed: #children].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   497
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   498
    classSelectionBlock value: self valueOfClassName value 
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   499
!
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   500
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   501
resourceDoubleClicked
cf47d420764a initial checkin
tz
parents:
diff changeset
   502
cf47d420764a initial checkin
tz
parents:
diff changeset
   503
    resourceMethod := self selectionOfResource value.
cf47d420764a initial checkin
tz
parents:
diff changeset
   504
    accept value: true.
cf47d420764a initial checkin
tz
parents:
diff changeset
   505
    self close
cf47d420764a initial checkin
tz
parents:
diff changeset
   506
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   507
cf47d420764a initial checkin
tz
parents:
diff changeset
   508
resourceSelected
cf47d420764a initial checkin
tz
parents:
diff changeset
   509
cf47d420764a initial checkin
tz
parents:
diff changeset
   510
    resourceMethod := self selectionOfResource value.
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   511
    self selectionOfResource value notNil
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   512
        ifTrue: [self valueOfSelector value: self selectionOfResource value selector]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   513
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   514
cf47d420764a initial checkin
tz
parents:
diff changeset
   515
!ResourceSelectionBrowser methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   516
cf47d420764a initial checkin
tz
parents:
diff changeset
   517
openOnSuperclass: aSuperclassOrSymbol andClass: aClassOrSymbol andSelector: aSelector withResourceTypes: aResourceTypes
cf47d420764a initial checkin
tz
parents:
diff changeset
   518
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   519
    |clsName|
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   520
    resourceMethod := aSelector.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   521
    resourceTypes := aResourceTypes.
cf47d420764a initial checkin
tz
parents:
diff changeset
   522
    resourceSuperclass := aSuperclassOrSymbol isClass ifTrue: [aSuperclassOrSymbol name] ifFalse: [aSuperclassOrSymbol].
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   523
    resourceClass := aClassOrSymbol isClass 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   524
        ifTrue: [aClassOrSymbol name] 
727
bbe063ccf4a3 class selection after opening
tz
parents: 718
diff changeset
   525
        ifFalse: [(Smalltalk at: aClassOrSymbol) notNil
bbe063ccf4a3 class selection after opening
tz
parents: 718
diff changeset
   526
            ifTrue: [aClassOrSymbol]
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   527
            ifFalse: [nil]].      
481
e2e1ea013229 Take care of nil selectors in #openOnSuperClass:andClass:andSelector:
Stefan Vogel <sv@exept.de>
parents: 477
diff changeset
   528
    self valueOfSelector value:(aSelector ? '').
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   529
463
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   530
    self open.
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   531
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   532
    (clsName := self selectionOfClass value) isNil ifTrue: [^nil].
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   533
    clsName := (clsName name upTo: $ ) asSymbol.
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   534
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   535
    ((Smalltalk at: clsName) isClass and: [accept value]) 
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   536
    ifTrue:
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   537
    [            
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   538
        ^clsName, ' ', self valueOfSelector value
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   539
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   540
    ^nil
cf47d420764a initial checkin
tz
parents:
diff changeset
   541
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   542
cf47d420764a initial checkin
tz
parents:
diff changeset
   543
!ResourceSelectionBrowser methodsFor:'startup / release'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   544
cf47d420764a initial checkin
tz
parents:
diff changeset
   545
closeCancel
cf47d420764a initial checkin
tz
parents:
diff changeset
   546
cf47d420764a initial checkin
tz
parents:
diff changeset
   547
    resourceMethod := nil.
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   548
    classAndResourceSelectionProcess notNil ifTrue: [classAndResourceSelectionProcess terminate].
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   549
    super closeCancel
cf47d420764a initial checkin
tz
parents:
diff changeset
   550
cf47d420764a initial checkin
tz
parents:
diff changeset
   551
cf47d420764a initial checkin
tz
parents:
diff changeset
   552
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   553
!
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   554
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   555
postBuildWith:aBuilder
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   556
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   557
    |classSelection|
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   558
    allClasses := Object withAllSubclasses.
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   559
    classSelection :=  resourceClass. 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   560
    (Smalltalk at: classSelection) isNil 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   561
        ifTrue: [classSelection :=  self class lastSelection].
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   562
    (Smalltalk at: classSelection) isNil 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   563
        ifTrue: [classSelection :=  #Object].
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   564
    classSelectionBlock := 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   565
    [:clsPattern|                                  
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   566
        |foundClass classes|         
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   567
        ((foundClass := Smalltalk at: clsPattern printString asSymbol) isClass not or:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   568
        [foundClass name ~= clsPattern])
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   569
        ifTrue:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   570
        [
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   571
            classes := allClasses select: [:cls| cls name size >= clsPattern size].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   572
            1 to: clsPattern size do: 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   573
            [:i|    
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   574
                 classes := classes select: [:cls| (cls name at: i) == (clsPattern at: i)].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   575
            ].    
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   576
            foundClass := classes at: 1 ifAbsent: [nil] 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   577
        ].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   578
        foundClass notNil
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   579
        ifTrue:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   580
        [
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   581
            self listOfClassesView 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   582
                selectFromListOfNames: (foundClass 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   583
                    withAllSuperclasses reverse collect: [:cls| cls name asString]);
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   584
                selectedNodeExpand: true
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   585
        ].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   586
        self valueOfClassName value: clsPattern
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   587
    ].
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   588
    self valueOfClassName value: classSelection.  
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   589
    self classNameInputField entryCompletionBlock:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   590
    [:value|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   591
        |what|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   592
        what := Smalltalk classnameCompletion: value withoutSpaces.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   593
        self classNameInputField contents:what first.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   594
        (what at:2) size ~~ 1 ifTrue:[Display beep].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   595
        classSelectionBlock value: self classNameInputField contents
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   596
    ].
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   597
    self listOfClassesView validateDoubleClickBlock: [:aTreeItem | aTreeItem contents ~~ self treeViewContents].
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   598
    self listOfClassesView selectedNodeExpand: true.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   599
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   600
    classAndResourceSelectionProcess := 
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   601
    [
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   602
        [classSelectionBlock value: classSelection] value.
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   603
        self selectionOfResource value: (self listOfResources detect: [:m| m selector == resourceMethod] ifNone: nil).
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   604
        classAndResourceSelectionProcess := nil
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   605
    ]
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   606
    forkAt: 4.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   607
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   608
    ^super postBuildWith:aBuilder
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   609
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   610
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   611
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   612
!ResourceSelectionBrowser::Row methodsFor:'accessing'!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   613
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   614
iconOn:aGC
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   615
    "register and answer an icon indicating the resource type."
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   616
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   617
    self resourceType isNil ifTrue: [^nil].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   618
    icon isNil 
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   619
    ifTrue: 
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   620
    [
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   621
        |cls sel image imageKey|
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   622
        ((self resourceType = #image) or: [resourceType = #fileImage])
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   623
        ifTrue: 
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   624
        [  
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   625
            cls := method who methodClass soleInstance.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   626
            sel := method who methodSelector.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   627
        ]
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   628
        ifFalse:
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   629
        [
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   630
            cls := BrowserView.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   631
            sel := (resourceType, 'Icon') asSymbol.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   632
        ].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   633
        imageKey := (cls name, sel) asSymbol.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   634
        (icon := aGC registeredImageAt: imageKey) isNil
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   635
        ifTrue:
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   636
        [       
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   637
            image := cls perform: sel.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   638
            image extent y > 18
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   639
            ifTrue:
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   640
            [         
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   641
                image := image magnifiedBy: 18/image extent y
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   642
            ].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   643
            aGC registerImage: image key: imageKey.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   644
            icon := aGC registeredImageAt: imageKey.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   645
        ].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   646
    ].
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   647
    ^icon
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   648
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   649
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   650
method: aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   651
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   652
    method := aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   653
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   654
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   655
resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   656
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   657
    resourceType isNil ifTrue: [resourceType := method resourceType].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   658
    ^resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   659
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   660
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   661
selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   662
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   663
    selector isNil ifTrue: [selector := method who methodSelector].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   664
    ^selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   665
! !
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   666
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   667
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   668
cf47d420764a initial checkin
tz
parents:
diff changeset
   669
version
cf47d420764a initial checkin
tz
parents:
diff changeset
   670
    ^ '$Header$'
cf47d420764a initial checkin
tz
parents:
diff changeset
   671
! !