Horus Doc || Java GUI Reference || Doxygen's quick Index  

CanvasHxHistogram Class Reference

Inheritance diagram for CanvasHxHistogram::

CanvasFigure CanvasObject List of all members.

Public Methods

 CanvasHxHistogram (String histName)
String getSaName ()
 Overrides CanvasObject interface. More...

int getDimSize (int dim)
double getBin (int bin)
double getMax ()

Protected Methods

Shape getShape ()
 Derived classes have to implement this method to supply the shape that represents the CanvasFigures. More...

boolean hitOnStroke ()
 Derived classes have to implement this method to indicate whether they are selected (hit) based on their stroke (border) or on their interior. More...


Constructor & Destructor Documentation

CanvasHxHistogram::CanvasHxHistogram String    histName [inline]
 

00025 {
00026     super(0., 0., 0., 0.);
00027     _name = histName;
00028     _mediator = new HxMediatorPeer();
00029 
00030     updatePolyline();
00031     setInputSource(INP_SASYSTEM);
00032 }


Member Function Documentation

String CanvasHxHistogram::getSaName   [inline]
 

Overrides CanvasObject interface.

Reimplemented from CanvasObject.

00038 {
00039     return _name;
00040 }

int CanvasHxHistogram::getDimSize int    dim [inline]
 

00044 {
00045     String[] args = new String[1];
00046     args[0] = new String("int " + java.lang.String.valueOf(dim));
00047     String result = _mediator.callMethod("HxHistogram",
00048                                          _name, "dimensionSize", "", args);
00049     return new Integer(result).intValue();
00050 }

double CanvasHxHistogram::getBin int    bin [inline]
 

00054 {
00055     String[] args = new String[1];
00056     args[0] = new String("int " + java.lang.String.valueOf(bin));
00057     String result = _mediator.callMethod("HxHistogram",
00058                                          _name, "get", "", args);
00059     return new Double(result).doubleValue();
00060 }

double CanvasHxHistogram::getMax   [inline]
 

00064 {
00065     String[] args = new String[0];
00066     String result = _mediator.callMethod("HxHistogram",
00067                                          _name, "maxVal", "", args);
00068     return new Double(result).doubleValue();
00069 }

Shape CanvasHxHistogram::getShape   [inline, protected, virtual]
 

Derived classes have to implement this method to supply the shape that represents the CanvasFigures.

It is used to draw to figure as well as determine which figure is selected (hit) by the cursor within a canvas.

Reimplemented from CanvasFigure.

00080 {
00081     int[] xp = getAddXCcs();
00082     int[] yp = getAddYCcs();
00083     GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, xp.length);
00084     path.moveTo(xp[0], yp[0]);
00085     for (int i=1 ; i < xp.length ; i++)
00086         path.lineTo(xp[i], yp[i]);
00087     return path;
00088 }

boolean CanvasHxHistogram::hitOnStroke   [inline, protected, virtual]
 

Derived classes have to implement this method to indicate whether they are selected (hit) based on their stroke (border) or on their interior.

Reimplemented from CanvasFigure.

00092 {
00093     return false;
00094 }


The documentation for this class was generated from the following file:
Generated on Tue Feb 3 14:19:39 2004 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001