|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ijchart.xychart.plot.AbstractPlot
com.ijchart.xychart.plot.AbstractAxisPlot
public abstract class AbstractAxisPlot
Title: IJChart
Description: a chart library for the Java(tm) platform.
The plot object which have two axis at least.Copyright: Copyright (c) 2013
Company:
| Field Summary | |
|---|---|
static ChartOrientation |
DEFAULT_CHART_ORIENTATION
The default chart orientation. |
static java.awt.Paint |
DEFAULT_CROSSHAIR_PAINT
The default crosshair paint. |
static java.awt.Stroke |
DEFAULT_CROSSHAIR_STROKE
The default crosshair stroke. |
static boolean |
DEFAULT_DOMAIN_CROSSHAIR_LOCKED_ON_DATA
A default flag that controls whether or not the crosshair locks onto actual data points. |
static boolean |
DEFAULT_DOMAIN_CROSSHAIR_VISIBLE
A default flag that controls whether or not a domain crosshair is drawn. |
static boolean |
DEFAULT_DOMAIN_GRIDLINE_VISIBLE
The default visibility of the grid lines plotted against the domain axis. |
static boolean |
DEFAULT_DOMAIN_ZERO_BASELINE_VISIBLE
A default flag that controls whether or not the zero baseline against the domain axis is visible. |
static java.awt.Paint |
DEFAULT_GRIDLINE_PAINT
The default grid line paint. |
static java.awt.Stroke |
DEFAULT_GRIDLINE_STROKE
The default grid line stroke. |
static boolean |
DEFAULT_VALUE_CROSSHAIR_LOCKED_ON_DATA
A default flag that controls whether or not the crosshair locks onto actual data points. |
static boolean |
DEFAULT_VALUE_CROSSHAIR_VISIBLE
A default flag that controls whether or not a value crosshair is drawn. |
static boolean |
DEFAULT_VALUE_GRIDLINE_VISIBLE
The default visibility of the grid lines plotted against the value axis. |
protected java.util.List |
domainAxes
Storage for the domain axes. |
protected java.util.Hashtable |
renderToDomainAxis
Storage for keys that map render to domain axis. |
protected java.util.Hashtable |
renderToValueAxis
Storage for keys that map render to value axis. |
protected java.util.List |
valueAxes
Storage for the value axes. |
| Constructor Summary | |
|---|---|
AbstractAxisPlot()
The default constructor. |
|
| Method Summary | |
|---|---|
protected void |
allocateRenderShapesList(int renderSize)
Allocate render shapes. |
void |
clearDomainAxes()
Clears the domain axes from the plot and sends a PlotChangeEvent
to all registered listeners. |
void |
clearValueAxes()
Clears the value axes from the plot and sends a PlotChangeEvent
to all registered listeners. |
java.lang.Object |
clone()
Returns a clone of the plot. |
boolean |
drawCrosshair(java.awt.geom.Point2D mouseClickPoint)
Draws the crosshair. |
protected void |
drawValueGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
RenderShapeCollection renderShapes,
int valueAxesSize)
Draws the first value axis gridlines for the plot. |
boolean |
equals(java.lang.Object obj)
Tests the plot for equality with an arbitrary object. |
RectangleInsets |
getAxisOffset()
Returns the axis offset. |
java.awt.geom.Point2D |
getCrosshairPoint(java.awt.geom.Point2D mouseClickPoint)
Returns the crosshair point. |
java.awt.Paint |
getDomainCrosshairPaint()
Returns the Paint used to draw the crosshair. |
java.awt.Stroke |
getDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible). |
java.awt.Paint |
getDomainGridlinePaint()
Returns the paint used to draw grid-lines against the domain axis. |
java.awt.Stroke |
getDomainGridlineStroke()
Returns the stroke used to draw the domain grid-lines. |
ChartOrientation |
getOrientation()
Returns the orientation of the plot. |
int |
getRenderIndexForValueAxis(int valueAxisIndex)
Returns the render index for a value axis index. |
protected RenderShapeCollection |
getRenderShapeCollection(int valueAxisIndex)
Returns the RenderShapeCollection for a value axis index. |
AbstractValueAxis |
getValueAxis()
Returns the value axis for the plot. |
AbstractValueAxis |
getValueAxis(int index)
Returns a value axis. |
AbstractValueAxis |
getValueAxisByRenderIndex(int renderIndex)
Returns a value axis. |
int |
getValueAxisCount()
Returns the number of value axes. |
RectangleEdge |
getValueAxisEdge()
Returns the edge where the primary value axis is located. |
RectangleEdge |
getValueAxisEdge(int index)
Returns the edge for a value axis. |
int |
getValueAxisIndex(AbstractValueAxis axis)
Returns the index of the specified axis, or -1 if the axis is not assigned to the plot. |
AxisLocation |
getValueAxisLocation()
Returns the value axis location. |
AxisLocation |
getValueAxisLocation(int index)
Returns the location for a value axis. |
java.awt.Paint |
getValueCrosshairPaint()
Returns the Paint used to draw the crosshair. |
java.awt.Stroke |
getValueCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible). |
java.awt.Paint |
getValueGridlinePaint()
Returns the paint used to draw the value axis grid-lines. |
java.awt.Stroke |
getValueGridlineStroke()
Returns the stroke used to draw the value axis grid-lines. |
int |
hashCode()
Returns a hash code for this object. |
boolean |
isDomainCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values. |
boolean |
isDomainCrosshairVisible()
Returns a flag indicating whether or not the domain crosshair is visible. |
boolean |
isDomainGridlineVisible()
Returns the flag that controls whether the grid-lines for the domain axis are visible. |
boolean |
isValueCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values. |
boolean |
isValueCrosshairVisible()
Returns a flag indicating whether or not the value crosshair is visible. |
boolean |
isValueGridlineVisible()
Returns the flag that controls whether the grid-lines for the value axis are visible. |
void |
mapRenderToDomainAxis(int renderIndex,
int domainAxisIndex)
Maps a render to a domain axis. |
void |
mapRenderToValueAxis(int renderIndex,
int valueAxisIndex)
Maps a render to a domain axis. |
void |
mapValueAxisToRender(int valueAxisIndex,
int renderIndex)
Maps a value axis to a render. |
void |
setAxisOffset(RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes) and sends a PlotChangeEvent to all registered listeners. |
void |
setDomainCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values. |
void |
setDomainCrosshairPaint(java.awt.Paint paint)
Sets the paint used to draw the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners. |
void |
setDomainCrosshairStroke(java.awt.Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified. |
void |
setDomainCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the domain crosshair is visible and, if the flag changes, sends a PlotChangeEvent to all registered listeners. |
void |
setDomainGridlinePaint(java.awt.Paint paint)
Sets the paint used to draw the grid-lines (if any) against the domain axis and sends a PlotChangeEvent to all registered listeners. |
void |
setDomainGridlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw grid-lines against the domain axis and sends a PlotChangeEvent to all registered listeners. |
void |
setDomainGridlineVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against the domain axis. |
void |
setOrientation(ChartOrientation orientation)
Sets the orientation for the plot and sends a PlotChangeEvent to
all registered listeners. |
void |
setValueAxes(AbstractValueAxis[] axes)
Sets the value axes for this plot and sends a PlotChangeEvent
to all registered listeners. |
void |
setValueAxes(AbstractValueAxis[] axes,
int startIndex)
Sets the value axes for this plot and sends a PlotChangeEvent
to all registered listeners. |
void |
setValueAxis(AbstractValueAxis axis)
Sets the value axis for the plot and sends a PlotChangeEvent to
all registered listeners. |
void |
setValueAxis(int index,
AbstractValueAxis axis)
Sets the value axis for the plot and sends a PlotChangeEvent to
all registered listeners. |
void |
setValueAxis(int index,
AbstractValueAxis axis,
boolean notify)
Sets a value axis and, if requested, sends a PlotChangeEvent to
all registered listeners. |
void |
setValueAxisLocation(AxisLocation location)
Sets the location of the value axis and sends a PlotChangeEvent
to all registered listeners. |
void |
setValueAxisLocation(AxisLocation location,
boolean notify)
Sets the location of the value axis and sends a PlotChangeEvent
to all registered listeners. |
void |
setValueAxisLocation(int index,
AxisLocation location)
Sets the location of the value axis and sends a PlotChangeEvent
to all registered listeners. |
void |
setValueAxisLocation(int index,
AxisLocation location,
boolean notify)
Sets the location of the value axis and sends a PlotChangeEvent
to all registered listeners. |
void |
setValueCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the value crosshair should "lock-on" to actual data values. |
void |
setValueCrosshairPaint(java.awt.Paint paint)
Sets the paint used to draw the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners. |
void |
setValueCrosshairStroke(java.awt.Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified. |
void |
setValueCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the value crosshair is visible and, if the flag changes, sends a PlotChangeEvent to all registered listeners. |
void |
setValueGridlinePaint(java.awt.Paint paint)
Sets the paint used to draw the grid lines against the value axis and sends a PlotChangeEvent to all registered listeners. |
void |
setValueGridlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the grid-lines against the value axis and sends a PlotChangeEvent to all registered listeners. |
void |
setValueGridlineVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against the value axis. |
java.lang.String |
toString()
Override toString method. |
protected void |
translateMarkerShapes()
Translate marker shape for 3D chart. |
void |
zoomValueAxes(java.awt.geom.Rectangle2D selectArea,
java.awt.geom.Rectangle2D dataArea,
java.awt.geom.Point2D source)
Zoom value axes. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ijchart.xychart.listener.IRenderChangeListener |
|---|
renderChanged |
| Field Detail |
|---|
public static final ChartOrientation DEFAULT_CHART_ORIENTATION
public static final boolean DEFAULT_DOMAIN_CROSSHAIR_VISIBLE
public static final boolean DEFAULT_DOMAIN_CROSSHAIR_LOCKED_ON_DATA
public static final boolean DEFAULT_DOMAIN_ZERO_BASELINE_VISIBLE
public static final boolean DEFAULT_VALUE_CROSSHAIR_VISIBLE
public static final boolean DEFAULT_VALUE_CROSSHAIR_LOCKED_ON_DATA
public static final boolean DEFAULT_DOMAIN_GRIDLINE_VISIBLE
public static final boolean DEFAULT_VALUE_GRIDLINE_VISIBLE
public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
public static final java.awt.Stroke DEFAULT_CROSSHAIR_STROKE
public static final java.awt.Paint DEFAULT_CROSSHAIR_PAINT
protected java.util.List domainAxes
protected java.util.List valueAxes
protected java.util.Hashtable renderToDomainAxis
protected java.util.Hashtable renderToValueAxis
| Constructor Detail |
|---|
public AbstractAxisPlot()
| Method Detail |
|---|
public ChartOrientation getOrientation()
getOrientation in interface IZoomablepublic void setOrientation(ChartOrientation orientation)
PlotChangeEvent to
all registered listeners.
orientation - ChartOrientation
The orientation (null not permitted).public RectangleInsets getAxisOffset()
public void setAxisOffset(RectangleInsets offset)
PlotChangeEvent to all registered listeners.
offset - RectangleInsets
The offset (null not permitted).public void clearDomainAxes()
PlotChangeEvent
to all registered listeners.
public AbstractValueAxis getValueAxis()
public AbstractValueAxis getValueAxis(int index)
index - int
The axis index,must be greater than or equal to 0.
public AbstractValueAxis getValueAxisByRenderIndex(int renderIndex)
renderIndex -
The index of render.
public void setValueAxis(AbstractValueAxis axis)
PlotChangeEvent to
all registered listeners.
axis - AbstractValueAxis
The axis (null not permitted).
public void setValueAxis(int index,
AbstractValueAxis axis)
PlotChangeEvent to
all registered listeners.
index - int
The axis index,must be greater than or equal to 0.axis - AbstractValueAxis
The axis (null not permitted).
public void setValueAxis(int index,
AbstractValueAxis axis,
boolean notify)
PlotChangeEvent to
all registered listeners.
index - int
The axis index,must be greater than or equal to 0.axis - AbstractValueAxis
The value axis (null not permitted).notify - boolean
Whether or not notify listeners.public void setValueAxes(AbstractValueAxis[] axes)
PlotChangeEvent
to all registered listeners.
axes - AbstractValueAxis[]
The axes (null not permitted).
public void setValueAxes(AbstractValueAxis[] axes,
int startIndex)
PlotChangeEvent
to all registered listeners.
axes - AbstractValueAxis[]
The axes (null not permitted).startIndex - int
The beginning of the index value, startIndex before the target will not be covered.
must be greater than or equal to 0.public int getValueAxisIndex(AbstractValueAxis axis)
axis -
The value axis (null not permitted).
public AxisLocation getValueAxisLocation()
public AxisLocation getValueAxisLocation(int index)
index -
The axis index,must be greater than or equal to 0.
public void setValueAxisLocation(AxisLocation location)
PlotChangeEvent
to all registered listeners.
location - AxisLocation
The location (null not permitted).
public void mapRenderToDomainAxis(int renderIndex,
int domainAxisIndex)
renderIndex - int
The index of render object.domainAxisIndex - int
The index of domain axis.
public void mapRenderToValueAxis(int renderIndex,
int valueAxisIndex)
renderIndex - int
The index of render object.valueAxisIndex - int
The index of value axis.
public void setValueAxisLocation(AxisLocation location,
boolean notify)
PlotChangeEvent
to all registered listeners.
location - AxisLocation
The location (null not permitted).notify -
Whether or not notify listeners.
public void setValueAxisLocation(int index,
AxisLocation location)
PlotChangeEvent
to all registered listeners.
index - int
The axis index,must be greater than or equal to 0.location - AxisLocation
The location (null not permitted).
public void setValueAxisLocation(int index,
AxisLocation location,
boolean notify)
PlotChangeEvent
to all registered listeners.
index - int
The axis index,must be greater than or equal to 0.location - AxisLocation
The location (null not permitted).notify -
Whether or not notify listeners.public RectangleEdge getValueAxisEdge()
public RectangleEdge getValueAxisEdge(int index)
index - int
The axis index.
public int getValueAxisCount()
public void clearValueAxes()
PlotChangeEvent
to all registered listeners.
public boolean isDomainGridlineVisible()
public void setDomainGridlineVisible(boolean visible)
If the flag value changes, a PlotChangeEvent is sent to all
registered listeners.
visible - boolean
The new value of the flag.public java.awt.Stroke getDomainGridlineStroke()
public void setDomainGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent to all registered listeners.
stroke - Stroke
The stroke (null not permitted).public java.awt.Paint getDomainGridlinePaint()
public void setDomainGridlinePaint(java.awt.Paint paint)
PlotChangeEvent to all registered listeners.
paint - Paint
The paint (null not permitted).public boolean isValueGridlineVisible()
public void setValueGridlineVisible(boolean visible)
PlotChangeEvent is
sent to all registered listeners.
visible - boolean
The new value of the flag.public java.awt.Stroke getValueGridlineStroke()
public void setValueGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent to all registered listeners.
stroke - Stroke
The stroke (null not permitted).public java.awt.Paint getValueGridlinePaint()
public void setValueGridlinePaint(java.awt.Paint paint)
PlotChangeEvent to all registered listeners.
paint - Paint
The paint (null not permitted).public boolean isDomainCrosshairVisible()
public void setDomainCrosshairVisible(boolean flag)
PlotChangeEvent to all registered listeners.
flag - boolean
The new value of the flag.public boolean isDomainCrosshairLockedOnData()
public void setDomainCrosshairLockedOnData(boolean flag)
PlotChangeEvent to all registered listeners.
flag - boolean
The flag.public java.awt.Stroke getDomainCrosshairStroke()
Stroke used to draw the crosshair (if visible).
public void setDomainCrosshairStroke(java.awt.Stroke stroke)
stroke - Stroke
The new crosshair stroke (null not permitted).public java.awt.Paint getDomainCrosshairPaint()
Paint used to draw the crosshair.
public void setDomainCrosshairPaint(java.awt.Paint paint)
PlotChangeEvent to all registered listeners.
paint - Paint
The new crosshair paint (null not permitted).public boolean isValueCrosshairVisible()
public void setValueCrosshairVisible(boolean flag)
PlotChangeEvent to all registered listeners.
flag - boolean
The new value of the flag.public boolean isValueCrosshairLockedOnData()
public void setValueCrosshairLockedOnData(boolean flag)
PlotChangeEvent to all registered listeners.
flag - boolean
The flag.public java.awt.Stroke getValueCrosshairStroke()
Stroke used to draw the crosshair (if visible).
public void setValueCrosshairStroke(java.awt.Stroke stroke)
stroke - Stroke
The new crosshair stroke (null not permitted).public java.awt.Paint getValueCrosshairPaint()
Paint used to draw the crosshair.
public void setValueCrosshairPaint(java.awt.Paint paint)
PlotChangeEvent to all registered listeners.
paint - Paint
The new crosshair paint (null not permitted).
public void mapValueAxisToRender(int valueAxisIndex,
int renderIndex)
valueAxisIndex - int
The value axis index.renderIndex - int
The render index.public int getRenderIndexForValueAxis(int valueAxisIndex)
valueAxisIndex - int
The value axis index.
public boolean drawCrosshair(java.awt.geom.Point2D mouseClickPoint)
drawCrosshair in class AbstractPlotmouseClickPoint - Point2D
The mouse click point (null permitted).
public java.awt.geom.Point2D getCrosshairPoint(java.awt.geom.Point2D mouseClickPoint)
getCrosshairPoint in class AbstractPlotmouseClickPoint - Point2D
The mouse click point (null permitted).
public void zoomValueAxes(java.awt.geom.Rectangle2D selectArea,
java.awt.geom.Rectangle2D dataArea,
java.awt.geom.Point2D source)
zoomValueAxes in interface IZoomablezoomValueAxes in class AbstractPlotselectArea - Rectangle2D
The selected area,null to restore chart.dataArea - Rectangle2D
The data area,null to restore chart.source - Point2D
The source mouse point (null not permitted).protected RenderShapeCollection getRenderShapeCollection(int valueAxisIndex)
valueAxisIndex - int
The value axis index.
protected void allocateRenderShapesList(int renderSize)
renderSize - int
The size of renders.
protected void drawValueGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
RenderShapeCollection renderShapes,
int valueAxesSize)
g2 - Graphics2D
The graphics device (null not permitted).dataArea - Rectangle2D
The area within which the data should be drawn (null not permitted).renderShapes - RenderShapeCollection
Collects information about the render (null not permitted).valueAxesSize - int
The count of value axes.protected void translateMarkerShapes()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractPlotjava.lang.CloneNotSupportedException - if the cloning is not supported.public boolean equals(java.lang.Object obj)
equals in class AbstractPlotobj -
The object to test against (null permitted).
public int hashCode()
hashCode in class AbstractPlotpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||