MenuComponentSpec subclass:#GraphColumnViewSpec
instanceVariableNames:'listHolder showGrid showDefaultMenu level borderWidth zoomY
windowSize'
classVariableNames:''
poolDictionaries:''
category:'Interface-Support-UI-Specs'
!
!GraphColumnViewSpec class methodsFor:'class initialization'!
initialize
"add an entry for my new components to the UIPainters
userDef gallery"
UISelectionPanel userClass
addUserSpecHolder:[self graphSpec]
label:'Graphs'
"
self initialize
"
!
removeFromSystem
"remove myself - this implies deinstallation from the UIGallery"
UISelectionPanel userClass removeUserSpecWithLabel:'Graphs'.
^ super removeFromSystem.
! !
!GraphColumnViewSpec class methodsFor:'interface - painter'!
addBindingsTo:env for:inst channel:aChannel
super addBindingsTo:env for:inst channel:aChannel.
self
adaptApects:
#(
showGrid
showDefaultMenu
)
to:env
for:inst
channel:aChannel.
self
adaptApects:
#(
zoomY
windowSize
)
to:env
for:inst
channel:aChannel
converter:#symbolOrNil.
self
adaptApects:
#(
level
borderWidth
)
to:env
for:inst
channel:aChannel
converter:#numberOrNil.
! !
!GraphColumnViewSpec class methodsFor:'interface gallery'!
graphSpec
"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:self andSelector:#graphSpec
self new openInterface:#graphSpec
"
<resource: #canvas>
^
#(#FullSpec
#'window:'
#(#WindowSpec
#'name:' 'Views'
#'layout:' #(#LayoutFrame 212 0 194 0 691 0 422 0)
#'label:' 'Views'
#'min:' #(#Point 10 10)
#'max:' #(#Point 1280 1024)
#'bounds:' #(#Rectangle 212 194 692 423)
#'usePreferredExtent:' false
)
#'component:'
#(#SpecCollection
#'collection:'
#(
#(#GraphColumnView2DSpec
#'name:' '2D Graph'
#'layout:' #(#LayoutFrame 15 0 10 0 180 0 90 0)
#'showGrid:' true
#'gridX:' 2
#'gridY:' 2
)
#(#LabelSpec
#'name:' '2D Graph Label'
#'layout:' #(#Point 15 96)
#'label:' 'Graph Column View 2D'
#'style:' #(#FontDescription #helvetica #medium #roman #'10')
#'adjust:' #left
#'resizeForLabel:' true
#'canUIDrag:' false
)
#(#GraphColumnView3DSpec
#'name:' '3D Graph'
#'layout:' #(#LayoutFrame 206 0 10 0 371 0 90 0)
#'showGrid:' true
)
#(#LabelSpec
#'name:' '3D Graph Label'
#'layout:' #(#Point 206 96)
#'label:' 'Graph Column View 3D'
#'style:' #(#FontDescription #helvetica #medium #roman #'10')
#'adjust:' #left
#'resizeForLabel:' true
#'canUIDrag:' false
)
)
)
)
! !
!GraphColumnViewSpec class methodsFor:'interface specs'!
basicsEditSpec
"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:self andSelector:#basicsEditSpec
self new openInterface:#basicsEditSpec
"
<resource: #canvas>
^
#(#FullSpec
#'window:'
#(#WindowSpec
#'name:' 'Graph 2D Basic'
#'layout:' #(#LayoutFrame 219 0 193 0 530 0 459 0)
#'label:' 'Graph 2D Basic'
#'min:' #(#Point 10 10)
#'max:' #(#Point 1160 870)
#'bounds:' #(#Rectangle 219 193 531 460)
#'usePreferredExtent:' false
)
#'component:'
#(#SpecCollection
#'collection:'
#(
#(#LabelSpec
#'name:' 'nameLabel'
#'layout:' #(#AlignmentOrigin 73 0 31 0 1 0.5)
#'label:' 'ID:'
#'adjust:' #right
#'resizeForLabel:' true
)
#(#InputFieldSpec
#'name:' 'nameField'
#'layout:' #(#LayoutFrame 75 0 20 0 -2 1.0 45 0)
#'activeHelpKey:' #id
#'model:' #name
)
#(#LabelSpec
#'name:' 'modelLabel'
#'layout:' #(#AlignmentOrigin 73 0 60 0 1 0.5)
#'label:' 'Model:'
#'resizeForLabel:' true
)
#(#InputFieldSpec
#'name:' 'modelField'
#'layout:' #(#LayoutFrame 75 0 49 0 -2 1 74 0)
#'activeHelpKey:' #model
#'tabable:' true
#'model:' #model
)
#(#UISubSpecification
#'name:' 'menuSubSpec'
#'layout:' #(#LayoutFrame 0 0.0 123 0 0 1.0 180 0)
#'majorKey:' #UISpecification
#'minorKey:' #menuSubSpec
)
#(#CheckBoxSpec
#'name:' 'showDefaultMenu'
#'layout:' #(#AlignmentOrigin 97 0 197 0 0 0.5)
#'model:' #showDefaultMenu
#'label:' 'Default Menu'
)
)
)
)
! !
!GraphColumnViewSpec methodsFor:'accessing'!
borderWidth
"return the value of the instance variable 'borderWidth' (automatically generated)"
^ borderWidth ? 0
!
borderWidth:something
"set the value of the instance variable 'borderWidth' (automatically generated)"
borderWidth := something.!
level
"return the value of the instance variable 'level' (automatically generated)"
^ level ? 0
!
level:something
"set the value of the instance variable 'level' (automatically generated)"
level := something.!
listHolder
"return the value of the instance variable 'listHolder' (automatically generated)"
^ listHolder!
listHolder:something
"set the value of the instance variable 'listHolder' (automatically generated)"
listHolder := something.!
showDefaultMenu
"return the value of the instance variable 'showDefaultMenu' (automatically generated)"
^ showDefaultMenu ? false
!
showDefaultMenu:something
"set the value of the instance variable 'showDefaultMenu' (automatically generated)"
showDefaultMenu := something.!
showGrid
"return the value of the instance variable 'showGrid' (automatically generated)"
^ showGrid ? false
!
showGrid:something
"set the value of the instance variable 'showGrid' (automatically generated)"
showGrid := something.!
windowSize
"return the value of the instance variable 'windowSize' (automatically generated)"
^ windowSize!
windowSize:something
"set the value of the instance variable 'windowSize' (automatically generated)"
windowSize := something.!
zoomY
"return the value of the instance variable 'zoomY' (automatically generated)"
^ zoomY!
zoomY:something
"set the value of the instance variable 'zoomY' (automatically generated)"
zoomY := something.! !
!GraphColumnViewSpec methodsFor:'building'!
aspectSelectors
"add more aspect selectors
"
|more|
more := super aspectSelectors.
windowSize notNil ifTrue:[more add:windowSize].
zoomY notNil ifTrue:[more add:zoomY].
^ more
!
setAttributesIn:aView with:aBuilder
super setAttributesIn:aView with:aBuilder.
aView level:(self level).
aView showGrid:(self showGrid).
aView showDefaultMenu:(self showDefaultMenu).
aView borderWidth:(self borderWidth).
aBuilder isEditing ifFalse:[
windowSize notNil ifTrue:[
aView windowSizeHolder:(self getBindingIn:aBuilder binding:windowSize)
].
zoomY notNil ifTrue:[
aView zoomYHolder:(self getBindingIn:aBuilder binding:zoomY)
].
self setModelAttributeIn:aView with:aBuilder.
self setMenuIn:aView with:aBuilder.
]
! !
!GraphColumnViewSpec methodsFor:'converting'!
skippedInLiteralEncoding
"define the inst-slots which are skiped when generating a literalArrayEncoding"
|l|
l := super skippedInLiteralEncoding asOrderedCollection.
zoomY isNil ifTrue:[l add:#zoomY].
windowSize isNil ifTrue:[l add:#windowSize].
self showGrid ifFalse:[
l add:#showGrid.
].
(self showDefaultMenu and:[menu isNil]) ifFalse:[
l add:#showDefaultMenu
].
self level == 0 ifTrue:[ l add:#level ].
self borderWidth == 0 ifTrue:[ l add:#borderWidth ].
^ l
! !
!GraphColumnViewSpec methodsFor:'parsing a view'!
fromView:aView callBack:aBlock
showGrid := aView showGrid.
showDefaultMenu := aView showDefaultMenu.
level := aView level.
borderWidth := aView borderWidth.
super fromView:aView callBack:aBlock
! !
!GraphColumnViewSpec methodsFor:'queries'!
defaultModelClassFor:someAspect
"used by the UIPainters aspectGenerator
"
^ someAspect == model ifTrue:[List] ifFalse:[ValueHolder]
! !
!GraphColumnViewSpec class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libwidg2/GraphColumnViewSpec.st,v 1.3 1998-02-07 16:01:49 ca Exp $'
! !
GraphColumnViewSpec initialize!