ListEditor.st
author Claus Gittinger <cg@exept.de>
Sun, 07 Mar 1999 14:39:54 +0100
changeset 1236 590c618a1a05
parent 1235 c685221f8176
child 1237 bb0e690117d0
permissions -rw-r--r--
checkin from browser

ApplicationModel subclass:#ListEditor
	instanceVariableNames:'choiceList choiceSelection selectionList selectionSelection'
	classVariableNames:''
	poolDictionaries:''
	category:'Views-Lists'
!


!ListEditor class methodsFor:'interface specs'!

windowSpec
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:ListEditor andSelector:#windowSpec
     ListEditor new openInterface:#windowSpec
     ListEditor open
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #window: 
           #(#WindowSpec
              #name: 'NewApplication'
              #layout: #(#LayoutFrame 134 0 100 0 433 0 399 0)
              #level: 0
              #label: 'NewApplication'
              #min: #(#Point 10 10)
              #max: #(#Point 800 553)
              #bounds: #(#Rectangle 134 100 434 400)
              #usePreferredExtent: false
          )
          #component: 
           #(#SpecCollection
              #collection: 
               #(
                 #(#SequenceViewSpec
                    #name: 'choiceList'
                    #layout: #(#LayoutFrame 0 0.0 30 0.0 -12 0.5 0 1.0)
                    #model: #choiceSelection
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #useIndex: true
                    #sequenceList: #choiceList
                )
                 #(#SequenceViewSpec
                    #name: 'selectionList'
                    #layout: #(#LayoutFrame 12 0.5 30 0.0 0 1.0 0 1.0)
                    #model: #selectionSelection
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #useIndex: true
                    #sequenceList: #selectionList
                )
                 #(#LabelSpec
                    #name: 'choiceLabel'
                    #layout: #(#LayoutFrame 0 0.0 0 0 -20 0.5 30 0)
                    #label: 'Choices'
                    #translateLabel: true
                )
                 #(#LabelSpec
                    #name: 'selectionLabel'
                    #layout: #(#LayoutFrame 20 0.5 0 0 0 1.0 30 0)
                    #label: 'Selected'
                    #translateLabel: true
                )
                 #(#ArrowButtonSpec
                    #name: 'addButton'
                    #layout: #(#LayoutFrame -10 0.5 -25 0.5 10 0.5 -5 0.5)
                    #model: #addToSelection
                    #isTriggerOnDown: true
                    #direction: #right
                )
                 #(#ArrowButtonSpec
                    #name: 'removeButton'
                    #layout: #(#LayoutFrame -10 0.5 5 0.5 10 0.5 25 0.5)
                    #model: #removeFromSelection
                    #isTriggerOnDown: true
                    #direction: #left
                )
              )
          )
      )

    "Modified: / 7.3.1999 / 00:43:21 / cg"
! !

!ListEditor methodsFor:'actions'!

addToSelection
    "automatically generated by UIPainter ..."

    "*** the code below performs no action"
    "*** (except for some feedback on the Transcript)"
    "*** Please change as required and accept in the browser."

    "action to be added ..."

    Transcript showCR:self class name, ': action for addToSelection ...'.

    "Created: / 7.3.1999 / 00:44:23 / cg"
!

removeFromSelection
    "automatically generated by UIPainter ..."

    "*** the code below performs no action"
    "*** (except for some feedback on the Transcript)"
    "*** Please change as required and accept in the browser."

    "action to be added ..."

    Transcript showCR:self class name, ': action for removeFromSelection ...'.

    "Created: / 7.3.1999 / 00:44:24 / cg"
! !

!ListEditor methodsFor:'aspects'!

choiceList
    choiceList isNil ifTrue:[
        choiceList :=  ValueHolder new.
    ].
    ^ choiceList.

    "Created: / 7.3.1999 / 00:44:23 / cg"
    "Modified: / 7.3.1999 / 00:45:51 / cg"
!

choiceSelection
    choiceSelection isNil ifTrue:[
        choiceSelection := ValueHolder new.
    ].
    ^ choiceSelection.

    "Created: / 7.3.1999 / 00:44:23 / cg"
    "Modified: / 7.3.1999 / 00:46:29 / cg"
!

selectionList
    selectionList isNil ifTrue:[
        selectionList :=  ValueHolder new.
    ].
    ^ selectionList.

    "Created: / 7.3.1999 / 00:44:23 / cg"
    "Modified: / 7.3.1999 / 00:47:34 / cg"
!

selectionSelection
    selectionSelection isNil ifTrue:[
        selectionSelection :=  ValueHolder new.
    ].
    ^ selectionSelection.

    "Created: / 7.3.1999 / 00:44:23 / cg"
    "Modified: / 7.3.1999 / 00:48:27 / cg"
! !

!ListEditor class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libwidg2/ListEditor.st,v 1.2 1999-03-07 13:39:54 cg Exp $'
! !