|
|||||||||
| 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.category.AbstractCategoryRender
public abstract class AbstractCategoryRender
Title: IJChart
Description: a chart library for the Java(tm) platform.
Base class providing common services for category renders.Copyright: Copyright (c) 2013
Company:
| Field Summary | |
|---|---|
static double |
DEFAULT_BASE_VALUE
The default base value for the bars,and the value must between the minimum and maximum value of axis tick mark. |
static double |
DEFAULT_ITEM_MARGIN
The default item margin percentage. |
static double |
DEFAULT_MAXIMUM_BAR_WIDTH
The default maximum bar width (in Java2D units). |
static double |
DEFAULT_MINIMUM_BAR_WIDTH
The default minimum bar length (in Java2D units). |
| Constructor Summary | |
|---|---|
protected |
AbstractCategoryRender(IMatrixDataset dataset)
constructor. |
| Method Summary | |
|---|---|
void |
addAnnotation(ICategoryAnnotation annotation)
Add an annotation and sends a RenderChangeEvent
to all registered listeners. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
protected static IChartShape |
createCategoryMarkerShape(CategoryMarker marker,
java.awt.geom.Rectangle2D rect)
Create a category marker shape. |
void |
drawAllAnnotation(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
AnnotationShapeCollection annotationShapes)
Draws all annotation items. |
abstract void |
drawAllItems(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes,
float alpha)
Draws all data items. |
void |
drawCategoryMarker(CategoryAxis categoryAxis,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes)
Draws a marker to indicate a particular category on the category axis. |
boolean |
equals(java.lang.Object obj)
Indicates if some other object is "equal to" this one. |
java.util.Collection |
getAllAnnotations()
Returns all annotations and this collection is unmodifiable. |
double |
getBaseValue()
The base value for the bars. |
double |
getItemMargin()
Returns the item margin as a percentage of the available space for all bars. |
double |
getMaximumBarWidth()
Returns the maximum bar width (in Java2D units). |
double |
getMinimumBarWidth()
Returns the minimum bar width (in Java2D units). |
int |
hashCode()
Returns a hash code value for the object. |
void |
removeAllAnnotation()
Remove all annotations of this render and sends a RenderChangeEvent to all registered listeners. |
void |
setBaseValue(double value)
Sets the base value for the bars and sends a RenderChangeEvent to all registered listeners. |
void |
setItemMargin(double percent)
Sets the item margin and sends a RenderChangeEvent to all
registered listeners. |
void |
setMaximumBarWidth(double barWidth)
Sets the maximum bar width,and sends a RenderChangeEvent
to all registered listeners. |
void |
setMinimumBarWidth(double barWidth)
Sets the mimimum bar width,if the bar width less than this value would not be drawn ,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.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 double DEFAULT_ITEM_MARGIN
public static final double DEFAULT_BASE_VALUE
public static final double DEFAULT_MINIMUM_BAR_WIDTH
public static final double DEFAULT_MAXIMUM_BAR_WIDTH
| Constructor Detail |
|---|
protected AbstractCategoryRender(IMatrixDataset dataset)
dataset - IMatrixDataset
The dataset (null not permitted).| Method Detail |
|---|
public double getItemMargin()
public void setItemMargin(double percent)
RenderChangeEvent to all
registered listeners. The value is expressed as a percentage of the
available width for plotting all the bars, with the resulting amount to
be distributed between all the bars evenly.
percent - double
The margin (where 0.10 is ten percent).public double getBaseValue()
public void setBaseValue(double value)
RenderChangeEvent to all registered listeners.
value - double
The new base value.public double getMinimumBarWidth()
public void setMinimumBarWidth(double barWidth)
RenderChangeEvent
to all registered listeners.
barWidth - double
The minimum bar width (in Java2D units).public double getMaximumBarWidth()
public void setMaximumBarWidth(double barWidth)
RenderChangeEvent
to all registered listeners.
barWidth - double
The maximum bar width (in Java2D units),and must greater than 0.
public void drawCategoryMarker(CategoryAxis categoryAxis,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes)
categoryAxis - CategoryAxis
The category axis (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).
protected static IChartShape createCategoryMarkerShape(CategoryMarker marker,
java.awt.geom.Rectangle2D rect)
marker - CategoryMarker
The category marker object.rect - Rectangle2D
The marker shape bound.
public abstract void drawAllItems(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes,
float alpha)
categoryAxis - CategoryAxis
The category axis (null not permitted).valueAxis - AbstractValueAxis
The value axis (null not permitted).valueAxisEdge - RectangleEdge
The value 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 void addAnnotation(ICategoryAnnotation annotation)
RenderChangeEvent
to all registered listeners.
annotation - ICategoryAnnotation
A annotation object (null not permitted).public void removeAllAnnotation()
RenderChangeEvent to all registered listeners.
public java.util.Collection getAllAnnotations()
public void drawAllAnnotation(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
AnnotationShapeCollection annotationShapes)
categoryAxis - CategoryAxis
The category axis (null not permitted).valueAxis - AbstractValueAxis
The value axis (null not permitted).valueAxisEdge - RectangleEdge
The value axis edge (null not permitted).orientation - ChartOrientation
The chart orientation (null not permitted).dataArea - Rectangle2D
The chart data area (null not permitted).annotationShapes - AnnotationShapeCollection
Collects information about the annotation (null not permitted).public boolean equals(java.lang.Object obj)
equals in class AbstractWithAxisRenderobj -
the reference object with which to compare.
public int hashCode()
hashCode in class AbstractWithAxisRender
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractWithAxisRenderjava.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 AbstractWithAxisRender
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||