com.ijchart.xychart.render.noaxis
Class PolarRender

java.lang.Object
  extended by com.ijchart.xychart.render.AbstractRender
      extended by com.ijchart.xychart.render.noaxis.AbstractNoAxisRender
          extended by com.ijchart.xychart.render.noaxis.PolarRender
All Implemented Interfaces:
IDatasetChangeListener, INoAxisRender, IRender, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class PolarRender
extends AbstractNoAxisRender
implements INoAxisRender, java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

Draw polar chart shapes.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
static boolean DEFAULT_ANGLE_GRIDLINES_VISIBLE
           A default flag that controls whether the angle grid-lines are visible.
static java.awt.Font DEFAULT_ANGLE_LABEL_FONT
           The default font used to draw the angle labels.
static boolean DEFAULT_ANGLE_LABELS_VISIBLE
           A default flag that controls whether or not the angle labels are 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 java.awt.Paint DEFAULT_LABEL_PAINT
           The paint used to display the angle labels.
static double DEFAULT_MARGIN
           The default margin around data area.
static boolean DEFAULT_RADIUS_GRIDLINES_VISIBLE
           A default flag that controls whether the radius grid-lines are visible.
 
Fields inherited from class com.ijchart.xychart.render.AbstractRender
borderPaints, borderStrokes, DEFAULT_AUTO_SELECT_BORDER_PAINT, DEFAULT_AUTO_SELECT_BORDER_STROKE, DEFAULT_AUTO_SELECT_FILL_PAINT, DEFAULT_BACKGROUND_IMAGE_ALIGNMENT, DEFAULT_BACKGROUND_PAINT, DEFAULT_BASE_BORDER_PAINT, DEFAULT_BASE_BORDER_STROKE, DEFAULT_BASE_ITEM_FILL, DEFAULT_BASE_ITEM_FILL_PAINT, DEFAULT_BASE_ITEM_FILL_PAINT_TRANSFORMER, DEFAULT_BASE_ITEM_LABEL_FONT, DEFAULT_BASE_ITEM_LABEL_HORIZONTAL_ALIGNMENT, DEFAULT_BASE_ITEM_LABEL_PAINT, DEFAULT_BASE_ITEM_LABEL_VERTICAL_ALIGNMENT, DEFAULT_BASE_ITEM_LABEL_VISIBLE, DEFAULT_BORDER_PAINT, DEFAULT_BORDER_STROKE, DEFAULT_DRAW_BORDER, DEFAULT_DRAWINT_SUPPLIER, DEFAULT_GENERATOR_TOOLTIP, DEFAULT_GENERATOR_URL, DEFAULT_LABEL_GENERATOR, DEFAULT_RENDER_AREA_BORDER_VISIBLE, DEFAULT_TOOLTIP_GENERATOR, fillPaints
 
Constructor Summary
PolarRender(IMatrixDataset dataset)
           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(java.awt.geom.Rectangle2D dataArea, RenderShapeCollection renderShapes, float alpha)
           Draws all data items.
 void drawBackground(java.awt.geom.Rectangle2D dataArea, ChartOrientation orientation, RenderShapeCollection renderShapes)
           Draws a background for the data area.
 boolean equals(java.lang.Object obj)
           Tests this instance for equality with an arbitrary object.
 java.awt.Paint getAngleGridlinePaint()
           Returns the paint used to draw the angle grid-lines.
 java.awt.Stroke getAngleGridlineStroke()
           Returns the stroke used to draw the angle grid-lines.
 java.awt.Font getAngleLabelFont()
           Returns the font used to draw the angle labels.
 java.awt.Paint getAngleLabelPaint()
           Returns the paint used to display the angle labels.
