|
JClass 4.5.0 API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Polygon | +--com.klg.jclass.swing.gauge.JCNeedleStyle
Provides constants for the built-in needle styles for a JCNeedle
and provides a constructor for passing in a user-defined
needle style.
Alternatively, custom needle styles may be defined by subclassing.
Field Summary | |
static JCNeedleStyle |
ARROW
Arrow polygon using these points, |
protected Rectangle |
boundingBox
min_x, min_y are x and y and max_x and max_y are width and height. |
static JCNeedleStyle |
POINTER
A pointer needle using these points, |
static JCNeedleStyle |
TAILED_ARROW
Tailed Arrow polygon (tail extends beyond center) |
static JCNeedleStyle |
TAILED_POINTER
A tailed pointer needle (tail extends beyond center). |
static JCNeedleStyle |
TRIANGLE
Triangle using ponits, |
Fields inherited from class java.awt.Polygon |
bounds,
npoints,
xpoints,
ypoints |
Constructor Summary | |
JCNeedleStyle()
|
|
JCNeedleStyle(int[] xpoints,
int[] ypoints,
int numPoints)
Construct a needle using the points of a polygon. |
Method Summary | |
Rectangle |
getExtrema()
Return the upper-left-most point of the polygon as x, y in the Rectangle and the lower-right-most point as width and height. |
Methods inherited from class java.awt.Polygon |
addPoint,
contains,
contains,
contains,
contains,
contains,
contains,
getBoundingBox,
getBounds,
getBounds2D,
getPathIterator,
getPathIterator,
inside,
intersects,
intersects,
translate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Rectangle boundingBox
public static final JCNeedleStyle POINTER
new int[] { 0, 0, 90, 100, 90, 0} new int[] { -5, 5, 5, 0, -5, -5} --------------* | \ | * | / --------------*
public static final JCNeedleStyle TAILED_POINTER
new int[] { -20, -20, 90, 100, 90, -20} new int[] { -5, 5, 5, 0, -5, -5} --------------* | \ | x(Center) * | / --------------*
public static final JCNeedleStyle ARROW
new int[] { 0, 0, 100, 100, 120, 100, 100, 0}, new int[] { 5, -5, -5, -10, 0, 10, 5, 5}, |\ --------* \ | * --------* / |/
public static final JCNeedleStyle TAILED_ARROW
new int[] { -20, -20, 100, 100, 120, 100, 100, -20}, new int[] { 5, -5, -5, -10, 0, 10, 5, 5}, |\ ---------------------* \ | x(Center) * ---------------------* / |/
public static final JCNeedleStyle TRIANGLE
new int[] {0, 100, 0}, new int[] {-7, 0, 7}, * | \ | * | / *
Constructor Detail |
public JCNeedleStyle(int[] xpoints, int[] ypoints, int numPoints)
xpoints
- The x coordinates for the polygonypoints
- The y coordinates for the polygonnumPoints
- The number of points in this polygonpublic JCNeedleStyle()
Method Detail |
public Rectangle getExtrema()
|
Copyright© 1999-2000 KL Group Inc. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |