GraphColumnView3DSpec.st
author ca
Mon, 09 Feb 1998 11:47:09 +0100
changeset 751 616686a9b678
parent 743 d82f2c606b02
child 753 0b6aaced2915
permissions -rw-r--r--
add new functionality

GraphColumnViewSpec subclass:#GraphColumnView3DSpec
	instanceVariableNames:'rotateX rotateY rotateZ zoomZ'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Support-UI-Specs'
!


!GraphColumnView3DSpec class methodsFor:'interface - painter'!

addBindingsTo:env for:inst channel:aChannel 

    super addBindingsTo:env for:inst channel:aChannel.

    self 
        adaptApects:
                    #(  
                        rotateX
                        rotateY
                        rotateZ
                        zoomZ
                     )
        to:env 
        for:inst 
        channel:aChannel
        converter:#symbolOrNil.

!

slices
    ^ #(
            (Basics    basicsEditSpec)
            (Details   detailsEditSpec)
            (Misc      basicsMiscSpec)
       )


! !

!GraphColumnView3DSpec class methodsFor:'interface specs'!

basicsMiscSpec
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:GraphColumnView3DSpec andSelector:#basicsMiscSpec
     GraphColumnView3DSpec new openInterface:#basicsMiscSpec
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Graph 2D Detail'
              #'layout:' #(#LayoutFrame 530 0 165 0 914 0 671 0)
              #'label:' 'Graph 2D Detail'
              #'min:' #(#Point 10 10)
              #'max:' #(#Point 1160 870)
              #'bounds:' #(#Rectangle 530 165 915 672)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'RotationLabel'
                    #'layout:' #(#Point 22 21)
                    #'label:' 'Rotation:'
                    #'resizeForLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'XLabel'
                    #'layout:' #(#AlignmentOrigin 75 0 62 0 1 0.5)
                    #'label:' 'X:'
                    #'adjust:' #left
                    #'resizeForLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'XField'
                    #'layout:' #(#LayoutFrame 80 0 52 0 -2 1.0 74 0)
                    #'model:' #rotateX
                )
                 #(#LabelSpec
                    #'name:' 'YLabel'
                    #'layout:' #(#AlignmentOrigin 75 0 85 0 1 0.5)
                    #'label:' 'Y:'
                    #'adjust:' #left
                    #'resizeForLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'YField'
                    #'layout:' #(#LayoutFrame 80 0 75 0 -2 1.0 97 0)
                    #'model:' #rotateY
                )
                 #(#LabelSpec
                    #'name:' 'ZLabel'
                    #'layout:' #(#AlignmentOrigin 75 0 108 0 1 0.5)
                    #'label:' 'Z:'
                    #'adjust:' #left
                    #'resizeForLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'ZField'
                    #'layout:' #(#LayoutFrame 80 0 98 0 -2 1.0 120 0)
                    #'model:' #rotateZ
                )
              )
          )
      )
!

detailsEditSpec
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:GraphColumnView3DSpec andSelector:#detailsEditSpec
     GraphColumnView3DSpec new openInterface:#detailsEditSpec
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Graph 2D Detail'
              #'layout:' #(#LayoutFrame 6 0 142 0 379 0 445 0)
              #'label:' 'Graph 2D Detail'
              #'min:' #(#Point 10 10)
              #'max:' #(#Point 1160 870)
              #'bounds:' #(#Rectangle 6 142 380 446)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#UISubSpecification
                    #'name:' 'subDetailsSpec'
                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 210 0)
                    #'minorKey:' #subDetailsEditSpec
                )
                 #(#CheckBoxSpec
                    #'name:' 'showGrid'
                    #'layout:' #(#Point 27 259)
                    #'tabable:' true
                    #'model:' #showGrid
                    #'label:' 'Show Grid'
                )
                 #(#LabelSpec
                    #'name:' 'zoomZLabel'
                    #'layout:' #(#AlignmentOrigin 157 0 220 0 1 0.5)
                    #'label:' 'Zoom-Z Factor:'
                    #'adjust:' #left
                    #'resizeForLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'zoomZField'
                    #'layout:' #(#LayoutFrame 161 0 210 0 -2 1.0 232 0)
                    #'model:' #zoomZ
                )
              )
          )
      )
! !

!GraphColumnView3DSpec methodsFor:'accessing'!

rotateX
    "return the value of the instance variable 'rotateX' (automatically generated)"

    ^ rotateX
!

rotateX:something
    "set the value of the instance variable 'rotateX' (automatically generated)"

    rotateX := something.!

rotateY
    "return the value of the instance variable 'rotateY' (automatically generated)"

    ^ rotateY
!

rotateY:something
    "set the value of the instance variable 'rotateY' (automatically generated)"

    rotateY := something.!

rotateZ
    "return the value of the instance variable 'rotateZ' (automatically generated)"

    ^ rotateZ
!

rotateZ:something
    "set the value of the instance variable 'rotateZ' (automatically generated)"

    rotateZ := something.!

zoomZ
    "return the value of the instance variable 'zoomZ' (automatically generated)"

    ^ zoomZ!

zoomZ:something
    "set the value of the instance variable 'zoomZ' (automatically generated)"

    zoomZ := something.! !

!GraphColumnView3DSpec methodsFor:'building'!

aspectSelectors
    "add more aspect selectors
    "
    |more|

    more := super aspectSelectors.

    rotateX notNil ifTrue:[more add:rotateX].
    rotateY notNil ifTrue:[more add:rotateY].
    rotateZ notNil ifTrue:[more add:rotateZ].
    zoomZ   notNil ifTrue:[more add:zoomZ].

  ^ more


!

createViewFor:aBuilder in:aView
    "low level create - no attributes are set.
    "
    |newView|

    aBuilder isEditing ifFalse:[
        ^ super createViewFor:aBuilder in:aView
    ].

    (GraphColumnView isSubclassOf:SimpleView) ifTrue:[
        newView := GraphColumnView in:aView
    ] ifFalse:[
        newView := GraphColumnView new.
        aView notNil ifTrue:[aView add:newView].
    ].
    ^ newView


!

setAttributesIn:aView with:aBuilder

    super setAttributesIn:aView with:aBuilder.

    aBuilder isEditing ifFalse:[
        rotateX notNil ifTrue:[ aView rotateXHolder:(self getBindingIn:aBuilder binding:rotateX) ].
        rotateY notNil ifTrue:[ aView rotateYHolder:(self getBindingIn:aBuilder binding:rotateY) ].
        rotateZ notNil ifTrue:[ aView rotateZHolder:(self getBindingIn:aBuilder binding:rotateZ) ].

        zoomZ notNil ifTrue:[ aView zoomZHolder:(self getBindingIn:aBuilder binding:zoomZ) ].
    ]
! !

!GraphColumnView3DSpec methodsFor:'converting'!

skippedInLiteralEncoding
    "define the inst-slots which are skiped when generating a literalArrayEncoding"

    |l|

    l := super skippedInLiteralEncoding asOrderedCollection.

    rotateX isNil ifTrue:[l add:#rotateX].
    rotateY isNil ifTrue:[l add:#rotateY].
    rotateZ isNil ifTrue:[l add:#rotateZ].
    zoomZ isNil   ifTrue:[l add:#zoomZ].

    ^ l
! !

!GraphColumnView3DSpec class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libwidg2/GraphColumnView3DSpec.st,v 1.3 1998-02-09 10:47:02 ca Exp $'
! !