protected  java.lang.String[][] getAngleTicks()
           Returns the angle ticks (in degree).
 XYNumberValueAxis getAxis()
           Returns the axis for draw tick marks.
 LegendType getLegendType()
           Return the legend type.
 double getMargin()
           Returns the margin around data area.
 java.awt.Paint getRadiusGridlinePaint()
           Returns the paint used to draw the radius grid-lines and sends a RenderChangeEvent to all registered listeners.
 java.awt.Stroke getRadiusGridlineStroke()
           Returns the stroke used to draw the radius grid-lines.
 int hashCode()
           Returns a hash code value for the object.
 boolean isAngleGridlinesVisible()
           Returns the flag that controls whether the angle grid-lines are visible.
 boolean isAngleLabelsVisible()
           Returns the flag that whether or not the angle labels are visible.
 boolean isRadiusGridlinesVisible()
           Returns the flag that controls whether the radius grid-lines are visible.
 void setAngleGridlinePaint(java.awt.Paint paint)
           Sets the paint used to draw the angle grid-lines and sends a RenderChangeEvent to all registered listeners.
 void setAngleGridlineStroke(java.awt.Stroke stroke)
           Sets the stroke used to draw the angle grid-lines and sends a RenderChangeEvent to all registered listeners.
 void setAngleGridlinesVisible(boolean flag)
           A flag that controls whether the angle grid-lines are visible and sends a RenderChangeEvent to all registered listeners.
 void setAngleLabelFont(java.awt.Font font)
           Sets the font used to draw the angle labels and sends a RenderChangeEvent to all registered listeners.
 void setAngleLabelPaint(java.awt.Paint paint)
           Sets the paint used to display the angle labels and sends a RenderChangeEvent to all registered listeners.
 void setAngleLabelsVisible(boolean flag)
           Sets the flag that controls whether or not the angle labels are visible and sends a RenderChangeEvent to all registered listeners.
 void setAxis(XYNumberValueAxis axis)
           Sets the axis for draw tick marks.
 void setMargin(double margin)
           Sets the margin around data area and sends a RenderChangeEvent to all registered listeners.
 void setRadiusGridlinePaint(java.awt.Paint paint)
           Sets the paint used to draw the radius grid-lines.
 void setRadiusGridlineStroke(java.awt.Stroke stroke)
           Sets the stroke used to draw the radius grid-lines and sends a RenderChangeEvent to all registered listeners.
 void setRadiusGridlinesVisible(boolean flag)
           A flag that controls whether the radius grid-lines 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.noaxis.AbstractNoAxisRender
createItemShape
 
