eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'BarChart3DWidget':

Home

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

Class: BarChart3DWidget


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--ObjectView
                  |
                  +--BarChart3DWidget

Package:
stx:libwidg3
Category:
Views-Graphs
Version:
rev: 1.18 date: 2024/03/18 13:36:20
user: cg
file: BarChart3DWidget.st directory: libwidg3
module: stx stc-classLibrary: libwidg3

Description:


Display a matrix of values as bars in 3D.
The values have to be between 0.0 and 1.0.
The Matrix is given as collection of rows.
Additionally a labeling of rows and columns
is possible.


[instance variables:]

[class variables:]

copyright

COPYRIGHT (c) 2002 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

queries
o  isVisualStartable
Be startable from Browser!

samples
o  sampleLabelsColumns
Return a collection with labels for the columns of a bar matrix.
Attention - Corresponding in size to matrix sample.

o  sampleLabelsRows
Return a collection with labels for the rows of a bar matrix.
Attention - Corresponding in size to matrix sample.

o  sampleMatrix
Return a sample matrix usable
as a model for bar-chart-view.

startup
o  open
Open up with an example.


Instance protocol:

accessing
o  barExtent
Return the extent for one bar.
It is the two dimensional extent.

o  columnGap
Return the gap between two columns of bars.

o  depthVector
Return the depthsVector for all bars and column labels.

o  labelsForColumns: aCollectionOfLabels
Set labels for the columns.
The size of of the collection
has to be the number of columns.

o  labelsForRows: aCollectionOfLabels
Set labels for the rows.
The size of the collection
has to be the number of rows.

o  matrix
Return the matrix we are displaying.

o  offset

o  rowGapFactor
Return a factor to build gap inbetween the rows.
The gap is build from the depths vector.

accessing-mvc
o  model: aModel
A new model gets set to the view.
Update the view with this model.

change & update
o  update: something with: aParameter from: changedObject
Update on model changes.

private building
o  buildBars
Build bars for the values in the matrix.
A matrix is a collection of collections
with percentage values(0.0 - 1.0) in it.

o  buildColumnLabelsFor: aCollectionOfLabels
Build display objects for a collection of labels
and add them to the content of this view.

o  buildRowLabelsFor: aCollectionOfLabels
Build labels from a collection of strings
and add them to the content of this view.

queries-contents
o  heightOfContents
Need to have reasonable scrollers.
Calculates the needed size from merging all bars.
If there is no content my size is zero.

o  widthOfContents
Need to have reasonable scrollers.
Calculates the needed size from merging all bars.
If there is no content my size is zero.


Private classes:

    Bar
    Label

Examples:


From sample data:
|top instance|

top := StandardSystemView new.
instance := self new.
instance model:             self sampleMatrix.
instance labelsForColumns:  self sampleLabelsColumns.
instance labelsForRows:     self sampleLabelsRows.
top add:instance in:(0.0@0.0 corner:1.0@1.0).
top open.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 23 Nov 2024 15:45:10 GMT