|
Class: GraphColumnView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--GraphColumnView
|
+--GraphColumnView2D
- Package:
- stx:libwidg2
- Category:
- Views-Graphs
- Version:
- rev:
1.11
date: 2023/06/26 17:50:43
- user: cg
- file: GraphColumnView.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- Claus Atzkern
The class describes the common interface supported by the 2D or 3D GraphColumnView.
This Viewclasses provide a lot of functionality for showing and manipulating graphs
described through to a GraphColumn description. Each change in a graph description
immediately take affect in the garph view.
GraphColumn
GraphColumnView2D
GraphColumnView3D
defaults
-
updateStyleCache
-
extract values from the styleSheet and cache them in class variables
Usage example(s):
menu
-
defaultMenu
-
redefined by subclass: should return the default middle button menu
plugIn spec
-
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).
accessing
-
columns
-
returns the list of column descriptions
-
columns: aList
-
set the list of columns descriptions
-
graph: aSingleGraph
-
-
graphOriginX
-
returns the logical index X of the first visible row; this number is used for
accessing Y values from the GraphColumn description. On default, the value
is set to 1.
-
graphOriginX: aNumber
-
set the logical index X of the first visible row; this number is used for
accessing Y values from the GraphColumn description. On default, the value
is set to 1.
Changing the number, a scroll left or right is triggered.
-
referenceSelector
-
returns the selector how to access the X value of an instance into
the reference list. If the selector is nil (default), the entry is
assumed to be the X value.
-
referenceSelector: aSelector
-
set the selector how to access the X value of an instance into the
reference list. If the selector is nil (default), the entry is
assumed to be the X value.
-
references
-
returns list of references
-
references: aListOfReferences
-
change the list of references
-
scrollUpdatesOriginX
-
returns true, if the graphOriginX automatically is updated by
any scroll action. The default is set to false.
-
scrollUpdatesOriginX: aBool
-
set to true if the graphOriginX automatically should be updated by any
scroll action. Otherwise a scroll has no influnce to the current
graphOriginX.
The default is set to false.
-
showDefaultMenu
-
returns true, if the middleButton menu is set to the default menu
provided by the graph.
-
showDefaultMenu: aBool
-
enable or disable the default menu provided by the graph
accessing dimensions
-
windowSize
-
get the number of horizontal steps ( X )
-
windowSize: aValue
-
set the number of horizontal steps ( X )
-
zoomY
-
returns current y-zoom factor
-
zoomY: aValue
-
set the current y-zoom factor; if the argument is nil,
the y-zoom is set to 1.
accessing look
-
backgroundColor
-
returns the current background color of the graph
-
backgroundColor: aColor
-
set the background color of the graph
-
foregroundColor
-
returns the default foreground color used to draw graphs which
has no foreground color specified.
-
foregroundColor: aColor
-
set the default foreground color used to draw graphs which
has no foreground color specified.
-
gridColor
-
returns the foreground color of the grid
-
gridColor: aColor
-
set the foreground color of the grid
-
referenceColor
-
returns the foreground color used to draw the references
-
referenceColor: aColor
-
set the foreground color used to draw the references
-
showGrid
-
returns true if the grid is enabled
-
showGrid: aBool
-
set the visibility state of the grid
-
showReferences
-
returns the visibility state of the references
-
showReferences: aBool
-
set the visibility state of the references
accessing mvc
-
graphOriginXHolder
-
returns the valueHolder, which keeps the current graphOriginX (see: #graphOriginX:)
-
graphOriginXHolder: aHolder
-
set the valueHolder, which keeps the current graphOriginX (see: #graphOriginX:)
-
listHolder
-
returns the valueHolder, which keeps the list of column descriptions (see: #column:)
-
listHolder: aHolder
-
set the valueHolder, which keeps the list of column descriptions (see: #column:)
-
model: aModel
-
set the valueHolder which holds the selection and maybe the list of columns
-
referenceHolder
-
returns the valueHolder, which keeps the list of references (see: #references:)
-
referenceHolder: aHolder
-
set the valueHolder, which keeps the list of references (see: #references:)
-
windowSizeHolder
-
returns the valueHolder, which keeps the windowSize (see: #windowSize:)
-
windowSizeHolder: aHolder
-
set the valueHolder, which keeps the windowSize (see: #windowSize:)
-
zoomYHolder
-
returns the valueHolder, which keeps the zoom Y factor (see: #zoomY:)
-
zoomYHolder: aHolder
-
set the valueHolder, which keeps the zoom Y factor (see: #zoomY:)
add & remove columns
-
add: aColumn
-
insert a column at end; returns the inserted column
-
add: aColumn afterIndex: anIndex
-
add a new column after an index; returns the inserted column
-
add: aColumn beforeIndex: anIndex
-
add a column before an index; returns the inserted column
-
addAll: aCollection beforeIndex: anIndex
-
add a collection of columns before an index
-
addFirst: aColumn
-
insert a column at start; returns the inserted column
-
removeAll
-
remove all columns
-
removeFirst
-
remove first column; returns the removed column
-
removeIndex: anIndex
-
remove column at an index; returns the removed column
-
removeLast
-
remove last column; the removed column is returned
add & remove references
-
referenceAdd: aReference
-
add a reference to end of list
-
referenceAdd: aReference beforeIndex: anIndex
-
add a reference before an index
-
referenceAddAll: aCollection beforeIndex: anIndex
-
add a collection of references before an index
-
referenceRemove: aReference
-
remove a reference
-
referenceRemoveAll
-
remove all references
-
referenceRemoveIndex: anIndex
-
remove the reference at an index
change & update
-
update: what with: aPara from: chgObj
-
catch and handle a change notification of any object
conversion
-
floatFrom: aValue onError: aBlock
-
converts something to a float, on error the result of the block is returned
-
unsignedIntegerFrom: aValue onError: aBlock
-
converts something to an unsigned integer, on error the result of the block is returned
initialization
-
create
-
set color on device
-
destroy
-
remove dependencies
-
initialize
-
setup default values
menu & submenus
-
defaultMenu
-
returns the default middle button menu provided by the graph
-
doZoomY: aValue
-
triggered by the default menu to change the current zoom Y factor;
on change, the corresponding model (zoomYHolder) is updated.
-
subMenuZoomY
-
returns the submenu to configure the zoom Y factor
protocol
-
doInvalidateGraph
-
called to set the graph to invalidate
-
doRecomputeGraph
-
called to recompute drawable objects and to set the
graph to invalidate
-
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.
-
updateGrid: what
-
called if the grid changed
#color the color of the grid changed
#state the visibility state of the grid changed
-
updateOriginX: aDeltaX
-
graph origin X changed; scroll n steps left (aDeltaX < 0) or right (aDeltaX > 0)
-
updateReferences: what atRelX: aRelX
-
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
-
listOfVisibleColumns
-
returns a list of visible lines (never nil)
-
listOfVisibleRefIndices
-
returns a list of visible reference line indices or an empty
collection (nothing defined or disabled).
-
visibleReference: aReference do: aOneArgBlock
-
evaluate the block with the relative visible X value; if the reference line
is not visible, nothing will happen
scrolling
-
halfWindowSizeLeft
-
scroll left half window size
-
halfWindowSizeRight
-
scroll right half window size
-
scroll: nIndices
-
scroll left or right n x-steps. a positive value scrolls to the right
a negative value to the left.
-
scrollLeft: nIndices
-
scroll n indices left
-
scrollRight: nIndices
-
scroll n indices right
-
windowSizeLeft
-
scroll left window size
-
windowSizeRight
-
scroll right window size
|