eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UpDownButton':

Home

everywhere
www.exept.de
for:
[back]

Class: UpDownButton


Inheritance:

   Object
   |
   +--GraphicsContext
      |
      +--DeviceGraphicsContext
         |
         +--GraphicsMedium
            |
            +--DisplaySurface
               |
               +--SimpleView
                  |
                  +--View
                     |
                     +--UpDownButton

Package:
stx:libwidg2
Category:
Views-Interactors
Version:
rev: 1.22 date: 2004/10/26 10:52:24
user: cg
file: UpDownButton.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Gittinger

Description:


an up/down button - simply two buttons in one view.
This is also called SpinButton.


Related information:

    ArrowButton
    ComboUpDownView

Instance protocol:

accessing-behavior
o  downAction: aBlock
set the down-action

o  enabled

o  enabled: aBoolean

o  upAction: aBlock
set the up-action

accessing-channels
o  backgroundChannel
return a valueHolder for the background color

o  backgroundChannel: aValueHolder
set a valueHolder for the background color

o  enableChannel
return a valueHolder for the enabled-state

o  enableChannel: aValueHolder
set a valueHolder for the enabled-state

o  foregroundChannel
return a valueHolder for the foreground color

o  foregroundChannel: aValueHolder
set a valueHolder for the foreground color

o  model: aModel

accessing-colors
o  backgroundColor
return the backgroundColor

o  backgroundColor: aColor
set the backgroundColor

o  foregroundColor
return the foregroundColor

o  foregroundColor: aColor
set the foregroundColor

o  viewBackground: aColor

accessing-components
o  downButton
return the downButton

o  upButton
return the upButton

accessing-look
o  orientation
return the orientation (a symbol)

o  orientation: aSymbol
set the orientation (#horizontal or #vertical)

change & update
o  sizeChanged: how

event handling
o  changeDown: aValue
down button was pressed, send to my model

o  changeUp: aValue
up button was pressed, send to my model

o  keyPress: aKey x: x y: y
simulate a buttonPress/release

focus handling
o  showFocus: explicit
display myself as having-focus

initialization
o  initialize

o  initializeButtonDimensions

o  initializeButtonForms

o  initializeButtons


Examples:



     |top ud|

     top := StandardSystemView new.
     top extent:(300 @ 200).

     ud := UpDownButton in:top.
     ud origin:(10 @ 10).

     ud upAction:[Transcript showCR:'up'].
     ud downAction:[Transcript showCR:'down'].
     top open.


     |top ud|

     top := StandardSystemView new.
     top extent:(300 @ 200).

     ud := UpDownButton in:top.
     ud origin:(10 @ 10).
     ud model:[:arg| Transcript showCR:arg].
     top open.


     |top ud|

     top := StandardSystemView new.
     top extent:(300 @ 200).

     ud := UpDownButton in:top.
     ud orientation:#horizontal.
     ud origin:(10 @ 10).

     ud upAction:[Transcript showCR:'up'].
     ud downAction:[Transcript showCR:'down'].
     top open.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 23:01:17 GMT