|
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.ParentTrackChange | +--com.klg.jclass.chart3d.JCPlotCube
The JCPlotCube
class deals with drawing the cube around the
surface, bar, or scatter plot.
Field Summary | |
protected com.klg.jclass.chart3d.JCChart3dArea |
area
The parent chart3dArea object. |
protected Color |
background
The plotCube 's background color. |
protected com.klg.jclass.chart3d.JCProjection |
ceiling
The plotCube 's ceiling projection. |
protected com.klg.jclass.chart3d.JCProjection |
floor
The plotCube 's floor projection. |
protected Color |
foreground
The plotCube 's foreground color. |
protected double |
xNormalizedScale
|
protected double |
xScale
The scale in the x direction. |
protected double |
yNormalizedScale
|
protected double |
yScale
The scale in the y direction. |
protected double |
zNormalizedScale
|
protected double |
zScale
The scale in the z direction. |
Fields inherited from class com.klg.jclass.chart3d.ParentTrackChange |
parents |
Constructor Summary | |
JCPlotCube()
No args constructor. |
|
JCPlotCube(com.klg.jclass.chart3d.JCChart3dArea area)
Contstructor given a parent chart3d area. |
Method Summary | |
void |
createParallelProjection(BufferedImage dest,
com.klg.jclass.chart3d.JCProjection projection)
Creates a parallel projection of the chart (without the annotation) and stores it in a passed in image, filling the entire image with the projection. |
void |
createParallelProjection(BufferedImage dest,
com.klg.jclass.chart3d.JCProjection projection,
Color background)
Creates a parallel projection of the chart (without the annotation) and stores it in a passed in image, filling the entire image with the projection. |
void |
createParallelProjection(BufferedImage dest,
com.klg.jclass.chart3d.JCProjection projection,
int x,
int y,
int width,
int height,
Color background)
Creates a parallel projection of the chart (without the annotation) and stores it in a passed in image, at a given position, and with a given width and height within the image. |
protected void |
draw2dBoundingBox(Graphics gc,
boolean drawBackground)
Draws the 2d bounding box. |
protected void |
draw3dBoundingBox(Graphics gc)
Draws the 3d bounding box. |
protected void |
drawBoundingBox(Graphics gc,
boolean drawBackground)
Draws the bounding box for the plotcube (either 2d or 3d). |
protected void |
drawEdge(Graphics gc,
int e)
Draws edge e. |
protected void |
drawGridLines(Graphics gc)
This method computes and draws the X, Y, and Z gridlines. |
protected void |
drawLine(Graphics gc,
int i,
int j)
Draws a line from point i to j. |
protected void |
drawProjection(Graphics gc,
boolean isFloor)
Draws the contoured and/or zoned surface projection on the floor or ceiling of the the plot cube. |
protected void |
finishEdges(Graphics gc)
Draws the rest of the cube edges that haven't been drawn before. |
Color |
getBackground()
Gets the plotCube background. |
com.klg.jclass.chart3d.JCProjection |
getCeiling()
Returns the PlotCube 's ceiling projection. |
com.klg.jclass.chart3d.JCChart3dArea |
getChart3dArea()
Gets the parent chart3d area. |
Color |
getDrawBackground()
Returns the actual background color drawn in the plotCube . |
Color |
getDrawForeground()
Returns the foreground color used to draw items within the plotCube . |
com.klg.jclass.chart3d.JCProjection |
getFloor()
Returns the PlotCube 's floor projection. |
Color |
getForeground()
Gets the plotCube foreground. |
double |
getXNormalizedScale()
Returns the current value of the PlotCube 's normalized
x scale. |
double |
getXScale()
Returns the current value of the PlotCube 's x scale. |
double |
getYNormalizedScale()
Returns the current value of the PlotCube 's normalized
y scale. |
double |
getYScale()
Returns the current value of the PlotCube 's y scale. |
double |
getZNormalizedScale()
Returns the current value of the PlotCube 's normalized
z scale. |
double |
getZScale()
Returns the current value of the PlotCube 's z scale. |
boolean |
hasCeilingProjection()
Asks whether this PlotCube has a ceiling projection. |
boolean |
hasFloorProjection()
Asks if this PlotCube has a floor projection. |
boolean |
hasProjections()
Asks if this PlotCube has any projections. |
protected void |
normalizeScales()
Normalizes the three scale values between 0 and 1. |
void |
setBackground(Color background)
Sets the plotCube background. |
void |
setCeiling(com.klg.jclass.chart3d.JCProjection ceiling)
Sets the PlotCube 's ceiling projection (null parameters are not
allowed). |
void |
setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea area)
Sets the parent chart3d area. |
void |
setFloor(com.klg.jclass.chart3d.JCProjection floor)
Sets the PlotCube 's floor projection (null parameters are not
allowed). |
void |
setForeground(Color foreground)
Sets the plotCube foreground. |
protected void |
setPoint(int i,
Matrix4d ctm,
double x,
double y,
double z)
Sets the ith ScreenPoint to the transformed value of the
point (x,y,z). |
void |
setXScale(double xScale)
Sets the PlotCube 's x scale (default value is 1.0). |
void |
setYScale(double yScale)
Sets the PlotCube 's y scale (default value is 1.0). |
void |
setZScale(double zScale)
Sets the PlotCube 's z scale (default value is 1.0). |
protected void |
updateBoundingBox(Graphics gc,
int axisId,
int x,
int y)
Erases and then draws the bounding box preview cube. |
Methods inherited from class com.klg.jclass.chart3d.ParentTrackChange |
addParent, clearParents, removeParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected double xScale
protected double yScale
protected double zScale
protected com.klg.jclass.chart3d.JCProjection ceiling
plotCube
's ceiling projection.
protected com.klg.jclass.chart3d.JCProjection floor
plotCube
's floor projection.
protected Color background
plotCube
's background color.
protected Color foreground
plotCube
's foreground color.
protected double xNormalizedScale
protected double yNormalizedScale
protected double zNormalizedScale
protected com.klg.jclass.chart3d.JCChart3dArea area
chart3dArea
object.
Constructor Detail |
public JCPlotCube()
Chart3d
area is null. Other values at their default.
public JCPlotCube(com.klg.jclass.chart3d.JCChart3dArea area)
chart3d
area. All other values at default.
area
- the parent chart3d
areaMethod Detail |
public com.klg.jclass.chart3d.JCChart3dArea getChart3dArea()
chart3d
area.
JCChart3dArea
objectpublic void setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea area)
chart3d
area. There can be only one chart3d
area parent since
the plotcube is heavily dependent on things in the chart area (for example, the axes,
the transformation, the cube object, and so on).
area
- the new parent chart3dArea
public void setXScale(double xScale)
PlotCube
's x scale (default value is 1.0).
xScale
- the new x scalepublic double getXScale()
PlotCube
's x scale.
PlotCube
's x scalepublic double getXNormalizedScale()
PlotCube
's normalized
x scale.
PlotCube
's normalized x scalepublic void setYScale(double yScale)
PlotCube
's y scale (default value is 1.0).
yScale
- the new y scalepublic double getYScale()
PlotCube
's y scale.
PlotCube
's y scalepublic double getYNormalizedScale()
PlotCube
's normalized
y scale.
PlotCube
's normalized y scalepublic void setZScale(double zScale)
PlotCube
's z scale (default value is 1.0).
zScale
- the new z scalepublic double getZScale()
PlotCube
's z scale.
PlotCube
's z scalepublic double getZNormalizedScale()
PlotCube
's normalized
z scale.
PlotCube
's normalized z scaleprotected void normalizeScales()
public void setBackground(Color background)
plotCube
background. This value is null by default,
which means that the plotCube
color is the same as the parent
chart area's background, or seemingly transparent.
background
- the new plotCube
backgroundpublic Color getBackground()
plotCube
background. This value is null by default,
which means that the plotCube
color is the same as the parent
chart area's background, or seemingly transparent.
plotCube
backgroundpublic void setForeground(Color foreground)
plotCube
foreground. This value is null by default,
which means that the plotCube
color is the same as the parent
chart area's foreground, or seemingly transparent.
foreground
- the new plotCube
foregroundpublic Color getForeground()
plotCube
foreground. This value is null by default,
which means that the plotCube
color is the same as the parent
chart area's foreground, or seemingly transparent.
plotCube
foregroundpublic Color getDrawBackground()
plotCube
. If
the user has set a plotCube
background color, use it.
Otherwise, use the parent JCChart3dArea
's background color.
public Color getDrawForeground()
plotCube
. Such items include the plotCube
lines
and the default mesh line color. If the user has set a plotCube
foreground color, use it. Otherwise, use the parent
JCChart3dArea
's foreground color.
public void setCeiling(com.klg.jclass.chart3d.JCProjection ceiling)
PlotCube
's ceiling projection (null parameters are not
allowed).
ceiling
- the new projection for the ceiling of the cubepublic com.klg.jclass.chart3d.JCProjection getCeiling()
PlotCube
's ceiling projection.
PlotCube
's ceiling projectionpublic void setFloor(com.klg.jclass.chart3d.JCProjection floor)
PlotCube
's floor projection (null parameters are not
allowed).
floor
- the new projection for the floor of the cubepublic com.klg.jclass.chart3d.JCProjection getFloor()
PlotCube
's floor projection.
PlotCube
's floor projectionpublic boolean hasCeilingProjection()
PlotCube
has a ceiling projection.
public boolean hasFloorProjection()
PlotCube
has a floor projection.
public boolean hasProjections()
PlotCube
has any projections.
protected void drawBoundingBox(Graphics gc, boolean drawBackground)
gc
- drawBackground
- protected void setPoint(int i, Matrix4d ctm, double x, double y, double z)
ScreenPoint
to the transformed value of the
point (x,y,z).
i
- the index of the screen pointctm
- the current transformation matrixx
- the x coordinate of the pointy
- the y coordinate of the pointz
- the z coordinate of the pointprotected void drawLine(Graphics gc, int i, int j)
plotcube
ScreenPoint
array "pts" has been calculated for points
i and j.
gc
- the graphics context with which to drawi
- the index of the first pointj
- the index of the second pointprotected void drawEdge(Graphics gc, int e)
plotcube
ScreenPoint
array "pts"
has been calculated.
gc
- the graphics context with which to drawe
- the edge number to drawprotected void draw3dBoundingBox(Graphics gc)
plotcube
ScreenPoint
array "pts".
gc
- the graphics context with which to drawprotected void finishEdges(Graphics gc)
plotcube
ScreenPoint
array "pts" has been
calculated.
gc
- the graphics context used to drawprotected void draw2dBoundingBox(Graphics gc, boolean drawBackground)
plotcube
ScreenPoint
array "pts" the
first time through.
gc
- the graphics context with which to drawdrawBackground
- whether to draw the backgroundprotected void updateBoundingBox(Graphics gc, int axisId, int x, int y)
gc
- the graphics context with which to drawaxisId
- the id of the axis about which the preview cube is rotatingx
- the x coordinate of the eye point for JCAxis.AXIS_EYE
rotationy
- the y coordinate of the eye point for JCAxis.AXIS_EYE
rotationpublic void createParallelProjection(BufferedImage dest, com.klg.jclass.chart3d.JCProjection projection)
dest
- the image to store the parallel projection inprojection
- the JCProjection
object that tells whether
the projection is contoured and/or zonedpublic void createParallelProjection(BufferedImage dest, com.klg.jclass.chart3d.JCProjection projection, Color background)
dest
- the image to store the parallel projection inprojection
- the JCProjection
object that tells whether
the projection is contoured and/or zonedbackground
- public void createParallelProjection(BufferedImage dest, com.klg.jclass.chart3d.JCProjection projection, int x, int y, int width, int height, Color background)
If there is any gap between the data and the dataport, the specified background color will be used.
dest
- the image to store the parallel projection inprojection
- the JCProjection
object that tells whether
the projection is contoured and/or zonedx
- the x position at which to place the projection in the
imagey
- the y position at which to place the projection in the
imagewidth
- the width (within the image) of the projectionheight
- the height (within the image) of the projectionbackground
- protected void drawProjection(Graphics gc, boolean isFloor)
gc
- the graphics context with which to drawisFloor
- if true
, it is a floor projection; otherwise, it is a ceiling
projectionprotected void drawGridLines(Graphics gc)
Cube
object) and draws gridlines
on the faces which the user has specifically requested.
gc
- the graphics context with which to draw
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |