|
Class: GraphColumn
Object
|
+--Model
|
+--GraphColumn
- Package:
- stx:libwidg2
- Category:
- Views-Graphs
- Version:
- rev:
1.8
date: 2024/03/19 09:05:15
- user: cg
- file: GraphColumn.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- Claus Atzkern
a model, which keeps all the information to describe a graph column as used by
the GraphColumnView. Each change of an attribute will raise a change notification
and immediately take affect in the graphs
GraphColumnView
GraphColumnView2D
GraphColumnView3D
constants
-
lineStyleFor: aStyle
-
returns the valid style for a style; supported styles
are:
#dashed and #solid
instance creation
-
name: aName
-
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
menu definitions
-
colorMenuSelector: aSelector
-
specification used to build the Menu
-
middleButtonMenu
-
this window spec was automatically generated by the ST/X MenuEditor
Usage example(s):
MenuEditor new openOnClass:GraphColumn andSelector:#middleButtonMenu
(Menu new fromLiteralArrayEncoding:(GraphColumn middleButtonMenu)) startUp
|
-
styleMenuSelector: aSelector
-
(self styleMenuSelector:#lineStyle) startUp
-
widthMenuSelector: aSelector
-
(self widthMenuSelector:#lineWidth) startUp
-
zoomMenuSelector: aSelector
-
specification used to build the Menu
Usage example(s):
(self zoomMenuSelector:#zoomY) startUp
|
accessing
-
name
-
get the name of the column
-
name: aName
-
set the name of the column
-
relativeXaxis
-
returns the relative X-axis (y == 0) into the graph view; starting at top (0.0) to
bottom (1.0). Thus a relative X axis of 0.5 means the graph is centered in the view.
-
relativeXaxis: aValue
-
sets the relative X-axis (y == 0) into the graph view; starting at top (0.0) to
bottom (1.0). Thus a relative X axis of 0.5 means the graph is centered in the view.
In case that the value is not a valid number, the relative X axis is set to 0.5.
-
scaleY
-
returns the current y-scale of the column (~~ 0); this value should be set once
dependent on the maximum and minimum Y value. To zoom the graph vertical use
insteat #zoomY:.
-
scaleY: aFactor
-
set the current y-scale of the column (~~ 0); this value should be set once
dependent on the maximum and minimum Y value. To zoom the graph vertical use
insteat #zoomY:.
In case that the value is not a valid number or less equal zero, the scale Y
factor is set to its default value (1).
-
shown
-
returns true if the column is shown otherwise false
-
shown: aState
-
set the visibility state of the column
-
transY
-
get the current y-translation of the column; the default is 0
-
transY: aValue
-
set the current y-translation of the column to an integer or nil (== 0).
-
zoomY
-
returns the current y-zoom factor of the column excluding the scale Y factor
-
zoomY: aFactor
-
set the current y-zoom factor of the column. The graph and its
horizontal lines are vertical zoomed relative to its center defined
by the relativeXaxis.
In case that the value is not a valid number or less equal zero, the zoom Y
factor is set to its default value (1).
accessing Y function
-
functionYblock
-
get the two arguments block which is used to access Y values from
start into an array. The block should return the collection of y
values; see method: #from:into:
-
functionYblock: something
-
set the two arguments block which is used to access Y values from
start into an array. The block should return the collection of y
values; see method: #from:into:
accessing Y values
-
yValueAt: anIndex
-
returns the Y value at an index
-
yValuesStartAt: start into: anArray
-
returns the Y values from start upto an array size.
The collection of Y values should be returned.
You can use the argument anArray, to store the Y values and return it
or ignore it and return a new array.
The functionYblock is obligated to return the array used
accessing graph
-
foregroundColor
-
returns the color of the graph; if the color is nil the default foreground color
of the graph is used which derives from the style sheet.
-
foregroundColor: aColor
-
set the color of the graph; if the color is nil the default foreground color
of the graph is used which derives from the style sheet.
-
lineStyle
-
returns the style in which the graph is drawn; if no style is defined, the
default style is used (#solid).
Supported styles are:
#solid or #dashed
-
lineStyle: aStyle
-
set the style in which the graph is drawn; if no style is defined or
in case of a non valid style, the default style is used (#solid).
Supported styles are:
#solid or #dashed
-
lineWidth
-
returns the width of the graph line
-
lineWidth: anInteger
-
set the width of the graph line; if the width is not defined or
not a valid number, the default value is set (1).
accessing hLines
-
hLineFgColor
-
returns the color of the horizontal lines; if the color is nil the default foreground
color of the graph is used which derives from the style sheet.
-
hLineFgColor: aColor
-
set the color of the horizontal lines; if the color is nil the default foreground
color of the graph is used which derives from the style sheet.
-
hLineList
-
returns the list of horizontal lines or nil
-
hLineList: aCollection
-
set the list of horizontal lines to be drawn
-
hLineStyle
-
returns the style in which the horizontal lines are drawn; if no style is
defined, the default style is used (#solid).
Supported styles are:
#solid or #dashed
-
hLineStyle: aStyle
-
set the style in which the horizontal lines are drawn; if no style is defined
or in case of a non valid style, the default style is used (#solid).
Supported styles are:
#solid or #dashed.
-
hLineWidth
-
returns the width of the horizontal lines
-
hLineWidth: anInteger
-
set the width of the horizontal lines; if the width is not defined or
not a valid number, the default value is set (1).
accessing menu
-
middleButtonMenu
-
returns the default middle button menu of a column
accessing without notify
-
setForegroundColor: aColor
-
set the color of the graph; if the color is nil the default foreground color
of the graph is used which derives from the style sheet.
No change notification is raised
-
setHLineFgColor: aColor
-
set the color of the horizontal lines; if the color is nil the default foreground
color of the graph is used which derives from the style sheet.
No change notification is raised
-
setHLineList: aCollection
-
set the list of horizontal lines to be drawn; no
change notification is raised
-
setHLineStyle: aStyle
-
set the style in which the horizontal lines are drawn; if no style is defined
or in case of a non valid style, the default style is used (#solid).
No change notification is raised.
Supported styles are:
#solid or #dashed.
-
setHLineWidth: anInteger
-
set the width of the horizontal lines; if the width is not defined or
not a valid number, the default value is set (1).
No change notification is raised.
-
setLineStyle: aStyle
-
set the style in which the graph is drawn; if no style is defined or
in case of a non valid style, the default style is used (#solid).
No change notification is raised.
Supported styles are:
#solid or #dashed
-
setLineWidth: anInteger
-
set the width of the graph line; if the width is not defined or
not a valid number, the default value is set (1).
No change notification is raised
-
setName: aName
-
set the name of the column; no change notification is raised
-
setRelativeXaxis: aValue
-
sets the relative X-axis (y == 0) into the graph view; starting at top (0.0) to
bottom (1.0). Thus a relative X axis of 0.5 means the graph is centered in the view.
In case that the value is not a valid number, the relative X axis is set to 0.5.
No change notification is raised.
-
setScaleY: aFactor
-
set the current y-scale of the column (~~ 0); this value should be set once
dependent on the maximum and minimum Y value. To zoom the graph vertical use
insteat #zoomY:.
In case that the value is not a valid number or less equal zero, the scale Y
factor is set to its default value (1).
No change notification is raised.
-
setShown: aState
-
set the visibility state of the column;
no notification is raised
-
setTransY: aValue
-
set the current y-translation of the column to an integer or nil (== 0).
no notification is raised
-
setZoomY: aFactor
-
set the current y-zoom factor of the column. The graph and its
horizontal lines are vertical zoomed relative to its center defined
by the relativeXaxis.
In case that the value is not a valid number or less equal zero, the zoom Y
factor is set to its default value (1).
No change notification is raised.
aspects
-
aspect
-
returns current aspects
-
aspectAt: aKey put: aValue
-
set an aspect; if the aspect changed its value, a notification will
be raised. The arguments to the change notifications is the key of
the aspect (selector) and the old value of the aspect.
-
aspects: aDictionaryOrNil
-
change aspects; raise a change notification when changed. If the argument is
nil, the default aspects are set
-
setAspects: aDictionaryOrNil
-
change aspects; raise no notification. If the argument is
nil, the default aspects are set
-
withoutNotificationAspectAt: aKey put: aValue
-
set an aspect without a change notification
conversion
-
integerFrom: aValue onError: aBlock
-
converts something to an integer, on error the result of the block is returned
-
numberFrom: aValue onError: aBlock
-
converts something to a number (no fractions); on error
the result of the block is returned
initialization
-
initialize
-
setup default values
printing
-
printString
-
returns my printable string
queries
-
centerGraphMaxY: maxY minY: minY
-
set the translation Y for the graph dependent on the current scaleY, the maximum
and minimum Y value; the graph is centered to its relative X-Axis.
-
scaleToHeight: aHeight maxY: maxY minY: minY
-
set the scale Y value dependent on the maximum and minimum Y value to fit into
a height >= 1
|