Methods inherited from class com.ijchart.xychart.render.AbstractRender
add3DShapes, addChangeListener, calculateLegendItemShapes, datasetChanged, drawBackgroundImage, drawDrawAreaBorder, fireRenderChanged, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getBaseItemBorderPaint, getBaseItemBorderStroke, getBaseItemFillPaint, getBaseItemFillPaintTransformer, getBaseItemLabelDirection, getBaseItemLabelFont, getBaseItemLabelHorizontalAlignment, getBaseItemLabelPaint, getBaseItemLabelPosition, getBaseItemLabelVerticalAlignment, getBaseItemLabelVisible, getBorderPaints, getBorderStrokes, getChartArea, getColumnItemBorderPaint, getColumnItemBorderStroke, getColumnItemFillPaint, getColumnItemFillPaintTransformer, getColumnItemLabelDirection, getColumnItemLabelFont, getColumnItemLabelHorizontalAlignment, getColumnItemLabelPaint, getColumnItemLabelPosition, getColumnItemLabelVerticalAlignment, getDataset, getDrawingSupplier, getFillPaints, getItemBorderPaint, getItemBorderStroke, getItemFillPaint, getItemFillPaintHelper, getItemFillPaintTransformer, getItemLabelDirection, getItemLabelFont, getItemLabelHorizontalAlignment, getItemLabelPaint, getItemLabelPosition, getItemLabelVerticalAlignment, getLabelGenerator, getLegendItemCount, getLegendItemLabels, getLegendItemLabelsByColumn, getLegendItemLabelsByRow, getLegendItemShapes, getLegendPositon, getNegativeItemLabelHorizontalAlignment, getNegativeItemLabelVerticalAlignment, getPositiveItemLabelHorizontalAlignment, getPositiveItemLabelVerticalAlignment, getRenderAreaBorderPaint, getRenderAreaBorderStroke, getRowItemBorderPaint, getRowItemBorderStroke, getRowItemFillPaint, getRowItemFillPaintTransformer, getRowItemLabelDirection, getRowItemLabelFont, getRowItemLabelHorizontalAlignment, getRowItemLabelPaint, getRowItemLabelPosition, getRowItemLabelVerticalAlignment, getToolTipGenerator, hasListener, isAutoSelectBorderPaint, isAutoSelectBorderStroke, isAutoSelectFillPaint, isBaseItemDrawBorder, isBaseItemFill, isColumnItemDrawBorder, isColumnItemFill, isColumnItemLabelVisible, isColumnItemVisible, isGeneratorTooltip, isGeneratorUrl, isItemDrawBorder, isItemFill, isItemLabelVisible, isItemVisible, isRenderAreaBorderVisible, isRowItemDrawBorder, isRowItemFill, isRowItemLabelVisible, isRowItemVisible, notifyListeners, removeAllChangeListener, removeChangeListener, setAutoSelectBorderPaint, setAutoSelectBorderStroke, setAutoSelectFillPaint, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setBaseItemBorderPaint, setBaseItemBorderStroke, setBaseItemDrawBorder, setBaseItemFill, setBaseItemFillPaint, setBaseItemFillPaintTransformer, setBaseItemLabelDirection, setBaseItemLabelFont, setBaseItemLabelHorizontalAlignment, setBaseItemLabelPaint, setBaseItemLabelPosition, setBaseItemLabelVerticalAlignment, setBaseItemLabelVisible, setChartArea, setColumnItemBorderPaint, setColumnItemBorderStroke, setColumnItemDrawBorder, setColumnItemFill, setColumnItemFillPaint, setColumnItemFillPaintTransformer, setColumnItemLabelDirection, setColumnItemLabelFont, setColumnItemLabelHorizontalAlignment, setColumnItemLabelPaint, setColumnItemLabelPosition, setColumnItemLabelVerticalAlignment, setColumnItemLabelVisible, setColumnItemVisible, setCustomLegendType, setDataset, setDrawingSupplier, setDrawingSupplier, setGeneratorTooltip, setGeneratorUrl, setItemBorderPaint, setItemBorderStroke, setItemDrawBorder, setItemFill, setItemFillPaint, setItemFillPaintTransformer, setItemLabelDirection, setItemLabelFont, setItemLabelHorizontalAlignment, setItemLabelPaint, setItemLabelPosition, setItemLabelVerticalAlignment, setItemLabelVisible, setItemVisible, setLabelGenerator, setLegendPositon, setNegativeItemLabelHorizontalAlignment, setNegativeItemLabelVerticalAlignment, setPositiveItemLabelHorizontalAlignment, setPositiveItemLabelVerticalAlignment, setRenderAreaBorderPaint, setRenderAreaBorderStroke, setRenderAreaBorderVisible, setRowItemBorderPaint, setRowItemBorderStroke, setRowItemDrawBorder, setRowItemFill, setRowItemFillPaint, setRowItemFillPaintTransformer, setRowItemLabelDirection, setRowItemLabelFont, setRowItemLabelHorizontalAlignment, setRowItemLabelPaint, setRowItemLabelPosition, setRowItemLabelVerticalAlignment, setRowItemLabelVisible, setRowItemVisible, setToolTipGenerator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ijchart.xychart.render.IRender
addChangeListener, drawBackgroundImage, drawDrawAreaBorder, getBaseItemBorderPaint, getBaseItemBorderStroke, getBaseItemFillPaint, getBaseItemFillPaintTransformer, getBaseItemLabelFont, getBaseItemLabelHorizontalAlignment, getBaseItemLabelPaint, getBaseItemLabelPosition, getBaseItemLabelVerticalAlignment, getBaseItemLabelVisible, getColumnItemBorderPaint, getColumnItemBorderStroke, getColumnItemFillPaint, getColumnItemFillPaintTransformer, getColumnItemLabelFont, getColumnItemLabelHorizontalAlignment, getColumnItemLabelPaint, getColumnItemLabelPosition, getColumnItemLabelVerticalAlignment, getItemBorderPaint, getItemBorderStroke, getItemFillPaint, getItemFillPaintTransformer, getItemLabelFont, getItemLabelHorizontalAlignment, getItemLabelPaint, getItemLabelPosition, getItemLabelVerticalAlignment, getLabelGenerator, getNegativeItemLabelHorizontalAlignment, getNegativeItemLabelVerticalAlignment, getPositiveItemLabelHorizontalAlignment, getPositiveItemLabelVerticalAlignment, getRowItemBorderPaint, getRowItemBorderStroke, getRowItemFillPaint, getRowItemFillPaintTransformer, getRowItemLabelFont, getRowItemLabelHorizontalAlignment, getRowItemLabelPaint, getRowItemLabelPosition, getRowItemLabelVerticalAlignment, getToolTipGenerator, isBaseItemDrawBorder, isBaseItemFill, isColumnItemDrawBorder, isColumnItemFill, isColumnItemLabelVisible, isColumnItemVisible, isItemDrawBorder, isItemFill, isItemLabelVisible, isItemVisible, isRowItemDrawBorder, isRowItemFill, isRowItemLabelVisible, isRowItemVisible, removeAllChangeListener, removeChangeListener, setBaseItemBorderPaint, setBaseItemBorderStroke, setBaseItemDrawBorder, setBaseItemFill, setBaseItemFillPaint, setBaseItemFillPaintTransformer, setBaseItemLabelFont, setBaseItemLabelHorizontalAlignment, setBaseItemLabelPaint, setBaseItemLabelPosition, setBaseItemLabelVerticalAlignment, setBaseItemLabelVisible, setColumnItemBorderPaint, setColumnItemBorderStroke, setColumnItemDrawBorder, setColumnItemFill, setColumnItemFillPaint, setColumnItemFillPaintTransformer, setColumnItemLabelFont, setColumnItemLabelHorizontalAlignment, setColumnItemLabelPaint, setColumnItemLabelPosition, setColumnItemLabelVerticalAlignment, setColumnItemLabelVisible, setColumnItemVisible, setCustomLegendType, setItemBorderPaint, setItemBorderStroke, setItemDrawBorder, setItemFill, setItemFillPaint, setItemFillPaintTransformer, setItemLabelFont, setItemLabelHorizontalAlignment, setItemLabelPaint, setItemLabelPosition, setItemLabelVerticalAlignment, setItemLabelVisible, setItemVisible, setLabelGenerator, setNegativeItemLabelHorizontalAlignment, setNegativeItemLabelVerticalAlignment, setPositiveItemLabelHorizontalAlignment, setPositiveItemLabelVerticalAlignment, setRowItemBorderPaint, setRowItemBorderStroke, setRowItemDrawBorder, setRowItemFill, setRowItemFillPaint, setRowItemFillPaintTransformer, setRowItemLabelFont, setRowItemLabelHorizontalAlignment, setRowItemLabelPaint, setRowItemLabelPosition, setRowItemLabelVerticalAlignment, setRowItemLabelVisible, setRowItemVisible, setToolTipGenerator
 

