|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.chart2djava.GraphObj
public abstract class GraphObj
The ChartObj class is the abstract base class for all graphical chart objects.
Field Summary |
---|
Constructor Summary | |
---|---|
GraphObj()
The default GraphObj constructor. |
Method Summary | |
---|---|
void |
addInternalObjects()
This method is called in the ChartView class and triggers combination objects to create all internal ChartObj objects. |
abstract boolean |
checkIntersection(ChartPoint2D testpoint,
NearestPointData np)
The default checkIntersection method. |
abstract java.lang.Object |
clone()
The abstract clone method for this class. |
void |
copy(GraphObj source)
Copies the source object. |
boolean |
defaultcheckIntersection(ChartPoint2D testpoint,
NearestPointData np)
The default checkIntersection method. |
abstract void |
draw(java.awt.Graphics2D g2)
The abstract draw method for this class. |
int |
errorCheck(int nerror)
Checks the current object for common errors. |
ChartRectangle2D |
getBoundingBox()
Returns the bounding box for the chart object. |
ChartAttribute |
getChartObjAttributes()
Returns a reference to the attributes for a chart object. |
int |
getChartObjClipping()
Returns the object clipping mode. |
ChartView |
getChartObjComponent()
Returns a reference to the ChartView component that the chart object is placed in |
int |
getChartObjEnable()
Returns true if the chart object is enabled. |
PhysicalCoordinates |
getChartObjScale()
Returns a reference to the PhysicalCoordinates scale object that the chart object is placed in |
java.awt.Color |
getColor()
Returns the primary line color for the chart object. |
static java.awt.Font |
getDefaultChartFont()
Returns a reference to the default font. |
double |
getIntersectionTestDistance()
Returns the value of the intersectionTestDistance property. |
java.awt.Color |
getLineColor()
Returns the primary line color for the chart object. |
int |
getLineStyle()
Returns the line style for the chart object. |
double |
getLineWidth()
Returns the line width for the chart object. |
ChartPoint2D |
getLocation()
Returns the position of the chart object, using the coordinate system specified by the property positionType. |
double |
getLocation(java.util.GregorianCalendar xdate)
Returns the position of the chart object, using the coordinate system specified by the property positionType. |
ChartPoint2D |
getLocation(int npositiontype)
Returns the position of the chart object, converting the position to the coordinate system specified by the npositiontype parameter. |
int |
getMoveableType()
Returns how the object can be moved: whether it can be moved as a single object (OBJECT_MOVEABLE) or whether individual data points can be moved (DATA_MOVEABLE). |
int |
getPositionType()
Returns the current position type. |
double |
getResizeMultiplier()
Returns the resize multiplier of the object. |
boolean |
getUpdateFlag()
Returns true if the object needs to be updated before rendering. |
int |
getZOrder()
Returns the z-order value of the chart object. |
void |
moveRel(double dx,
double dy)
Move the object relative to its current position, using the coordinate system specified by the property positionType. |
void |
prePlot(java.awt.Graphics2D g2)
This method a general setup method called before the graph object is drawn. |
void |
setChartObjAttributes(ChartAttribute attr)
Sets the attributes for a chart object using an ChartAttribute object. |
void |
setChartObjClipping(int clipping)
Sets the object clipping mode. |
void |
setChartObjComponent(ChartView component)
Sets the reference to the ChartView component that the chart object is placed in |
void |
setChartObjEnable(int benable)
Enables the chart object. |
void |
setChartObjScale(PhysicalCoordinates transform)
Sets the reference to the PhysicalCoordinates object that the chart object is placed in |
void |
setColor(java.awt.Color rgbcolor)
Sets the primary line color for the chart object. |
static void |
setDefaultChartFont(java.awt.Font tfont)
Sets the default font used by all text objects that have not had a font explicitly set. |
void |
setIntersectionTestDistance(double intersectiontestdistance)
Sets the value of the intersectionTestDistance property. |
void |
setLineColor(java.awt.Color rgbcolor)
Sets the primary line color for the chart object. |
void |
setLineStyle(int linestyle)
Sets the line style for the chart object. |
void |
setLineWidth(double linewidth)
Sets the line width for the chart object. |
void |
setLocation(ChartPoint2D xy)
Sets the position of the chart object, using the coordinate system specified by the property positionType. |
void |
setLocation(ChartPoint2D xy,
int npositiontype)
Sets the position of the chart object, using the coordinate system specified by the npositiontype parameter. |
void |
setLocation(double x,
double y)
Sets the position of the chart object, using the coordinate system specified by the property positionType. |
void |
setLocation(double x,
double y,
int npositiontype)
Sets the position of the chart object, using the coordinate system specified by the npositiontype parameter. |
void |
setLocation(java.util.GregorianCalendar xdate,
double y)
Sets the position of the chart object, using the coordinate system specified by the property positionType. |
void |
setPositionType(int posmode)
Sets the current position type. |
void |
setResizeMultiplier(double multiplier)
Sets the resize multiplier of the object. |
void |
setUpdateFlag(boolean bupdate)
Set to true if the object needs to be updated before rendering. |
void |
setZOrder(int zorder)
Sets the z-order of the object in the chart. |
static java.util.Vector<GraphObj> |
TypeSafeVectorCopy(java.util.Vector<GraphObj> source)
Returns an object that is a typesafe copy of the source Vector |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphObj()
Method Detail |
---|
public void addInternalObjects()
public abstract boolean checkIntersection(ChartPoint2D testpoint, NearestPointData np)
testpoint
- The test pointnp
- Nearest point information for data based objects.
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public void copy(GraphObj source)
source
- The source object.public boolean defaultcheckIntersection(ChartPoint2D testpoint, NearestPointData np)
testpoint
- The test pointnp
- Nearest point information for data based objects.
public abstract void draw(java.awt.Graphics2D g2)
g2
- The graphics context.public int errorCheck(int nerror)
errorCheck
in class ChartObj
nerror
- Current error state
public ChartRectangle2D getBoundingBox()
public ChartAttribute getChartObjAttributes()
public int getChartObjClipping()
public ChartView getChartObjComponent()
public int getChartObjEnable()
public PhysicalCoordinates getChartObjScale()
public java.awt.Color getColor()
public static java.awt.Font getDefaultChartFont()
public double getIntersectionTestDistance()
public java.awt.Color getLineColor()
public int getLineStyle()
public double getLineWidth()
public ChartPoint2D getLocation()
public double getLocation(java.util.GregorianCalendar xdate)
xdate
- Returns the x-position as a GregorianCalendar object.
public ChartPoint2D getLocation(int npositiontype)
npositiontype
- Specifies what coordinate system the position needs to converted to.
Use one of the position type constants: DEV_POS, PHYS_POS, POLAR_POS, NORM_GRAPH_POS, NORM_PLOT_POS.
public int getMoveableType()
public int getPositionType()
public double getResizeMultiplier()
public boolean getUpdateFlag()
public int getZOrder()
public void moveRel(double dx, double dy)
dx
- Specifies relative move of the x-coordinate of the object position.dy
- Specifies the relative move of the y-coordinate of the object position.public void prePlot(java.awt.Graphics2D g2)
g2
- The graphics context.public void setChartObjAttributes(ChartAttribute attr)
attr
- Sets the attributes for a chart object using an ChartAttribute object.
public void setChartObjClipping(int clipping)
clipping
- Sets the object clipping mode.public void setChartObjComponent(ChartView component)
component
- A reference to the ChartView component that the chart object is placed inpublic void setChartObjEnable(int benable)
benable
- Use one of the chart object enable constants: OBJECT_DISABLE, OBJECT_ENABLE,
OBJECT_ENABLE_NODRAW.public void setChartObjScale(PhysicalCoordinates transform)
transform
- A reference to the PhysicalCoordinates object that the chart object is placed inpublic void setColor(java.awt.Color rgbcolor)
rgbcolor
- Sets the primary line color for the chart object.public static void setDefaultChartFont(java.awt.Font tfont)
tfont
- A reference to the desired font.public void setIntersectionTestDistance(double intersectiontestdistance)
intersectiontestdistance
- Sets the value of the intersectionTestDistance property.public void setLineColor(java.awt.Color rgbcolor)
rgbcolor
- Sets the primary line color for the chart object.public void setLineStyle(int linestyle)
linestyle
- Sets the line style for the chart object. Use one of the line style
constants: LS_SOLID, LS_DASH_8_4, LS_DASH_4_4 , LS_DASH_4_2, LS_DASH_2_2, LS_DOT_1_1,
LS_DOT_1_2, LS_DOT_1_4, LS_DOT_1_8, LS_DASH_DOT.public void setLineWidth(double linewidth)
linewidth
- Sets the line width, in window device coordinates, for the chart object.public void setLocation(ChartPoint2D xy)
xy
- Specifies the x- and y-coordinate of the object position.public void setLocation(ChartPoint2D xy, int npositiontype)
xy
- Specifies the x- and y-coordinate of the object position.npositiontype
- Specifies the what coordinate system the x and y parameters reference.
Use one of the position type constants: DEV_POS, PHYS_POS, POLAR_POS, NORM_GRAPH_POS, NORM_PLOT_POS.public void setLocation(double x, double y)
x
- Specifies the x-coordinate of the object position.y
- Specifies the y-coordinate of the object position.public void setLocation(double x, double y, int npositiontype)
x
- Specifies the x-coordinate of the object position.y
- Specifies the y-coordinate of the object position.npositiontype
- Specifies the what coordinate system the x and y parameters reference.
Use one of the position type constants: DEV_POS, PHYS_POS, POLAR_POS, NORM_GRAPH_POS, NORM_PLOT_POS.public void setLocation(java.util.GregorianCalendar xdate, double y)
xdate
- Specifies the x-coordinate of the object position.y
- Specifies the y-coordinate of the object position.public void setPositionType(int posmode)
posmode
- Sets the current position type. Use one of the position type constants:
DEV_POS, PHYS_POS, POLAR_POS, NORM_GRAPH_POS, NORM_PLOT_POS.public void setResizeMultiplier(double multiplier)
multiplier
- Sets the value of the resize multiplier.public void setUpdateFlag(boolean bupdate)
bupdate
- True signifies that the object needs to be updated before rendering.public void setZOrder(int zorder)
zorder
- Sets the z-order of the object in the chart.public static java.util.Vector<GraphObj> TypeSafeVectorCopy(java.util.Vector<GraphObj> source)
source
- source object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |