eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RangeAdaptor':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RangeAdaptor


Inheritance:

   Object
   |
   +--Model
      |
      +--ValueModel
         |
         +--ValueHolder
            |
            +--RangeAdaptor

Package:
stx:libview2
Category:
Interface-Support-Models
Version:
rev: 1.3 date: 2000/02/05 14:21:30
user: cg
file: RangeAdaptor.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


Range Adaptor is a kind of UpdateAdaptor that can be used to turn an 
arbitrary number (either an Integer or a Float) into a Float normalized between
0 and 1.


Class protocol:

instance creation
o  on: aSubject start: aStart stop: aStop grid: aGrid

o  on: aSubject stop: aStop

o  on: aSubject stop: aStop grid: aGrid


Instance protocol:

accessing
o  grid
return the value of the instance variable 'grid' (automatically generated)

o  grid: something
set the value of the instance variable 'grid' (automatically generated)

o  rangeStart
return the value of the instance variable 'rangeStart' (automatically generated)

o  rangeStart: something
set the value of the instance variable 'rangeStart' (automatically generated)

o  rangeStop
return the value of the instance variable 'rangeStop' (automatically generated)

o  rangeStop: something
set the value of the instance variable 'rangeStop' (automatically generated)

o  setValue: aNumber
physically set my value, without change notifications

o  subject

o  subject: aValue

o  value
return my value

o  value: aNumber
physically set my value, without change notifications

actions
o  decrement
deccrement my value by grid

o  increment
increment my value by grid

change & update
o  update: something with: aParameter from: changedObject
translate an update from the model into a #value-change
via my depenedents ...

dependents access
o  addDependent: anObject
make the argument, anObject be a dependent of the receiver

o  release
remove all dependencies from the receiver

o  removeDependent: anObject
make the argument, anObject be independent of the receiver

initialization
o  initialize

private
o  setSubjectsValue: aNewValue


Examples:


scale values 0..1 in the RA to 0..100 in the original model:
|m r|

m := 0 asValue.
r := RangeAdaptor on:m start:0 stop:100 grid:1.
m inspect.
r inspect.


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sat, 17 Nov 2018 09:17:37 GMT