Field Detail

DEFAULT_MARGIN

public static final double DEFAULT_MARGIN
The default margin around data area.

See Also:
Constant Field Values

DEFAULT_GRIDLINE_STROKE

public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
The default grid line stroke.


DEFAULT_GRIDLINE_PAINT

public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
The default grid line paint.


DEFAULT_ANGLE_LABELS_VISIBLE

public static final boolean DEFAULT_ANGLE_LABELS_VISIBLE
A default flag that controls whether or not the angle labels are visible.

See Also:
Constant Field Values

DEFAULT_ANGLE_LABEL_FONT

public static final java.awt.Font DEFAULT_ANGLE_LABEL_FONT
The default font used to draw the angle labels.


DEFAULT_LABEL_PAINT

public static final java.awt.Paint DEFAULT_LABEL_PAINT
The paint used to display the angle labels.


DEFAULT_ANGLE_GRIDLINES_VISIBLE

public static final boolean DEFAULT_ANGLE_GRIDLINES_VISIBLE
A default flag that controls whether the angle grid-lines are visible.

See Also:
Constant Field Values

DEFAULT_RADIUS_GRIDLINES_VISIBLE

public static final boolean DEFAULT_RADIUS_GRIDLINES_VISIBLE
A default flag that controls whether the radius grid-lines are visible.

See Also:
Constant Field Values
Constructor Detail

PolarRender

public PolarRender(IMatrixDataset dataset)
constructor.

Parameters:
dataset - IMatrixDataset The dataset (null not permitted).
Method Detail

getMargin

public double getMargin()
Returns the margin around data area.

Returns:
double The margin.

setMargin

public void setMargin(double margin)
Sets the margin around data area and sends a RenderChangeEvent to all registered listeners.

Parameters:
margin - double The margin.

isAngleLabelsVisible

public boolean isAngleLabelsVisible()
Returns the flag that whether or not the angle labels are visible.

Returns:
boolean A boolean.

setAngleLabelsVisible

public void setAngleLabelsVisible(boolean flag)
Sets the flag that controls whether or not the angle labels are visible and sends a RenderChangeEvent to all registered listeners.

Parameters:
flag - boolean A boolean.

getAngleLabelFont

public java.awt.Font getAngleLabelFont()
Returns the font used to draw the angle labels.

Returns:
Font The font (never null).

setAngleLabelFont

public void setAngleLabelFont(java.awt.Font font)
Sets the font used to draw the angle labels and sends a RenderChangeEvent to all registered listeners.

Parameters:
font - Font The font (null not permitted).

getAngleLabelPaint

public java.awt.Paint getAngleLabelPaint()
Returns the paint used to display the angle labels.

Returns:
Paint The paint (never null).

setAngleLabelPaint

public void setAngleLabelPaint(java.awt.Paint paint)
Sets the paint used to display the angle labels and sends a RenderChangeEvent to all registered listeners.

Parameters:
paint - Paint The paint (null not permitted).

isAngleGridlinesVisible

