|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.GraphObj
com.quinncurtis.chart3djava.ChartImage
public class ChartImage
The ChartImage class will place and scale a Java compatible Image file in a chart. The image can be a small part of the overall graph, inside or outside of the plotting area, or it can sized to provide a background for the plotting area or graph area.
Field Summary |
---|
Constructor Summary | |
---|---|
ChartImage()
The default ChartImage constructor. |
|
ChartImage(java.awt.Image aimage,
double x,
double y,
double z,
int npostype,
int rotation)
A ChartImage constructor that initializes the scale, the image, the position, the position mode and the rotation for an image plot object. |
|
ChartImage(java.awt.Image aimage,
double x,
double y,
int npostype,
int rotation)
A ChartImage constructor that initializes the scale, the image, the position, the position mode and the rotation for an image plot object. |
|
ChartImage(PhysicalCoordinates transform)
A ChartImage constructor that initializes the scale for an image plot object. |
|
ChartImage(PhysicalCoordinates transform,
java.awt.Image aimage,
double x,
double y,
double z,
int npostype,
int rotation)
A ChartImage constructor that initializes the scale, the image, the position, the position mode and the rotation for an image plot object. |
|
ChartImage(PhysicalCoordinates transform,
java.awt.Image aimage,
double x,
double y,
int npostype,
int rotation)
A ChartImage constructor that initializes the scale, the image, the position, the position mode and the rotation for an image plot object. |
Method Summary | |
---|---|
boolean |
checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
The checkIntersection method. |
java.lang.Object |
clone()
Returns an object that is a clone of this ChartImage object. |
void |
copy(ChartImage source)
Copies the source ChartImage object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the ChartImage object for common errors. |
java.awt.Image |
getImageObject()
Returns the image for this object |
ChartRectangle3D |
getImageRectangle()
Returns the current size (width and height) of the image. |
ChartDimension3D |
getImageScaleFactor()
Returns the current scale factor of the image. |
ChartDimension3D |
getImageSize()
Returns the current size (width and height) of the image. |
double |
getRotation()
Returns the current rotation, in degrees, of the image. |
int |
getSizeMode()
Returns the current size mode for the image. |
void |
initChartImage(PhysicalCoordinates transform,
java.awt.Image aimage,
double x,
double y,
double z,
int npostype,
double rotation)
A ChartImage initialization method that initializes the scale, the image, the position, the position mode and the rotation for an image plot object. |
void |
initChartImage(PhysicalCoordinates transform,
java.awt.Image aimage,
double x,
double y,
int npostype,
double rotation)
A ChartImage initialization method that initializes the scale, the image, the position, the position mode and the rotation for an image plot object. |
void |
setImageObject(java.awt.Image image)
Set the image for this object |
void |
setImageRectangle(ChartRectangle3D imagerect,
int postype)
Sets the current position and size of the image. |
void |
setImageScaleFactor(ChartDimension3D psize)
Sets the current scale factor of the image. |
void |
setImageSize(ChartDimension3D wh)
Sets the current size (width and height) of the image. |
void |
setRotation(double rotation)
Sets the current rotation, in degrees, of the image. |
void |
setSizeMode(int nsizemode)
Sets the current size mode for the image. |
Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChartImage()
public ChartImage(PhysicalCoordinates transform, java.awt.Image aimage, double x, double y, int npostype, int rotation)
transform
- The coordinate system for the new ImagePlot object.aimage
- A reference to the image that is to be placed in the chart.x
- The x-value for the position of the image in the chart.y
- The y-value for the position of the image in the chart.npostype
- Specifies whether the x- and y-position values are specified in normalized
coordinates, or physical coordinates. Use one of the position constants: NORM_POS, PHYS_POS.rotation
- The rotation of the image specified in degrees.public ChartImage(java.awt.Image aimage, double x, double y, int npostype, int rotation)
aimage
- A reference to the image that is to be placed in the chart.x
- The x-value for the position of the image in the chart.y
- The y-value for the position of the image in the chart.npostype
- Specifies whether the x- and y-position values are specified in normalized
coordinates, or physical coordinates. Use one of the position constants: NORM_POS, PHYS_POS.rotation
- The rotation of the image specified in degrees.public ChartImage(PhysicalCoordinates transform, java.awt.Image aimage, double x, double y, double z, int npostype, int rotation)
transform
- The coordinate system for the new ImagePlot object.aimage
- A reference to the image that is to be placed in the chart.x
- The x-value for the position of the image in the chart.y
- The y-value for the position of the image in the chart.z
- The z-value for the position of the image in the chart.npostype
- Specifies whether the x- and y-position values are specified in normalized
coordinates, or physical coordinates. Use one of the position constants: NORM_POS, PHYS_POS.rotation
- The rotation of the image specified in degrees.public ChartImage(java.awt.Image aimage, double x, double y, double z, int npostype, int rotation)
aimage
- A reference to the image that is to be placed in the chart.x
- The x-value for the position of the image in the chart.y
- The y-value for the position of the image in the chart.z
- The z-value for the position of the image in the chart.npostype
- Specifies whether the x- and y-position values are specified in normalized
coordinates, or physical coordinates. Use one of the position constants: NORM_POS, PHYS_POS.rotation
- The rotation of the image specified in degrees.public ChartImage(PhysicalCoordinates transform)
transform
- The coordinate system for the new ChartImage object.Method Detail |
---|
public int errorCheck(int nerror)
errorCheck
in class GraphObj
nerror
- Current error state
public void copy(ChartImage source)
source
- The source ChartImage object.public java.lang.Object clone()
clone
in class GraphObj
public void initChartImage(PhysicalCoordinates transform, java.awt.Image aimage, double x, double y, int npostype, double rotation)
transform
- The coordinate system for the new GroupPlot object.aimage
- A reference to the image that is to be placed in the chart.x
- The x-value for the position of the image in the chart.y
- The y-value for the position of the image in the chart.npostype
- Specifies whether the x- and y-position values are specified
in normalized coordinates, or physical coordinates. Use one of the position constants: NORM_POS,
PHYS_POS.rotation
- The rotation of the image specified in degrees.public void initChartImage(PhysicalCoordinates transform, java.awt.Image aimage, double x, double y, double z, int npostype, double rotation)
transform
- The coordinate system for the new GroupPlot object.aimage
- A reference to the image that is to be placed in the chart.x
- The x-value for the position of the image in the chart.y
- The y-value for the position of the image in the chart.z
- The z-value for the position of the image in the chart.npostype
- Specifies whether the x- and y-position values are specified
in normalized coordinates, or physical coordinates. Use one of the position constants: NORM_POS,
PHYS_POS.rotation
- The rotation of the image specified in degrees.public boolean checkIntersection(ChartPoint3D testpoint, NearestPointData np)
checkIntersection
in class GraphObj
testpoint
- The test pointnp
- Nearest point information for data based objects.
public void draw(java.awt.Graphics2D g2)
draw
in class GraphObj
g2
- The graphics context.public void setImageSize(ChartDimension3D wh)
wh
- Specifies the width and height of the image.public ChartDimension3D getImageSize()
public void setImageRectangle(ChartRectangle3D imagerect, int postype)
imagerect
- Specifies the position, width and height of the image rectangle.postype
- Specifies the if the position of the text is specified in physical
coordinates, normalized coordinates or window device coordinates. Use one of the position
constants: DEV_POS, PHYS_POS, NORM_GRAPH_POS, NORM_PLOT_POS.public ChartRectangle3D getImageRectangle()
public void setSizeMode(int nsizemode)
nsizemode
- Sets the current size mode for the image. Use one of the image
size constants ACTUAL_SIZE, COORD_SIZE or SCALE_FACTOR_SIZE.public int getSizeMode()
public void setImageScaleFactor(ChartDimension3D psize)
psize
- Specifies the x- and y-scale factors for the image.public ChartDimension3D getImageScaleFactor()
public void setRotation(double rotation)
rotation
- Specifies the rotation, in degrees, of the image.public double getRotation()
public void setImageObject(java.awt.Image image)
image
- A reference to the image that is to be placed in the chart.public java.awt.Image getImageObject()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |