Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

CanvasFigure Class Reference

Inheritance diagram for CanvasFigure::

CanvasObject CanvasCorbaBlob2d CanvasCorbaBSplineCurve CanvasCorbaHistogram CanvasCorbaPolyline2d CanvasCorbaSampledBSplineCurve CanvasHxBlob2d CanvasHxBSplineCurve CanvasHxHistogram CanvasHxPolyline2d CanvasHxSampledBSplineCurve List of all members.

Public Methods

Object clone ()
 Implements CanvasObject abstract function. More...

void draw (Graphics g)
 Implements CanvasObject "interface". More...

boolean isHitCcs (int x, int y, Graphics2D g)
 A more specialized version of isHitCcs that uses the Graphics2d.hit and the getShape() member function to determine if this figures is selected with the given position. More...

boolean hasNoColor ()
Color getColor ()
void setColor (Color newColor)
boolean getFilled ()
void setFilled (boolean filled)
boolean getDashed ()
void setDashed (boolean dashed)
boolean hasLineWidth ()
float getLineWidth ()
void setLineWidth (float linew)
float getTransparency ()
void setTransparency (float trans)
Vector getVisualChangeMethods ()
 Builds up a list of functions that are to fill a menu for changing the visualization aspects of an object. More...


Static Public Attributes

final int NO_PIX = 0x00000000
 Indicates that no pixel value is set. More...

final int INV_PIX = 0x00FFFFFF
 Invert pixel via : c.getRGB() ^ INV_COLOR. More...

final Color NO_COLOR = (Color) null
 No color specified. More...

final Color DEF_COLOR = Color.red
 The default color for drawing figures. More...

final float DEF_LINEW = 1.0f
 The default line width for figures. More...

final float DEF_TRANS = 0.0f
 The default transparency for figures. More...


Protected Methods

 CanvasFigure (double x1, double y1, double x2, double y2)
abstract Shape getShape ()
 Derived classes have to implement this method to supply the shape that represents the CanvasFigures. More...

abstract 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...

void setupDrawMode (Graphics g)
 Setup drawmode for 'g'. More...


Constructor & Destructor Documentation

CanvasFigure::CanvasFigure double    x1,
double    y1,
double    x2,
double    y2
[inline, protected]
 


Member Function Documentation

Object CanvasFigure::clone   [inline, virtual]
 

Implements CanvasObject abstract function.

This side of the tree is not clonable, nor need it be?

Reimplemented from CanvasObject.

void CanvasFigure::draw Graphics    g [inline, virtual]
 

Implements CanvasObject "interface".

Reimplemented from CanvasObject.

Reimplemented in CanvasHxBlob2d, and CanvasCorbaBlob2d.

boolean CanvasFigure::isHitCcs int    x,
int    y,
Graphics2D    g
[inline]
 

A more specialized version of isHitCcs that uses the Graphics2d.hit and the getShape() member function to determine if this figures is selected with the given position.

Uses hitOnStroke to choose between hit on stroke or hit on interior.

Reimplemented from CanvasObject.

boolean CanvasFigure::hasNoColor   [inline]
 

Color CanvasFigure::getColor   [inline]
 

void CanvasFigure::setColor Color    color [inline]
 

Reimplemented in CanvasHxBlob2d, and CanvasCorbaBlob2d.

boolean CanvasFigure::getFilled   [inline]
 

void CanvasFigure::setFilled boolean    filled [inline]
 

boolean CanvasFigure::getDashed   [inline]
 

void CanvasFigure::setDashed boolean    dashed [inline]
 

boolean CanvasFigure::hasLineWidth   [inline]
 

float CanvasFigure::getLineWidth   [inline]
 

void CanvasFigure::setLineWidth float    linew [inline]
 

float CanvasFigure::getTransparency   [inline]
 

void CanvasFigure::setTransparency float    trans [inline]
 

Reimplemented in CanvasHxBlob2d, and CanvasCorbaBlob2d.

Vector CanvasFigure::getVisualChangeMethods   [inline]
 

Builds up a list of functions that are to fill a menu for changing the visualization aspects of an object.

Classes derived from this one typically add their class-specific methods to their parents' methods by first calling the parent to fill the vector and then add their own. The result is a Vector of CallableMethods.

Reimplemented from CanvasObject.

Reimplemented in CanvasHxBlob2d, CanvasHxBSplineCurve, CanvasHxSampledBSplineCurve, CanvasCorbaBlob2d, CanvasCorbaBSplineCurve, and CanvasCorbaSampledBSplineCurve.

abstract Shape CanvasFigure::getShape   [protected, pure 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 in CanvasHxBlob2d, CanvasHxBSplineCurve, CanvasHxHistogram, CanvasHxPolyline2d, CanvasHxSampledBSplineCurve, CanvasCorbaBlob2d, CanvasCorbaBSplineCurve, CanvasCorbaHistogram, CanvasCorbaPolyline2d, and CanvasCorbaSampledBSplineCurve.

abstract boolean CanvasFigure::hitOnStroke   [protected, pure 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 in CanvasHxBlob2d, CanvasHxBSplineCurve, CanvasHxHistogram, CanvasHxPolyline2d, CanvasHxSampledBSplineCurve, CanvasCorbaBlob2d, CanvasCorbaBSplineCurve, CanvasCorbaHistogram, CanvasCorbaPolyline2d, and CanvasCorbaSampledBSplineCurve.

void CanvasFigure::setupDrawMode Graphics    g [inline, protected]
 

Setup drawmode for 'g'.

Reimplemented from CanvasObject.


Member Data Documentation

final int CanvasFigure::NO_PIX = 0x00000000 [static]
 

Indicates that no pixel value is set.

final int CanvasFigure::INV_PIX = 0x00FFFFFF [static]
 

Invert pixel via : c.getRGB() ^ INV_COLOR.

final Color CanvasFigure::NO_COLOR = (Color) null [static]
 

No color specified.

final Color CanvasFigure::DEF_COLOR = Color.red [static]
 

The default color for drawing figures.

final float CanvasFigure::DEF_LINEW = 1.0f [static]
 

The default line width for figures.

final float CanvasFigure::DEF_TRANS = 0.0f [static]
 

The default transparency for figures.


The documentation for this class was generated from the following file:
Generated on Tue Jan 8 14:14:22 2002 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001