public boolean isAngleGridlinesVisible()
Returns the flag that controls whether the angle grid-lines are visible.

Returns:
boolean A boolean.

setAngleGridlinesVisible

public void setAngleGridlinesVisible(boolean flag)
A flag that controls whether the angle grid-lines are visible and sends a RenderChangeEvent to all registered listeners.

Parameters:
flag - boolean A boolean.

getAngleGridlineStroke

public java.awt.Stroke getAngleGridlineStroke()
Returns the stroke used to draw the angle grid-lines.

Returns:
Stroke The stroke (never null).

setAngleGridlineStroke

public void setAngleGridlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the angle grid-lines and sends a RenderChangeEvent to all registered listeners.

Parameters:
stroke - Stroke The stroke (null not permitted).

getAngleGridlinePaint

public java.awt.Paint getAngleGridlinePaint()
Returns the paint used to draw the angle grid-lines.

Returns:
Paint The paint (never null).

setAngleGridlinePaint

public void setAngleGridlinePaint(java.awt.Paint paint)
Sets the paint used to draw the angle grid-lines and sends a RenderChangeEvent to all registered listeners.

Parameters:
paint - Paint The paint (null not permitted).

isRadiusGridlinesVisible

public boolean isRadiusGridlinesVisible()
Returns the flag that controls whether the radius grid-lines are visible.

Returns:
boolean A boolean.

setRadiusGridlinesVisible

public void setRadiusGridlinesVisible(boolean flag)
A flag that controls whether the radius grid-lines are visible and sends a RenderChangeEvent to all registered listeners.

Parameters:
flag - boolean A boolean.

getRadiusGridlineStroke

public java.awt.Stroke getRadiusGridlineStroke()
Returns the stroke used to draw the radius grid-lines.

Returns:
Stroke The stroke (never null).

setRadiusGridlineStroke

public void setRadiusGridlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the radius grid-lines and sends a RenderChangeEvent to all registered listeners.

Parameters:
stroke - Stroke The stroke (null not permitted).

getRadiusGridlinePaint

public java.awt.Paint getRadiusGridlinePaint()
Returns the paint used to draw the radius grid-lines and sends a RenderChangeEvent to all registered listeners.

Returns:
Paint The paint (never null).

setRadiusGridlinePaint

public void setRadiusGridlinePaint(java.awt.Paint paint)
Sets the paint used to draw the radius grid-lines.

Parameters:
paint - Paint The paint (null not permitted).

getAxis

public XYNumberValueAxis getAxis()
Returns the axis for draw tick marks.

Returns:
XYNumberValueAxis The axis (maybe null).

setAxis

public void setAxis(XYNumberValueAxis axis)
Sets the axis for draw tick marks.

Parameters:
axis - XYNumberValueAxis The axis (null permitted).

drawAllItems

public void drawAllItems(java.awt.geom.Rectangle2D dataArea,
                         RenderShapeCollection renderShapes,
                         float alpha)
Draws all data items.

Specified by:
drawAllItems in class AbstractNoAxisRender
Parameters:
dataArea - Rectangle2D The chart data area (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).

getAngleTicks

protected java.lang.String[][] getAngleTicks()
Returns the angle ticks (in degree).

Returns:
String[] The angles array,the first element is degree,the second is tick label.

getLegendType

public LegendType getLegendType()
Return the legend type.

Specified by:
getLegendType in interface IRender
Overrides:
getLegendType in class AbstractRender
Returns:
LegendType The legend type.

createItemShapeOnly

protected IChartShape createItemShapeOnly(java.awt.geom.Rectangle2D rect,
                                          java.lang.String text,
                                          java.lang.Object appendParam)
Create a shape with no attribute specified.

Overrides:
createItemShapeOnly in class AbstractRender
Parameters:
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).
Returns:
IChartShape The shape.

drawBackground

public void drawBackground(java.awt.geom.Rectangle2D dataArea,
                           ChartOrientation orientation,
                           RenderShapeCollection renderShapes)
Draws a background for the data area.

Specified by:
drawBackground in interface IRender
Overrides:
drawBackground in class AbstractRender
Parameters:
dataArea - Rectangle2D The chart data area (null not permitted).
orientation - ChartOrientation The chart draw orientation (null not permitted).
renderShapes - RenderShapeCollection Collects information about the render (null not permitted).

equals

public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.

Overrides:
equals in class AbstractNoAxisRender
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class AbstractNoAxisRender
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class AbstractNoAxisRender
Returns:
object a clone of this instance.
Throws:
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.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class AbstractNoAxisRender
Returns:
a string representation of the object.