|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart3d.FacetAbstract | +--com.klg.jclass.chart3d.BarFacet
Class responsible for drawing bars
Field Summary | |
static int |
BAR_CONTOUR
|
static int |
BAR_ERASE
|
static int |
BAR_ERASE_MESH
|
static int |
BAR_FILL_MESH
|
static int |
BAR_FILLED
|
static int |
BAR_MESH
|
static int |
BAR_SIDES
|
static int |
FACE_A
|
static int |
FACE_B
|
static int |
FACE_C
|
static int |
FACE_D
|
static int |
FACE_H
|
static int |
FACE_L
|
static int |
FACE_NONE
|
protected static int[][] |
faceCorner
|
protected Graphics |
gc
|
Fields inherited from class com.klg.jclass.chart3d.FacetAbstract |
data, drawGrid, xPoints, yPoints |
Constructor Summary | |
BarFacet()
Default constructor. |
|
BarFacet(com.klg.jclass.chart3d.DrawGrid drawGrid,
Graphics gc)
Constructor which supplies the drawing object and the Graphics object needed to draw |
Method Summary | |
protected void |
drawBar(int x,
int y,
int f0,
int f1,
Point4d[] plane,
com.klg.jclass.chart3d.ScreenPoint[] top,
com.klg.jclass.chart3d.ScreenPoint[] bottom)
Main bar rendering routine. |
protected void |
drawBarContour(com.klg.jclass.chart3d.ScreenPoint[] spts,
int f0,
int f1)
Draw a contour line on the side faces defined by face codes f0 and f1. |
protected void |
drawBarFace(com.klg.jclass.chart3d.ScreenPoint[] top,
com.klg.jclass.chart3d.ScreenPoint[] bottom,
int fCode,
int style)
Constructs and draws a face of a bar in the given style. |
protected void |
drawBarStyle(com.klg.jclass.chart3d.ScreenPoint[] top,
com.klg.jclass.chart3d.ScreenPoint[] bottom,
int f0,
int f1,
int style)
Draw a bar or bar segement in a given style by drawing four bar faces (top, bottom, and the two side faces that can be seen from the current eye position) between the planes defined by top and bottom. |
protected void |
drawShadedBar(com.klg.jclass.chart3d.ScreenPoint[] top,
com.klg.jclass.chart3d.ScreenPoint[] bottom,
int f0,
int f1,
boolean above,
com.klg.jclass.chart3d.JCGridColor gridColor)
Draw an entire bar by drawing four bar faces (top, bottom, and the two side faces that can be seen from the current eye position) between the planes defined by top and bottom. |
protected com.klg.jclass.chart3d.ScreenPoint[] |
planeToScreen(Point4d[] plane,
double zValue)
Projects a plane in data space to screen coordinates. |
void |
processFacet(int x,
int y,
int edges)
Process the facet at grid point (x, y) which for this class means drawing a bar at (x,y). |
Methods inherited from class com.klg.jclass.chart3d.FacetAbstract |
fillPointArrays, getDrawGrid, getScreenPoint, setDrawGrid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FACE_NONE
public static final int FACE_A
public static final int FACE_B
public static final int FACE_C
public static final int FACE_D
public static final int FACE_H
public static final int FACE_L
protected static final int[][] faceCorner
public static final int BAR_MESH
public static final int BAR_FILLED
public static final int BAR_FILL_MESH
public static final int BAR_ERASE
public static final int BAR_ERASE_MESH
public static final int BAR_SIDES
public static final int BAR_CONTOUR
protected transient Graphics gc
Constructor Detail |
public BarFacet()
public BarFacet(com.klg.jclass.chart3d.DrawGrid drawGrid, Graphics gc)
drawGrid
- The drawing object that controls which bar is being drawngc
- The Graphics object needed to drawMethod Detail |
protected com.klg.jclass.chart3d.ScreenPoint[] planeToScreen(Point4d[] plane, double zValue)
plane
- A plane consisting of four points that defines the x and y
extents of the bar in data spacezValue
- The zValue for each of the four points of the plane
protected void drawBarFace(com.klg.jclass.chart3d.ScreenPoint[] top, com.klg.jclass.chart3d.ScreenPoint[] bottom, int fCode, int style)
top
- The top plane of the bar in screen spacebottom
- The bottom plane of the bar in screen spacefCode
- The face code for this bar face. Must be one of FACE_A, FACE_B,
FACE_C, FACE_D, FACE_H, or FACE_L. If value is FACE_NONE, then nothing
is drawn.style
- The bar drawing style. Is one of BAR_MESH, BAR_FILLED,
BAR_FILL_MESH, BAR_ERASE, BAR_ERASE_MESH, BAR_SIDES, BAR_CONTOUR. See
definitions above for explanation of styles.protected void drawBarContour(com.klg.jclass.chart3d.ScreenPoint[] spts, int f0, int f1)
spts
- The four corner points of the bar for the given contour level
in screen space.f0
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
contour line is drawn.f1
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
contour line is drawn.protected void drawBarStyle(com.klg.jclass.chart3d.ScreenPoint[] top, com.klg.jclass.chart3d.ScreenPoint[] bottom, int f0, int f1, int style)
top
- The top plane of this bar (or bar segment) in screen spacebottom
- The bottom plane of this bar (or bar segment) in screen spacef0
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
side face is drawn.f1
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
side face is drawn.protected void drawShadedBar(com.klg.jclass.chart3d.ScreenPoint[] top, com.klg.jclass.chart3d.ScreenPoint[] bottom, int f0, int f1, boolean above, com.klg.jclass.chart3d.JCGridColor gridColor)
top
- The top plane of this bar (or bar segment) in screen spacebottom
- The bottom plane of this bar (or bar segment) in screen spacef0
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
side face is drawn.f1
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
side face is drawn.above
- Is the bar above the z origin?gridColor
- The grid color used for this bar. Null if none has been
defined for this bar.protected void drawBar(int x, int y, int f0, int f1, Point4d[] plane, com.klg.jclass.chart3d.ScreenPoint[] top, com.klg.jclass.chart3d.ScreenPoint[] bottom)
f0
and f1
indicate
the sides of the bar (other than the top and bottom) which need to be drawn
based on the eye position. The plane gives the x
/y
extents of the bar. top
and bottom
are precomputed
screen position of the top and bottom faces.
x
- The x grid index of the bar being drawny
- The y grid index of the bar being drawnf0
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
side face is drawn.f1
- The face code of a side face to be drawn for this bar. Must be
one of FACE_A, FACE_B, FACE_C, FACE_D. If value is FACE_NONE, then no
side face is drawn.plane
- A plane that defines the x and y extents of the bar in data spacetop
- The top plane of the bar in screen spacebottom
- The bottom plane of the bar in screen spacepublic void processFacet(int x, int y, int edges)
processFacet
in interface Facet
processFacet
in class FacetAbstract
x
- The x grid index of the bar being drawny
- The y grid index of the bar being drawnedges
- The grid region that the bar is in.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |