eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'GraphColumnView2D':

Home

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

Class: GraphColumnView2D


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--GraphColumnView
                  |
                  +--GraphColumnView2D

Package:
stx:libwidg2
Category:
Views-Graphs
Version:
rev: 1.22 date: 2024/04/11 10:02:39
user: matilk
file: GraphColumnView2D.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Atzkern

Description:


The class provides all the functionality for showing, scrolling and manipulating graphs
described through to a GraphColumn description. Each change in a graph description
immediately take affect.


Related information:

    GraphColumn
    GraphColumnView
    GraphColumnView3D

Class protocol:

defaults
o  gridStep

examples
o  test0
testing references and actions

start with:
self test0

o  test0b
testing references and actions

start with:
self test0b

o  test1
testing references and actions

start with:
self test1

o  test2
testing models and change notifications

start with:
self test2

o  test3
testing models and change notifications

start with:
self test3

o  testRun
running view

start with:
self testRun

menu
o  defaultMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.

Usage example(s):

     MenuEditor new openOnClass:GraphColumnView2D andSelector:#defaultMenu
     (Menu new fromLiteralArrayEncoding:(GraphColumnView2D defaultMenu)) startUp

o  gridStepMenuSelector: aSelector
(self styleMenuSelector:#lineStyle) startUp

plugIn spec
o  aspectSelectors
Return a description of exported aspects;
these can be connected to aspects of an embedding application
(if this app is embedded in a subCanvas).


Instance protocol:

accessing actions
o  action
action block which is performed on a single button click.
Number of arguments to the block can be 0 upto 4.

argument 1: nearest column to the click point
argument 2: the logical index (X)
argument 3: the distance y from the click point to the columns's graph
argument 4: physical y value

o  action: aBlockUpTo4Args
action block which is performed on a single button click.
Number of arguments to the block can be 0 upto 4.

argument 1: nearest column to the click point
argument 2: the logical index (X)
argument 3: the distance y from the click point to the columns's graph
argument 4: physical y value

o  buttonReleaseBlock
action block which is performed if the button is released; the number
of arguments to the block can be 0 upto 3.

argument 1: physical x value
argument 2: physical y value
argument 3: the logical index (X)

o  buttonReleaseBlock: aThreeArgAction
action block which is performed if the button is released; the number
of arguments to the block can be 0 upto 3.

argument 1: physical x value
argument 2: physical x value
argument 3: the logical index (X)

o  doubleClickAction
action block which is performed on a double button click.
Number of arguments to the block can be 0 upto 4.

argument 1: nearest column to the click point
argument 2: the logical index (X)
argument 3: the distance y from the click point to the columns's graph
argument 4: physical y value

o  doubleClickAction: aBlockUpTo4Args
action block which is performed on a double button click.
Number of arguments to the block can be 0 upto 4.

argument 1: nearest column to the click point
argument 2: the logical index (X)
argument 3: the distance y from the click point to the columns's graph
argument 4: physical y value

o  menuAccessBlock
action block which is performed if a menu is required; if the block returns
nil, the default middlebutton menu is evaluated.

Number of arguments to the block can be 0 upto 4.

argument 1: nearest column to the click point
argument 2: the logical index (X)
argument 3: the distance y from the click point to the columns's graph
argument 4: physical y value

o  menuAccessBlock: aBlockUpTo4Args
action block which is performed if a menu is required; if the block returns
nil, the default middlebutton menu is evaluated.

Number of arguments to the block can be 0 upto 4.

argument 1: nearest column to the click point
argument 2: the logical index (X)
argument 3: the distance y from the click point to the columns's graph
argument 4: physical y value

accessing dimensions
o  gridExtent
returns the x/y extent of the grid

o  gridExtent: anExtent
set the x/y extent of the grid

o  gridX
returns the horizontal size of the grid or 0 if the horizontal grid is disabled

o  gridX: aValue
set the horizontal size of the grid or 0 if the horizontal grid should be invisible

o  gridY
returns the vertical size of the grid or 0 if the vertical grid is disabled

o  gridY: aValue
set the vertical size of the grid or 0 if the vertical grid should be invisible

change & update
o  changedGraphIn: aColumn what: what from: oldValue
the graph assigned to the column description changed

o  changedHLineIn: aColumn what: what from: oldValue
the horizontal lines assigned to the column description changed

displaying
o  displayOn: aGC
ST-80 Compatibility
display the receiver in a graphicsContext at 0@0
- this method allows for any object to be displayed in some view
or on a printer
(although the fallBack is to display its printString ...)

o  displayOn: aGC at: aPoint
ST-80 Compatibility
display the receiver in a graphicsContext - this method allows
for any object to be displayed on a Printer - for example.

o  displayOn: aGC x: x y: y
ST-80 Compatibility
display the receiver in a graphicsContext - this method allows
for any object to be displayed on a Printer - for example.

o  displayOn: aGC x: x y: y w: w h: h

o  image
retrieve the current visible contents as bitmap image

drawing
o  clearColumnAndRedraw: aColumn
undraw a column and redraw the view without clearing the background

o  redrawColumn: aColumn
redraw a column including the horizontal lines
and the graph of the column

o  redrawColumnAt: anIndex
redraw a column at an index including the horizontal lines
and the graph of the column

o  redrawX: x y: y width: w height: h
clear and redraw

drawing basics
o  drawGRC: aColumn x: xStart step: xStep scaleY: yScale transY: yTrans ydata: yData
draw a graph

o  drawGRX: xStart step: xStep scaleY: yScale transY: yTrans ydata: ydata with: aColor style: aStyle width: aWidth
draw a graph

o  drawHLC: aColumn x: x y: y toX: xMax y: yMax scaleY: yScale transY: yTrans
draw horizontal lines derived from column

o  drawHLN: aList x: x y: y toX: xMax y: yMax scaleY: yScale transY: yTrans with: aColor style: aStyle width: aWidth
draw horizontal lines derived from list

o  drawReferencesFromX: x0 y: y0 to: x1 y: y1
redraw visible references

o  drawX: x y: y width: w height: h
redraw without clearing the background

o  undrawColumn: aColumn scaleY: scaleY transY: transY
undraw a column, than redraw all without clearing the background

event handling
o  buttonMultiPress: button x: x y: y
handle a button double click event

o  buttonPress: button x: x y: y
handle a button press event

o  buttonPressBlock: aBlock x: x y: y
evaluate the user defined block if not nil dependent on its required
arguments; the result of the block is returned

o  buttonRelease: button x: x y: y
handle a button release event

initialization
o  initialize
setup default values

o  unrealize
clear colorMap

menu
o  doPrint
print the current visible contents on the printer

private
o  mapColor: aColor
get the same color on the device. If the argument is
nil, the foreground color is returned.

o  yDataForColumn: aColumn
returns collection of visible Y-data for a column

protocol
o  doRecomputeGraph
called to recompute drawable objects and to set the graph to invalidate

o  updateColumns: what with: oldValue from: aColumn
called if the list of columns changed
#size the size of the columns
#color: color changed
or a specific column:( aColumn notNil )
#insert: insert a new column
#remove: remove a column

or a specific attribute derived from the
changed column.

o  updateOriginX: nIndices
scroll left or right n x-steps. A positive value scrolls to the right
a negative value to the left.

o  updateReferences: what atRelX: relX
called when the list of references changed.
#remove: the reference at the relative X index is removed
#insert: a reference is inserted at the relative X index
#size the list of references changed
#state visibility state changed
#color the foreground color changed

queries
o  absoluteIndexOfX: x
returns the absolute X value for a visible x

o  nearestColumnAtX: x y: y
returns an association containing the nearest column as key and the absolute y-distance
to the point x/y. If no columns exists nil is returned

transformations
o  absScaleY: aNumber zoomY: aZoomY
returns y-scale for a scale Y and a zoom factor

o  absTransY: aNumber relativeTo: xAxis zoomY: aZoomY
returns absolute translation Y for a number relative
to a x-axis

o  scaleYofColumn: aColumn
returns current y-scale of a column on my view

o  stepX
returns width of X measured in pixels; no fraction returned

o  transYofColumn: aColumn
returns current y-translation of a column on my view

user interaction & notifications
o  doGridExtent: what
change the grid extent factorial 2 (larger or smaller)

o  doGridStepX: aNumberOrSymbol
change the grid step X

o  doGridStepY: aNumberOrSymbol
change the grid step Y



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Thu, 21 Nov 2024 12:00:45 GMT