|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ijchart.xychart.axis.AbstractAxis
public abstract class AbstractAxis
Title: IJChart
Description: a chart library for the Java(tm) platform.
The base class for all axes in IJChart.Copyright: Copyright (c) 2013
Company:
| Field Summary | |
|---|---|
static java.awt.Paint |
DEFAULT_3D_AXIS_FILL_PAINT
The default paint used for fill 3d axis. |
static boolean |
DEFAULT_AUTO_SELECT_TICK_LABEL_ALIGN
The default auto selec label alignment value. |
static java.awt.Font |
DEFAULT_AXIS_LABEL_FONT
The default axis label font. |
static RectangleInsets |
DEFAULT_AXIS_LABEL_INSETS
The default axis label insets. |
static java.awt.Paint |
DEFAULT_AXIS_LABEL_PAINT
The default axis label paint. |
static AxisLabelType |
DEFAULT_AXIS_LABEL_TYPE
The default axis label type. |
static boolean |
DEFAULT_AXIS_LABEL_VISIBLE
The default axis label visible. |
static java.awt.Paint |
DEFAULT_AXIS_LINE_PAINT
The default axis line paint. |
static java.awt.Stroke |
DEFAULT_AXIS_LINE_STROKE
The default axis line stroke. |
static boolean |
DEFAULT_AXIS_LINE_VISIBLE
A default flag that controls whether or not the axis line is visible. |
static double |
DEFAULT_AXIS_MARGIN
The default margin for the axis (used for both lower and upper margins). |
static boolean |
DEFAULT_AXIS_VISIBLE
The default axis visibility. |
static boolean |
DEFAULT_DRAW_EMPTY_LABEL_TICK_MARK
A default flag the controls whether or not draw tick mark with empty label. |
static double |
DEFAULT_FIXED_AXIS_SPACE
The default fixed axis space. |
static boolean |
DEFAULT_GRID_LINE_VISIBLE
A default flag indicate whether or not grid line is visible. |
static HorizontalAlignment |
DEFAULT_LABEL_HORIZONTAL_ALIGNMENT
The default label horizontal alignment. |
static float |
DEFAULT_MAXIMUM_CATEGORY_LABEL_WIDTH_RATIO
The default ratio that is multiplied by the width of one category to determine the maximum label width. |
static java.awt.Font |
DEFAULT_TICK_LABEL_FONT
The default tick label font. |
static HorizontalAlignment |
DEFAULT_TICK_LABEL_HORIZONTAL_ALIGNMENT
The default tick label horizontal alignment. |
static RectangleInsets |
DEFAULT_TICK_LABEL_INSETS
The default tick label insets. |
static java.awt.Paint |
DEFAULT_TICK_LABEL_PAINT
The default tick label paint. |
static VerticalAlignment |
DEFAULT_TICK_LABEL_VERTICAL_ALIGNMENT
The default tick label vertical alignment. |
static boolean |
DEFAULT_TICK_LABELS_VISIBLE
The default tick labels visibility. |
static float |
DEFAULT_TICK_MARK_INSIDE_LENGTH
The default tick mark inside length. |
static float |
DEFAULT_TICK_MARK_OUTSIDE_LENGTH
The default tick mark outside length. |
static java.awt.Paint |
DEFAULT_TICK_MARK_PAINT
The default tick paint. |
static java.awt.Stroke |
DEFAULT_TICK_MARK_STROKE
The default tick stroke. |
static boolean |
DEFAULT_TICK_MARKS_VISIBLE
The default tick marks visible. |
static double |
WIDTH_TICK_MARK_AND_TICK_LABEL
The space width between tick mark and tick label. |
| Constructor Summary | |
|---|---|
protected |
AbstractAxis(IMatrixDataset dataset)
Constructs an axis using a dataset. |
protected |
AbstractAxis(java.lang.String label,
IMatrixDataset dataset)
Constructs an axis using label and a dataset. |
| Method Summary | |
|---|---|
void |
addChangeListener(IAxisChangeListener listener)
Registers an object for notification of changes to the axis. |
double |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
Calculation the width or height of painting coordinate axis. |
protected java.awt.geom.Rectangle2D |
calculateLabelBound(java.awt.Graphics2D g2,
double labelMaxWidth,
double labelMaxHeight,
double labelAngle,
RectangleEdge edge,
java.lang.String[] seriesLabel,
java.awt.Font labelFont,
RectangleInsets inset)
Calculate the bound of draw a label. |
java.lang.Object |
clone()
Returns a clone of the axis. |
protected IChartShape |
createAxisLabelChartShape(java.awt.geom.Rectangle2D axisLabelDrawRect)
Create a RectangleTextChartShape object. |
protected double |
dawAxisLabel(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
Draw the axis label. |
double |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
boolean alignEdge)
Draw the X-axis or Y-axis on plot area(plotArea).All axis shape is stored in shapeCollection. |
protected double |
drawAxis3DLine(IEffect3D effect3D,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection)
Draws an axis line in a specified area and edge. |
protected double |
drawAxisLine(java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection)
Draws an axis line in a specified area and edge. |
abstract void |
drawGridLine(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
RectangleEdge axisEdge,
RenderShapeCollection shapeCollection,
java.awt.Stroke stroke,
java.awt.Paint paint)
Draw the grid line,only call after IAxis.draw(). |
protected abstract double |
drawTickLabel(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
Draws tick mark labels in a specified area and edge. |
protected abstract double |
drawTickMark(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
Draws tick marks in a specified area and edge. |
boolean |
equals(java.lang.Object obj)
Tests this axis for equality with another object. |
protected void |
fireAxisChanged()
Notifies all registered listeners that the axis has changed. |
java.awt.Paint |
getAxis3DFillPaint()
Returns the paint used for fill 3d axis. |
java.lang.String |
getAxisLabel()
Returns the label for the axis. |
double |
getAxisLabelAngle()
Returns the angle of the axis label. |
java.awt.Font |
getAxisLabelFont()
Returns the font for the axis label. |
HorizontalAlignment |
getAxisLabelHorizontalAlign()
Returns the label horizontal alignment. |
RectangleInsets |
getAxisLabelInsets()
Returns the insets for the label (that is, the amount of blank space that should be left around the label). |
java.awt.Paint |
getAxisLabelPaint()
Returns the color/shade used to draw the axis label. |
AxisLabelType |
getAxisLabelType()
Returns the axis label type. |
java.awt.Paint |
getAxisLinePaint()
Returns the paint used to draw the axis line. |
java.awt.Stroke |
getAxisLineStroke()
Returns the stroke used to draw the axis line. |
IFormatter |
getColKeyFormatter()
Returns the formatter for format the colKeys in dataset. |
IFormatter |
getDataFormatter()
Returns the formatter for format the data in dataset. |
IMatrixDataset |
getDataset()
Return the dataset. |
double |
getFixedAxisSpace()
Returns the fixed axis space. |
protected abstract java.lang.String[] |
getFormatedTickLabels(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
Returns the formated tick labels. |
double |
getLowerMargin()
Returns the lower margin for the axis. |
float |
getMaximumCategoryLabelWidthRatio()
Returns the category label width ratio. |
IFormatter |
getRowKeyFormatter()
Returns the formatter for format the rowKeys in dataset. |
double |
getTickLabelAngle()
Returns the tick label angle (in radians). |
java.awt.Font |
getTickLabelFont()
Returns the font used for the tick labels (if showing). |
java.awt.Font |
getTickLabelFont(java.lang.Object tickLabel)
Returns the font used for the specified tick label (if showing). |
HorizontalAlignment |
getTickLabelHorizontalAlign()
Returns the tick label horizontal alignment. |
RectangleInsets |
getTickLabelInsets()
Returns the insets for the tick labels. |
protected int |
getTickLabelLines()
Returns the line count of tick labels. |
java.awt.Paint |
getTickLabelPaint()
Returns the color/shade used for the tick labels. |
java.awt.Paint |
getTickLabelPaint(java.lang.Object tickLabel)
Returns the color/shade used for the tick labels. |
protected java.awt.geom.Rectangle2D |
getTickLabelRotateBound(java.awt.geom.Rectangle2D rect,
double angle)
Returns the rotate bound of tick label bound. |
VerticalAlignment |
getTickLabelVerticalAlign()
Returns the tick label vertical alignment. |
float |
getTickMarkInsideLength()
Returns the inside length of the tick marks. |
float |
getTickMarkOutsideLength()
Returns the outside length of the tick marks. |
java.awt.Paint |
getTickMarkPaint()
Returns the paint used to draw tick marks (if they are showing). |
java.awt.Stroke |
getTickMarkStroke()
Returns the stroke used to draw tick marks. |
double |
getUpperMargin()
Returns the upper margin for the axis. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
hasListener(java.util.EventListener listener)
Returns true if the specified object is registered with the dataset as a listener. |
boolean |
isAutoSelectTickLabelAlign()
Sets whether or not auto select label alignment. |
boolean |
isAxisLabelVisible()
Returns true if the axis label is visible, and false otherwise. |
boolean |
isAxisLineVisible()
A flag that controls whether or not the axis line is drawn. |
boolean |
isDrawEmptyLabelTickMark()
Returns a boolean flag controls whether or not draw tick mark with empty label. |
boolean |
isGridLineVisible()
Returns the flag indicate whether or not grid line is visible. |
boolean |
isTickLabelsVisible()
Returns a flag indicating whether or not the tick labels are visible. |
boolean |
isTickMarkVisible()
Returns the flag that indicates whether or not the tick marks are showing. |
boolean |
isVisible()
Returns true if the axis is visible, and false otherwise. |
protected void |
notifyListeners(AxisChangeEvent event)
Notifies all registered listeners that the axis has changed. |
void |
removeAllChangeListener()
Deregisters all object for notification of changes to the axis. |
void |
removeChangeListener(IAxisChangeListener listener)
Deregisters an object for notification of changes to the axis. |
void |
setAutoSelectTickLabelAlign(boolean autoSelectTickLabelAlign)
Sets whether or not auto select label alignment. |
void |
setAxis3DFillPaint(java.awt.Paint axis3DFillPaint)
Sets the paint used for fill 3d axis. |
void |
setAxisLabel(java.lang.String label)
Sets the label for the axis and sends an AxisChangeEvent to
all registered listeners. |
void |
setAxisLabelAngle(double angle)
Sets the angle for the label and sends an AxisChangeEvent to all
registered listeners. |
void |
setAxisLabelFont(java.awt.Font font)
Sets the font for the axis label and sends an AxisChangeEvent
to all registered listeners. |
void |
setAxisLabelHorizontalAlign(HorizontalAlignment horizontalAlign)
Sets the label horizontal alignment and sends an AxisChangeEvent to all registered listeners. |
void |
setAxisLabelInsets(RectangleInsets insets)
Sets the insets for the axis label, and sends an AxisChangeEvent
to all registered listeners. |
void |
setAxisLabelPaint(java.awt.Paint paint)
Sets the paint used to draw the axis label and sends an AxisChangeEvent to all registered listeners. |
void |
setAxisLabelType(AxisLabelType axisLabelType)
Sets the axis label type and sends an AxisChangeEvent to
all registered listeners. |
void |
setAxisLabelVisible(boolean visible)
Sets a flag that controls whether or not the axis label is visible and sends an AxisChangeEvent to all registered listeners. |
void |
setAxisLinePaint(java.awt.Paint paint)
Sets the paint used to draw the axis line and sends an AxisChangeEvent to all registered listeners. |
void |
setAxisLineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the axis line and sends an AxisChangeEvent to all registered listeners. |
void |
setAxisLineVisible(boolean visible)
Sets a flag that controls whether or not the axis line is visible and sends an AxisChangeEvent to all registered listeners. |
void |
setColKeyFormatter(IFormatter colKeyFormatter)
Sets the formatter for format the colKeys in dataset and sends an AxisChangeEvent to all registered listeners. |
void |
setDataFormatter(IFormatter dataFormatter)
Sets the formatter for format the data in dataset and sends an AxisChangeEvent to all registered listeners. |
void |
setDataset(IMatrixDataset dataset)
Sets dataset for this axis and sends an AxisChangeEvent to all registered listeners. |
void |
setDrawEmptyLabelTickMark(boolean flag)
Sets a boolean flag controls whether or not draw tick mark with empty label and sends a RenderChangeEvent to all registered listeners. |
void |
setFixedAxisSpace(double space)
Sets the fixed axis space and sends an AxisChangeEvent to
all registered listeners. |
void |
setGridLineVisible(boolean flag)
Sets a flag indicate whether or not grid line is visible and sends an AxisChangeEvent to all registered listeners. |
void |
setLowerMargin(double margin)
Sets the lower margin for the axis and sends an AxisChangeEvent
to all registered listeners. |
void |
setMaximumCategoryLabelWidthRatio(float ratio)
Sets the maximum category label width ratio and sends an AxisChangeEvent to all registered listeners. |
void |
setRowKeyFormatter(IFormatter rowKeyFormatter)
Sets the formatter for format the rowKeys in dataset and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelAngle(double tickLabelAngle)
* Sets the tick label angle (in radians) and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelFont(java.awt.Font font)
Sets the font for the tick labels and sends an AxisChangeEvent
to all registered listeners. |
void |
setTickLabelFont(java.lang.Object tickLabel,
java.awt.Font font)
Sets the font for the tick label and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelHorizontalAlign(HorizontalAlignment horizontalAlign)
Sets the tick label horizontal alignment and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelInsets(RectangleInsets insets)
Sets the insets for the tick labels and sends an AxisChangeEvent
to all registered listeners. |
void |
setTickLabelPaint(java.lang.Object tickLabel,
java.awt.Paint paint)
Sets the paint for the axis tick label and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelPaint(java.awt.Paint paint)
Sets the paint used to draw tick labels (if they are showing) and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelsVisible(boolean flag)
Sets the flag that determines whether or not the tick labels are visible and sends an AxisChangeEvent to all registered listeners. |
void |
setTickLabelVerticalAlign(VerticalAlignment verticalAlign)
Sets the tick label vertical alignment and sends an AxisChangeEvent to all registered listeners. |
void |
setTickMarkInsideLength(float length)
Sets the inside length of the tick marks and sends an AxisChangeEvent to all registered listeners. |
void |
setTickMarkOutsideLength(float length)
Sets the outside length of the tick marks and sends an AxisChangeEvent to all registered listeners. |
void |
setTickMarkPaint(java.awt.Paint paint)
Sets the paint used to draw tick marks and sends an AxisChangeEvent to all registered listeners. |
void |
setTickMarkStroke(java.awt.Stroke stroke)
Sets the stroke used to draw tick marks and sends an AxisChangeEvent to all registered listeners. |
void |
setTickMarkVisible(boolean flag)
Sets the flag that indicates whether or not the tick marks are showing and sends an AxisChangeEvent to all registered listeners. |
void |
setUpperMargin(double margin)
Sets the upper margin for the axis and sends an AxisChangeEvent
to all registered listeners. |
void |
setVisible(boolean visible)
Sets a flag that controls whether or not the axis is visible and sends an AxisChangeEvent to all registered listeners. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEFAULT_AXIS_VISIBLE
public static final java.awt.Font DEFAULT_AXIS_LABEL_FONT
public static final java.awt.Paint DEFAULT_AXIS_LABEL_PAINT
public static final RectangleInsets DEFAULT_AXIS_LABEL_INSETS
public static final boolean DEFAULT_AXIS_LINE_VISIBLE
public static final java.awt.Paint DEFAULT_AXIS_LINE_PAINT
public static final java.awt.Paint DEFAULT_3D_AXIS_FILL_PAINT
public static final java.awt.Stroke DEFAULT_AXIS_LINE_STROKE
public static final boolean DEFAULT_TICK_LABELS_VISIBLE
public static final java.awt.Font DEFAULT_TICK_LABEL_FONT
public static final java.awt.Paint DEFAULT_TICK_LABEL_PAINT
public static final RectangleInsets DEFAULT_TICK_LABEL_INSETS
public static final boolean DEFAULT_TICK_MARKS_VISIBLE
public static final boolean DEFAULT_AXIS_LABEL_VISIBLE
public static final java.awt.Stroke DEFAULT_TICK_MARK_STROKE
public static final java.awt.Paint DEFAULT_TICK_MARK_PAINT
public static final boolean DEFAULT_GRID_LINE_VISIBLE
public static final float DEFAULT_TICK_MARK_INSIDE_LENGTH
public static final float DEFAULT_TICK_MARK_OUTSIDE_LENGTH
public static final HorizontalAlignment DEFAULT_TICK_LABEL_HORIZONTAL_ALIGNMENT
public static final VerticalAlignment DEFAULT_TICK_LABEL_VERTICAL_ALIGNMENT
public static final HorizontalAlignment DEFAULT_LABEL_HORIZONTAL_ALIGNMENT
public static final boolean DEFAULT_AUTO_SELECT_TICK_LABEL_ALIGN
public static final double DEFAULT_AXIS_MARGIN
public static final double WIDTH_TICK_MARK_AND_TICK_LABEL
public static final AxisLabelType DEFAULT_AXIS_LABEL_TYPE
public static final double DEFAULT_FIXED_AXIS_SPACE
public static final float DEFAULT_MAXIMUM_CATEGORY_LABEL_WIDTH_RATIO
public static final boolean DEFAULT_DRAW_EMPTY_LABEL_TICK_MARK
| Constructor Detail |
|---|
protected AbstractAxis(IMatrixDataset dataset)
dataset - IMatrixDataset
The two dimension matrix dataset (null not permitted).
protected AbstractAxis(java.lang.String label,
IMatrixDataset dataset)
label -
The axis label (null permitted).dataset - IMatrixDataset
The two dimension matrix dataset (null not permitted).| Method Detail |
|---|
public boolean isVisible()
public void setVisible(boolean visible)
AxisChangeEvent to all registered listeners.
visible - the flag.public boolean isAxisLabelVisible()
public void setAxisLabelVisible(boolean visible)
AxisChangeEvent to all registered listeners.
visible - the flag.public java.lang.String getAxisLabel()
public void setAxisLabel(java.lang.String label)
AxisChangeEvent to
all registered listeners.
label -
The new label (null permitted).public java.awt.Font getAxisLabelFont()
public void setAxisLabelFont(java.awt.Font font)
AxisChangeEvent
to all registered listeners.
font -
The font (null not permitted).public java.awt.Paint getAxisLabelPaint()
public void setAxisLabelPaint(java.awt.Paint paint)
AxisChangeEvent to all registered listeners.
paint -
The paint (null not permitted).public RectangleInsets getAxisLabelInsets()
public void setAxisLabelInsets(RectangleInsets insets)
AxisChangeEvent
to all registered listeners.
insets -
The insets (null not permitted).public double getAxisLabelAngle()
public void setAxisLabelAngle(double angle)
AxisChangeEvent to all
registered listeners.
angle -
The angle (in radians).public boolean isAxisLineVisible()
public void setAxisLineVisible(boolean visible)
AxisChangeEvent to all registered listeners.
visible - the flag.public java.awt.Paint getAxisLinePaint()
public void setAxisLinePaint(java.awt.Paint paint)
AxisChangeEvent to all registered listeners.
paint -
The paint (null not permitted).public java.awt.Paint getAxis3DFillPaint()
public void setAxis3DFillPaint(java.awt.Paint axis3DFillPaint)
axis3DFillPaint - Paint
The paint used for fill 3d axis. public java.awt.Stroke getAxisLineStroke()
public void setAxisLineStroke(java.awt.Stroke stroke)
AxisChangeEvent to all registered listeners.
stroke -
The stroke (null not permitted).public boolean isTickLabelsVisible()
public void setTickLabelsVisible(boolean flag)
AxisChangeEvent to all registered listeners.
flag - the flag.public java.awt.Font getTickLabelFont()
public void setTickLabelFont(java.awt.Font font)
AxisChangeEvent
to all registered listeners.
font -
The font (null not allowed).public java.awt.Paint getTickLabelPaint()
public void setTickLabelPaint(java.awt.Paint paint)
AxisChangeEvent to all registered listeners.
paint -
The paint (null not permitted).public java.awt.Paint getTickLabelPaint(java.lang.Object tickLabel)
tickLabel - Object
The axis tick label (null permitted).
public void setTickLabelPaint(java.lang.Object tickLabel,
java.awt.Paint paint)
AxisChangeEvent to all registered listeners.
tickLabel - Object
The axis tick label (null not permitted).paint - Paint
The paint (null permitted).public RectangleInsets getTickLabelInsets()
public void setTickLabelInsets(RectangleInsets insets)
AxisChangeEvent
to all registered listeners.
insets -
The insets (null not permitted).public boolean isTickMarkVisible()
public void setTickMarkVisible(boolean flag)
AxisChangeEvent to all registered listeners.
flag - the flag.public float getTickMarkInsideLength()
public void setTickMarkInsideLength(float length)
AxisChangeEvent to all registered listeners.
length -
The new length.public float getTickMarkOutsideLength()
public void setTickMarkOutsideLength(float length)
AxisChangeEvent to all registered listeners.
length -
The new length.public java.awt.Stroke getTickMarkStroke()
public void setTickMarkStroke(java.awt.Stroke stroke)
AxisChangeEvent to all registered listeners.
stroke -
The stroke (null not permitted).public java.awt.Paint getTickMarkPaint()
public void setTickMarkPaint(java.awt.Paint paint)
AxisChangeEvent to all registered listeners.
paint -
The paint (null not permitted).public boolean isGridLineVisible()
public void setGridLineVisible(boolean flag)
AxisChangeEvent to all registered listeners.
flag - boolean
A boolean.public void addChangeListener(IAxisChangeListener listener)
listener -
The object that is being registered.public IMatrixDataset getDataset()
public void setDataset(IMatrixDataset dataset)
AxisChangeEvent to all registered listeners.
dataset - IMatrixDataset
A instance of IMatrixDataset (null not permitted).public IFormatter getRowKeyFormatter()
public void setRowKeyFormatter(IFormatter rowKeyFormatter)
AxisChangeEvent to all registered listeners.
rowKeyFormatter - IFormatter
A IFormatter.public IFormatter getColKeyFormatter()
public void setColKeyFormatter(IFormatter colKeyFormatter)
AxisChangeEvent to all registered listeners.
colKeyFormatter - IFormatter
A IFormatter.public IFormatter getDataFormatter()
public void setDataFormatter(IFormatter dataFormatter)
AxisChangeEvent to all registered listeners.
dataFormatter - IFormatter
A IFormatter.public double getTickLabelAngle()
public void setTickLabelAngle(double tickLabelAngle)
AxisChangeEvent to all registered listeners.
tickLabelAngle - double
The tick label angle (in radians).public void setTickLabelHorizontalAlign(HorizontalAlignment horizontalAlign)
AxisChangeEvent to all registered listeners.
horizontalAlign - HorizontalAlignment
The tick label horizontal alignment (null not permitted).public HorizontalAlignment getTickLabelHorizontalAlign()
public void setTickLabelVerticalAlign(VerticalAlignment verticalAlign)
AxisChangeEvent to all registered listeners.
verticalAlign - VerticalAlignment
The tick label vertical alignment (null not permitted).public VerticalAlignment getTickLabelVerticalAlign()
public void setAxisLabelHorizontalAlign(HorizontalAlignment horizontalAlign)
AxisChangeEvent to all registered listeners.
horizontalAlign - HorizontalAlignment
The label horizontal alignment (null not permitted).public HorizontalAlignment getAxisLabelHorizontalAlign()
public void setAutoSelectTickLabelAlign(boolean autoSelectTickLabelAlign)
autoSelectTickLabelAlign - boolean
A boolean.public boolean isAutoSelectTickLabelAlign()
public float getMaximumCategoryLabelWidthRatio()
public void setMaximumCategoryLabelWidthRatio(float ratio)
AxisChangeEvent to all registered listeners.
ratio -
The ratio.public java.awt.Font getTickLabelFont(java.lang.Object tickLabel)
tickLabel -
The axis tick label (null permitted).
public void setTickLabelFont(java.lang.Object tickLabel,
java.awt.Font font)
AxisChangeEvent to all registered listeners.
tickLabel - Object
The axis tick label (null not permitted).font - Font
The font (null permitted).public AxisLabelType getAxisLabelType()
public void setAxisLabelType(AxisLabelType axisLabelType)
AxisChangeEvent to
all registered listeners.
axisLabelType - AxisLabelType
The axis label type (never null).public double getFixedAxisSpace()
getFixedAxisSpace in interface IAxispublic void setFixedAxisSpace(double space)
AxisChangeEvent to
all registered listeners.
space - double
The fixed axis space (null permitted).public boolean isDrawEmptyLabelTickMark()
public void setDrawEmptyLabelTickMark(boolean flag)
RenderChangeEvent to all registered listeners.
flag - boolean
A boolean.
public double calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
calculateAxisSpace in interface IAxisg2 - Graphics2D
The graphics device (null not permitted).plotArea - Rectangle2D
The area within which the plot should be drawn.maxAxisArea - Rectangle2D
The maximum area within which the axis should be drawn.edge - RectangleEdge
The axis position.
protected int getTickLabelLines()
protected abstract java.lang.String[] getFormatedTickLabels(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
g2 - Graphics2D
The graphics device (null not permitted).maxAxisArea - Rectangle2D
The maximum area within which the axis should be drawn (null not permitted).edge - RectangleEdge
The axis position (null not permitted).
public double draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
boolean alignEdge)
draw in interface IAxisg2 - Graphics2D
The graphics device (null not permitted).plotArea - Rectangle2D
The area within which the plot should be drawn.axisArea - Rectangle2D
The empty chart area.edge - RectangleEdge
The axis position.shapeCollection - AxisShapeCollection
Collects information about the axis (null permitted).alignEdge - boolean
Controls whether or not translate shapes when the draw area less than the axis area.
protected double dawAxisLabel(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
g2 - Graphics2D
The graphics device (null not permitted).axisArea - Rectangle2D
The empty chart area.edge - RectangleEdge
The axis position.shapeCollection - AxisShapeCollection
Collects information about the axis (null permitted).cursor -
The cursor location.
protected java.awt.geom.Rectangle2D calculateLabelBound(java.awt.Graphics2D g2,
double labelMaxWidth,
double labelMaxHeight,
double labelAngle,
RectangleEdge edge,
java.lang.String[] seriesLabel,
java.awt.Font labelFont,
RectangleInsets inset)
g2 - Graphics2D
The graphics device (null not permitted).labelMaxWidth - double
The max width of label.labelMaxHeight - double
The max height of label.labelAngle -
The rotate angle of label.edge - RectangleEdge
The axis position.seriesLabel - String[]
A series labels (for example: axis tick labels).labelFont - Font
The font of draw labels.inset -
The insets for the label
protected java.awt.geom.Rectangle2D getTickLabelRotateBound(java.awt.geom.Rectangle2D rect,
double angle)
rect - Rectangle2D
The label bound.angle - double
The label rotate angle.
protected abstract double drawTickMark(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
g2 - Graphics2D
The graphics device (null not permitted).axisArea - Rectangle2D
The empty chart area.edge - RectangleEdge
The axis position.shapeCollection - AxisShapeCollection
Collects information about the axis (null permitted).cursor -
The cursor location.
protected abstract double drawTickLabel(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
g2 - Graphics2D
The graphics device (null not permitted).plotArea - Rectangle2D
The area within which the plot should be drawn.axisArea - Rectangle2D
The empty chart area.edge - RectangleEdge
The axis position.shapeCollection - AxisShapeCollection
Collects information about the axis (null permitted).cursor -
The cursor location.
protected double drawAxisLine(java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection)
axisArea - Rectangle2D
The empty chart area (null not permitted).edge - RectangleEdge
The axis position (null not permitted).shapeCollection - AxisShapeCollection
Collects information about the axis (null not permitted).
protected double drawAxis3DLine(IEffect3D effect3D,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection)
effect3D - IEffect3D
The 3D effect.axisArea - Rectangle2D
The empty chart area (null not permitted).edge - RectangleEdge
The axis position (null not permitted).shapeCollection - AxisShapeCollection
Collects information about the axis (null not permitted).
protected IChartShape createAxisLabelChartShape(java.awt.geom.Rectangle2D axisLabelDrawRect)
axisLabelDrawRect - Rectangle2D
The axis label bound.
IChartShape.public double getLowerMargin()
public void setLowerMargin(double margin)
AxisChangeEvent
to all registered listeners.
margin -
The margin as a percentage of the axis length (for example, 0.05 is five percent).public double getUpperMargin()
public void setUpperMargin(double margin)
AxisChangeEvent
to all registered listeners.
margin -
The margin as a percentage of the axis length (for example, 0.05 is five percent).
public abstract void drawGridLine(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
RectangleEdge axisEdge,
RenderShapeCollection shapeCollection,
java.awt.Stroke stroke,
java.awt.Paint paint)
g2 - Graphics2D
The graphics device (null not permitted).dataArea - Rectangle2D
The area within which the data should be drawn (null not permitted).axisEdge - RectangleEdge
The axis position (null not permitted).shapeCollection - RenderShapeCollection
Collects information about the render (null not permitted).stroke - Stroke
The grid line stroke.paint - Paint
The grid line paint (null not permitted).public void removeChangeListener(IAxisChangeListener listener)
listener -
The object to deregister.public void removeAllChangeListener()
public boolean hasListener(java.util.EventListener listener)
listener - the listener.
protected void fireAxisChanged()
protected void notifyListeners(AxisChangeEvent event)
event - information about the change to the axis.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if some component of the axis does
not support cloning.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj -
The object (null permitted).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||