|
JMSLTM Numerical Library 6.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.imsl.chart.Draw
com.imsl.chart.DrawPick
public class DrawPick
The DrawPick class.
Field Summary |
---|
Fields inherited from class com.imsl.chart.Draw |
---|
currentType, ERROR_BAR, FILL, fillColor, fillOutlineColor, fillOutlineType, fillPaint, fillType, graphics, haveErrorBarProperties, haveFillProperties, haveImageProperties, haveLineProperties, haveMarkerProperties, haveTextProperties, IMAGE, imageObserver, LAST, LINE, lineColor, lineDashPattern, lineWidth, MARKER, MARKER_SCALE, markerColor, markerDashPattern, markerSize, markerThickness, markerType, node, NONE, outline, path, RADIAN, scaleFont, TEXT, textAngle, textColor, textFont |
Constructor Summary | |
---|---|
DrawPick(MouseEvent event,
Graphics graphics,
Dimension bounds)
Contructs a DrawPick object. |
Method Summary | |
---|---|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draw an arc. |
void |
drawErrorBar(int x0,
int y0,
int x1,
int y1,
int flag)
Draw ErrorBar |
void |
drawImage(Image image,
int x,
int y)
Draw Image |
void |
drawLine(int x0,
int y0,
int x1,
int y1)
Draw a line from (x0,y0) to (x1,y1). |
void |
drawMarker(int x,
int y)
Draw a marker. |
Dimension |
drawText(Text text,
int x,
int y)
Draws a text object. |
void |
endErrorBar()
End ErrorBar |
void |
endFill()
End fill |
void |
endImage()
End Image |
void |
endLine()
Finish drawing lines. |
void |
endMarker()
Finish drawing markers. |
void |
endText()
End Text |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Fills a circular or elliptical arc covering the specified rectangle. |
void |
fillPolygon(int[] xpoints,
int[] ypoints,
int npoints)
Fill a polygon. |
void |
fillPolygon(Polygon polygon)
Fill a polygon defined by a Polygon object. |
void |
fillRectangle(int x,
int y,
int width,
int height)
Fill a rectangle. |
void |
fire()
Fires the pickListeners for all of the picked nodes. |
int |
getTolerance()
Get the minimum distance that an event can be from a point or a line and still be considered a hit. |
protected void |
pickNode()
Register the currentNode as the "picked" node if the "PickListener" attribute is defined for the current node. |
void |
setNode(ChartNode node)
Set the current ChartNode. |
void |
setTolerance(int tolerance)
Set the minimum distance that an event can be from a point or a line and still be considered a hit. |
void |
startErrorBar()
Start ErrorBar |
void |
startFill()
Fill |
void |
startImage()
Start Image |
void |
startLine()
Start drawing lines. |
void |
startMarker()
Start drawing markers. |
void |
startText()
Start drawing text |
void |
translate(int x,
int y)
Translates the origin to the point (x,y) |
Methods inherited from class com.imsl.chart.Draw |
---|
check, drawClippedImage, drawRotatedText, drawText, drawText, getClipBounds, getDeviceMarkerSize, getScaleFont, getSize, setClip, setScaleFont, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DrawPick(MouseEvent event, Graphics graphics, Dimension bounds)
event
- is a MouseEvent
graphics
- is the graphics context in which to draw.bounds
- is the size of the chart to be drawn.Method Detail |
---|
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class Draw
x
- An int
which specifies the x of the
rectangle origin, (x,y). The center of the arc is
the center of this rectangle.y
- An int
which specifies the y of the
rectangle origin, (x,y). The center of the arc is
the center of this rectangle.width
- An int
which specifies the width of the rectangle.height
- An int
which specifies the height of the rectangle.startAngle
- An int
which specifies the start angle in degrees.
startAngle = 0 is equivalent to the 3-o'clock position.arcAngle
- An int
which specifies the arcAngle. drawArc draws
the arc from startAngle to startAngle+arcAngle. A positive arcAngle
indicates a counter-clockwise rotation. A negative arcAngle implies
a clockwise rotation.public void drawErrorBar(int x0, int y0, int x1, int y1, int flag)
drawErrorBar
in class Draw
x0
- an int
which specifies the x-coordinate of the beginning reference pointy0
- an int
which specifies the y-coordinate of the beginning reference pointx1
- an int
which specifies the x-coordinate of the ending reference pointy1
- an int
which specifies the y-coordinate of the ending reference pointflag
- an int
that indicates which caps to draw (0=none, 1=bottom, 2=top, 3=both).public void drawImage(Image image, int x, int y)
drawImage
in class Draw
image
- the Image
object to be drawnx
- an int
which specifies the x-coordinate of the reference pointy
- an int
which specifies the y-coordinate of the reference pointpublic void drawLine(int x0, int y0, int x1, int y1)
drawLine
in class Draw
x0
- an int
which specifies the x0 of the
line origin, (x0,y0)y0
- an int
which specifies the y0 of the
line origin, (x0,y0)x1
- an int
which specifies the x1 of the
line destination, (x1,y1)y1
- an int
which specifies the y1 of the
line destination, (x1,y1)public void drawMarker(int x, int y)
drawMarker
in class Draw
x
- an int
which specifies the x of the
marker destination, (x,y)y
- an int
which specifies the y of the
marker destination, (x,y)public Dimension drawText(Text text, int x, int y)
Draw
drawText
in class Draw
text
- the Text object to be drawn
x
- an int
which specifies the abscissa of the (x,y)
point at which to start drawing the text
y
- an int
which specifies the ordinate of the (x,y)
point at which to start drawing the text
endErrorBar
public void endErrorBar()
- End ErrorBar
- Overrides:
endErrorBar
in class Draw
endFill
public void endFill()
- End fill
- Overrides:
endFill
in class Draw
endImage
public void endImage()
- End Image
- Overrides:
endImage
in class Draw
endLine
public void endLine()
- Finish drawing lines.
- Overrides:
endLine
in class Draw
endMarker
public void endMarker()
- Finish drawing markers.
- Overrides:
endMarker
in class Draw
endText
public void endText()
- End Text
- Overrides:
endText
in class Draw
fillArc
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
- Fills a circular or elliptical arc covering the specified rectangle.
The center of the arc is center of this rectangle.
- Overrides:
fillArc
in class Draw
- Parameters:
x
- An int
which specifies the x of the
rectangle.y
- An int
which specifies the y of the
rectangle origin.width
- An int
which specifies the width of the rectangle.height
- An int
which specifies the height of the rectangle.startAngle
- An int
which specifies the start angle in degrees.
startAngle
= 0 is equivalent to the 3-o'clock position.arcAngle
- An int
which specifies the arcAngle. drawArc
draws
the arc from startAngle
to startAngle+arcAngle
. A positive arcAngle
indicates a counter-clockwise rotation. A negative arcAngle
implies
a clockwise rotation.
fillPolygon
public void fillPolygon(int[] xpoints,
int[] ypoints,
int npoints)
- Fill a polygon.
- Overrides:
fillPolygon
in class Draw
- Parameters:
xpoints
- an int
array which contains the abscissae of
the points which define the polygonypoints
- an int
array which contains the ordinates of
the points which define the polygonnpoints
- an int
which specifies the number of points
fillPolygon
public void fillPolygon(Polygon polygon)
- Fill a polygon defined by a
Polygon
object.
- Overrides:
fillPolygon
in class Draw
- Parameters:
polygon
- a Polygon
object which specifies the polygon
to be filled
fillRectangle
public void fillRectangle(int x,
int y,
int width,
int height)
- Fill a rectangle.
- Overrides:
fillRectangle
in class Draw
- Parameters:
x
- an int
which specifies the abscissa of the origin of the rectangley
- an int
which specifies the ordinate of the origin of the rectanglewidth
- an int
which specifies the width of the rectangleheight
- an int
which specifies the height of the rectangle
fire
public void fire()
- Fires the pickListeners for all of the picked nodes.
getTolerance
public int getTolerance()
- Get the minimum distance that an event can be from
a point or a line and still be considered a hit.
- Returns:
- an
int
which specifies the minimum distance that an
event can be from a point or a line and still be considered a hit
pickNode
protected void pickNode()
- Register the currentNode as the "picked" node if the
"PickListener" attribute is defined for the current node.
setNode
public void setNode(ChartNode node)
- Set the current ChartNode.
This is used to get drawing attributes from the tree.
- Overrides:
setNode
in class Draw
- Parameters:
node
- a ChartNode
object
setTolerance
public void setTolerance(int tolerance)
- Set the minimum distance that an event can be from
a point or a line and still be considered a hit.
- Parameters:
tolerance
- an int
which specifies the minimum distance that an
event can be from a point or a line and still be considered a hit
startErrorBar
public void startErrorBar()
- Start ErrorBar
- Overrides:
startErrorBar
in class Draw
startFill
public void startFill()
- Fill
- Overrides:
startFill
in class Draw
startImage
public void startImage()
- Start Image
- Overrides:
startImage
in class Draw
startLine
public void startLine()
- Start drawing lines.
- Overrides:
startLine
in class Draw
startMarker
public void startMarker()
- Start drawing markers.
- Overrides:
startMarker
in class Draw
startText
public void startText()
- Start drawing text
- Overrides:
startText
in class Draw
translate
public void translate(int x,
int y)
- Translates the origin to the point (x,y)
- Overrides:
translate
in class Draw
- Parameters:
x
- an int
which specifies the x of the new originy
- an int
which specifies the y of the new origin
Overview
Package
Class
Tree
Index
Help
JMSLTM Numerical Library 6.1
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.