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

CanvasArrow Class Reference

Inheritance diagram for CanvasArrow::

ScribbleFigure ScribbleObject CanvasObject List of all members.

Public Methods

 CanvasArrow (double x, double y, double length, int angle)
 CanvasArrow (double x, double y, double length, int angle, Color color)
 CanvasArrow (double x, double y, double length, int angle, Color color, boolean fixed)
 CanvasArrow (double x, double y, double length, int angle, int mode, Color color, boolean stroke, float linew, float trans, boolean fixed, double ccs_scale)
void draw (Graphics g)
 Draw CanvasObject on 'g', using internal CCS values. More...

Object clone ()
 Return an identical copy of this CanvasObject. More...

boolean isInside (double x, double y)
boolean isNear (double x, double y)
void setPosition (double x, double y)
 Place top left position of CanvasObject's bounding box at position (x, y). More...

void setDimension (double w, double h)
 Resize CanvasObject to width 'w' and height 'h'. More...

void setZoomFactor (double zoomFactor)
 Scale CanvasObject according to 'zoomFactor'. More...

double getLength ()
void setLength (double length)
int getAngle ()
void setAngle (int angle)
boolean getFixed ()
void setFixed (boolean b)
boolean getHeaded ()
void setHeaded (boolean b)
Vector getVisualChangeMethods ()
 Builds up a list of functions that are to fill a menu for changing the visualization aspects of an object. More...

 CanvasArrow (int x, int y, int length, int angle, int mode, Color color, boolean fixed, double ccs_scale)
boolean isInsideCcs (int x, int y)
 To be removed. More...

boolean isNearCcs (int x, int y)
 To be removed. More...

void setPosition (int x, int y)
void setDimension (int w, int h)
void doMove (int w, int h)
int changePoint (int index, int x, int y)
Point getOrigin ()
Point getHead ()

Protected Methods

void initArrow (double x, double y, double length, int angle, boolean fixed)
void setICS ()
void transformICStoCCS ()
 Perform a full ICS to CCS coordinate transformation. More...

void calcHead ()
void calcAngle (double w, double h)

Protected Attributes

double ics_length
int ccs_length
int headX
int headY
int angle
int beta
int gamma
int bx
int by
int gx
int gy
double cosa
double sina
double cosb
double sinb
double cosg
double sing
boolean fixed = false
boolean headed = true
boolean scaled = false

Static Protected Attributes

final int HEAD_LENGTH = 6
final int HEAD_ANGLE = 20

Constructor & Destructor Documentation

CanvasArrow::CanvasArrow double    x,
double    y,
double    length,
int    angle
[inline]
 

CanvasArrow::CanvasArrow double    x,
double    y,
double    length,
int    angle,
Color    color
[inline]
 

CanvasArrow::CanvasArrow double    x,
double    y,
double    length,
int    angle,
Color    color,
boolean    fixed
[inline]
 

CanvasArrow::CanvasArrow double    x,
double    y,
double    length,
int    angle,
int    mode,
Color    color,
boolean    stroke,
float    linew,
float    trans,
boolean    fixed,
double    ccs_scale
[inline]
 

CanvasArrow::CanvasArrow int    x,
int    y,
int    length,
int    angle,
int    mode,
Color    color,
boolean    fixed,
double    ccs_scale
[inline]
 


Member Function Documentation

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

Draw CanvasObject on 'g', using internal CCS values.

Reimplemented from CanvasObject.

Object CanvasArrow::clone   [inline, virtual]
 

Return an identical copy of this CanvasObject.

Reimplemented from CanvasObject.

boolean CanvasArrow::isInside double    x,
double    y
[inline]
 

boolean CanvasArrow::isNear double    x,
double    y
[inline]
 

void CanvasArrow::setPosition double    x,
double    y
[inline]
 

Place top left position of CanvasObject's bounding box at position (x, y).

Parameters are assumed Image Coordinate System values.

Reimplemented from ScribbleObject.

void CanvasArrow::setDimension double    w,
double    h
[inline]
 

Resize CanvasObject to width 'w' and height 'h'.

Parameters are assumed Image Coordinate System values.

Reimplemented from ScribbleObject.

void CanvasArrow::setZoomFactor double    zoomFactor [inline]
 

Scale CanvasObject according to 'zoomFactor'.

The internal ICS values are taken as base values to calculate the associated CCS values.

Reimplemented from CanvasObject.

double CanvasArrow::getLength   [inline]
 

void CanvasArrow::setLength double    length [inline]
 

int CanvasArrow::getAngle   [inline]
 

void CanvasArrow::setAngle int    angle [inline]
 

boolean CanvasArrow::getFixed   [inline]
 

void CanvasArrow::setFixed boolean    b [inline]
 

boolean CanvasArrow::getHeaded   [inline]
 

void CanvasArrow::setHeaded boolean    b [inline]
 

Vector CanvasArrow::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 ScribbleFigure.

boolean CanvasArrow::isInsideCcs int    x,
int    y
[inline]
 

To be removed.

Reimplemented from CanvasObject.

boolean CanvasArrow::isNearCcs int    x,
int    y
[inline]
 

To be removed.

Reimplemented from CanvasObject.

void CanvasArrow::setPosition int    x,
int    y
[inline]
 

Reimplemented from ScribbleObject.

void CanvasArrow::setDimension int    w,
int    h
[inline]
 

Reimplemented from ScribbleObject.

void CanvasArrow::doMove int    w,
int    h
[inline]
 

Reimplemented from ScribbleObject.

int CanvasArrow::changePoint int    index,
int    x,
int    y
[inline]
 

Reimplemented from ScribbleFigure.

Point CanvasArrow::getOrigin   [inline]
 

Point CanvasArrow::getHead   [inline]
 

void CanvasArrow::initArrow double    x,
double    y,
double    length,
int    angle,
boolean    fixed
[inline, protected]
 

void CanvasArrow::setICS   [inline, protected]
 

void CanvasArrow::transformICStoCCS   [inline, protected]
 

Perform a full ICS to CCS coordinate transformation.

Reimplemented from CanvasObject.

void CanvasArrow::calcHead   [inline, protected]
 

void CanvasArrow::calcAngle double    w,
double    h
[inline, protected]
 


Member Data Documentation

final int CanvasArrow::HEAD_LENGTH = 6 [static, protected]
 

final int CanvasArrow::HEAD_ANGLE = 20 [static, protected]
 

double CanvasArrow::ics_length [protected]
 

int CanvasArrow::ccs_length [protected]
 

int CanvasArrow::headX [protected]
 

int CanvasArrow::headY [protected]
 

int CanvasArrow::angle [protected]
 

int CanvasArrow::beta [protected]
 

int CanvasArrow::gamma [protected]
 

int CanvasArrow::bx [protected]
 

int CanvasArrow::by [protected]
 

int CanvasArrow::gx [protected]
 

int CanvasArrow::gy [protected]
 

double CanvasArrow::cosa [protected]
 

double CanvasArrow::sina [protected]
 

double CanvasArrow::cosb [protected]
 

double CanvasArrow::sinb [protected]
 

double CanvasArrow::cosg [protected]
 

double CanvasArrow::sing [protected]
 

boolean CanvasArrow::fixed = false [protected]
 

boolean CanvasArrow::headed = true [protected]
 

boolean CanvasArrow::scaled = false [protected]
 


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