|
|||||||||
| 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.StockRender
public class StockRender
Title: IJChart
Description: a chart library for the Java(tm) platform.
Draw stock shapes.Copyright: Copyright (c) 2013
Company:
| Field Summary | |
|---|---|
static double |
DEFAULT_AUTO_WIDTH_FACTOR
The default factor for calculate shape width. |
static java.awt.Paint |
DEFAULT_DOWN_PAINT
The default paint used to fill the shape when the price moved down from open to close. |
static double |
DEFAULT_MAX_SHAPE_WIDTH_IN_PERCENT
The default maximum width of the graphic to percentage of axis length. |
static java.awt.Paint |
DEFAULT_UP_PAINT
The default paint used to fill the shape when the price moved up from open to close. |
static java.awt.Paint |
DEFAULT_VOLUME_PAINT
The default paint used to fill the volume bars. |
| Constructor Summary | |
|---|---|
StockRender(SingleRowDataset dataset)
The constructor. |
|
StockRender(SingleRowDataset dataset,
double shapeWidth)
The constructor. |
|
StockRender(SingleRowDataset dataset,
double shapeWidth,
boolean drawVolume)
The 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. |
double |
getAutoWidthFactor()
Returns the factor for calculate shape width. |
double |
getAutoWidthGap()
Returns the minimum gap between one shape and the next. |
java.awt.Paint |
getDownPaint()
Returns the paint used to fill the shape when the price moved down from open to close. |
LegendType |
getLegendType()
Return the legend type. |
double |
getMaxShapeWidthInPercent()
Returns the default maximum width of the graphic to percentage of axis length. |
double |
getShapeWidth()
Returns the shape width. |
java.awt.Paint |
getUpPaint()
Returns the paint used to fill the shape when the price moved up from open to close. |
java.awt.Paint |
getVolumePaint()
Returns the paint used to fill the volume bars (if they are visible). |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isDrawVolume()
Returns whether or not volume bars are drawn on the chart. |
void |
setAutoWidthFactor(double factor)
Sets the factor for calculate shape width. |
void |
setAutoWidthGap(double autoWidthGap)
Sets the minimum gap between one shape and the next and sends a RenderChangeEvent to all registered listeners. |
void |
setDownPaint(java.awt.Paint paint)
Sets the paint used to fill the shape when the price moved down from open to close,and sends a RenderChangeEvent to all registered listeners. |
void |
setDrawVolume(boolean flag)
Sets the flag controlling whether or not volume bars are drawn on the chart and sends a RenderChangeEvent to all registered listeners. |
void |
setMaxShapeWidthInPercent(double percent)
The default maximum width of the graphic to percentage of axis length,and sends a RenderChangeEvent to all registered listeners. |
void |
setShapeWidth(double width)
Sets the shape width and sends a RenderChangeEvent to all registered listeners. |
void |
setUpPaint(java.awt.Paint paint)
Sets the paint used to fill the shape when the price moved up from open to close,and sends a RenderChangeEvent to all registered listeners. |
void |
setVolumePaint(java.awt.Paint paint)
Sets the paint used to fill the volume bars (if they are visible) 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.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 transient java.awt.Paint DEFAULT_VOLUME_PAINT
public static final transient java.awt.Paint DEFAULT_UP_PAINT
public static final transient java.awt.Paint DEFAULT_DOWN_PAINT
public static final double DEFAULT_AUTO_WIDTH_FACTOR
public static final double DEFAULT_MAX_SHAPE_WIDTH_IN_PERCENT
| Constructor Detail |
|---|
public StockRender(SingleRowDataset dataset)
dataset - SingleRowDataset
The dataset (null not permitted).
public StockRender(SingleRowDataset dataset,
double shapeWidth)
dataset - SingleRowDataset
The dataset (null not permitted).shapeWidth - double
The shape width.
public StockRender(SingleRowDataset dataset,
double shapeWidth,
boolean drawVolume)
dataset - SingleRowDataset
The dataset (null not permitted).shapeWidth - double
The shape width.drawVolume - double
A flag indicating whether or not volume bars should be drawn.| Method Detail |
|---|
public double getShapeWidth()
public void setShapeWidth(double width)
RenderChangeEvent to all registered listeners.
width - double
The shape width.public double getAutoWidthFactor()
public void setAutoWidthFactor(double factor)
factor - double
The width factor (generally between 0.0 and 1.0).public double getAutoWidthGap()
public void setAutoWidthGap(double autoWidthGap)
RenderChangeEvent to all registered listeners.
autoWidthGap - double
The gap.public java.awt.Paint getUpPaint()
public void setUpPaint(java.awt.Paint paint)
RenderChangeEvent to all registered listeners.
paint - Paint
The paint (null permitted).public java.awt.Paint getDownPaint()
public void setDownPaint(java.awt.Paint paint)
RenderChangeEvent to all registered listeners.
paint - Paint
The paint (null permitted).public boolean isDrawVolume()
public void setDrawVolume(boolean flag)
RenderChangeEvent to all registered listeners.
flag - boolean
The flag.public java.awt.Paint getVolumePaint()
public void setVolumePaint(java.awt.Paint paint)
RenderChangeEvent to all registered listeners.
paint - Paint
The paint (null not permitted).public double getMaxShapeWidthInPercent()
public void setMaxShapeWidthInPercent(double percent)
RenderChangeEvent to all registered listeners.
percent - double
The percent.
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 AbstractXYRenderxAxis - 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 IRendergetLegendType in class AbstractRender
protected IChartShape createItemShapeOnly(java.awt.geom.Rectangle2D rect,
java.lang.String text,
java.lang.Object appendParam)
createItemShapeOnly in class AbstractRenderrect - 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 AbstractXYRenderobj -
the reference object with which to compare.
public int hashCode()
hashCode in class AbstractXYRender
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractXYRenderjava.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 AbstractXYRender
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||