|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.render.AbstractRender
com.ijchart.xychart.render.AbstractWithAxisRender
com.ijchart.xychart.render.xy.AbstractXYRender
com.ijchart.xychart.render.xy.AbstractXYAreaRender
com.ijchart.xychart.render.xy.XYDifferenceRender
public class XYDifferenceRender
Title: IJChart
Description: a chart library for the Java(tm) platform.
Draw difference shapes between two rows.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_NEGATIVE_PAINT
The default paint used to highlight negative differences (y(0) < y(1)). |
static java.awt.Paint |
DEFAULT_POSITIVE_PAINT
The default paint used to highlight positive differences (y(0) > y(1)). |
static boolean |
DEFAULT_SHAPES_VISIBLE
The default flag whether or not display shapes at each point. |
Fields inherited from class com.ijchart.xychart.render.xy.AbstractXYAreaRender |
---|
uniqueXValues |
Constructor Summary | |
---|---|
XYDifferenceRender(IMatrixDataset dataset)
constructor. |
|
XYDifferenceRender(IMatrixDataset dataset,
java.awt.Paint positivePaint,
java.awt.Paint negativePaint)
constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
protected IChartShape |
createItemShapeOnly(java.awt.geom.Rectangle2D rect,
java.lang.String text,
java.lang.Object appendParam)
Create a shape with no attribute specified. |
void |
drawAllItems(AbstractValueAxis xAxis,
RectangleEdge xAxisEdge,
AbstractValueAxis yAxis,
RectangleEdge yAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes,
float alpha)
Draws all data items. |
boolean |
equals(java.lang.Object obj)
Indicates if some other object is "equal to" this one. |
protected IChartShape[] |
getLegendItemShapes(int legendCount)
Returns the shape array of legend items. |
LegendType |
getLegendType()
Return the legend type. |
java.awt.Paint |
getNegativePaint()
Returns the paint used to highlight negative differences (y(0) < y(1)). |
java.awt.Paint |
getPositivePaint()
Returns the paint used to highlight positive differences (y(0) > y(1)). |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isShapesVisible()
Returns whether or not display shapes at each point. |
void |
setNegativePaint(java.awt.Paint paint)
Sets the paint used to highlight negative differences (y(0) < y(1)) and sends a RenderChangeEvent to all registered listeners. |
void |
setPositivePaint(java.awt.Paint paint)
Sets the paint used to highlight positive differences (y(0) > y(1)) and sends a RenderChangeEvent to all registered listeners. |
void |
setShapesVisible(boolean flag)
Sets whether or not display shapes at each point and sends a RenderChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class com.ijchart.xychart.render.xy.AbstractXYAreaRender |
---|
calculateUniqueXValues, checkRowDataDuplicate, processDataset |
Methods inherited from class com.ijchart.xychart.render.xy.AbstractXYRender |
---|
addAnnotation, drawAllAnnotation, getAllAnnotations, removeAllAnnotation |
Methods inherited from class com.ijchart.xychart.render.AbstractWithAxisRender |
---|
createItemShape, createValueMarkerShape, drawIntervalValueMarker, drawValueMarker, getValueAxisOffsetType |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Paint DEFAULT_POSITIVE_PAINT
public static final java.awt.Paint DEFAULT_NEGATIVE_PAINT
public static final boolean DEFAULT_SHAPES_VISIBLE
Constructor Detail |
---|
public XYDifferenceRender(IMatrixDataset dataset)
dataset
- IMatrixDataset
The dataset (null not permitted).public XYDifferenceRender(IMatrixDataset dataset, java.awt.Paint positivePaint, java.awt.Paint negativePaint)
dataset
- IMatrixDataset
The dataset (null not permitted).positivePaint
- Paint
The paint used to highlight positive differences (null not permitted).negativePaint
- Paint
The paint used to highlight negative differences (null not permitted).Method Detail |
---|
public java.awt.Paint getPositivePaint()
public void setPositivePaint(java.awt.Paint paint)
RenderChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public java.awt.Paint getNegativePaint()
public void setNegativePaint(java.awt.Paint paint)
RenderChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public boolean isShapesVisible()
public void setShapesVisible(boolean flag)
RenderChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public void drawAllItems(AbstractValueAxis xAxis, RectangleEdge xAxisEdge, AbstractValueAxis yAxis, RectangleEdge yAxisEdge, java.awt.geom.Rectangle2D dataArea, ChartOrientation orientation, RenderShapeCollection renderShapes, float alpha)
drawAllItems
in class AbstractXYRender
xAxis
- AbstractValueAxis
The x value axis (null not permitted).xAxisEdge
- RectangleEdge
The x axis edge.yAxis
- AbstractValueAxis
The y value axis (null not permitted).yAxisEdge
- RectangleEdge
The y axis edge (null not permitted).dataArea
- Rectangle2D
The chart data area (null not permitted).orientation
- ChartOrientation
The chart orientation (null not permitted).renderShapes
- RenderShapeCollection
Collects information about the render (null not permitted).alpha
- float
The alpha transparency (in the range 0.0f to 1.0f, where 0.0f is fully transparent,
and 1.0f is fully opaque).public LegendType getLegendType()
getLegendType
in interface IRender
getLegendType
in class AbstractXYAreaRender
protected IChartShape[] getLegendItemShapes(int legendCount)
getLegendItemShapes
in class AbstractRender
legendCount
- int
The legend items count.
protected IChartShape createItemShapeOnly(java.awt.geom.Rectangle2D rect, java.lang.String text, java.lang.Object appendParam)
createItemShapeOnly
in class AbstractXYAreaRender
rect
- Rectangle2D
The bar rectangle (null not permitted).text
- String
The text (null permitted).appendParam
- Object
The append parameter,used for special propose (null permitted).
public boolean equals(java.lang.Object obj)
equals
in class AbstractXYAreaRender
obj
-
the reference object with which to compare.
public int hashCode()
hashCode
in class AbstractXYAreaRender
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractXYAreaRender
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.public java.lang.String toString()
toString
in class AbstractXYAreaRender
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |