|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.shape.AbstractChartShape
com.ijchart.xychart.shape.MeterArcChartShape
public class MeterArcChartShape
Title: IJChart
Description: a chart library for the Java(tm) platform.
A arc shape for meter chart.Note:Some super class method does not affect graphicsCopyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_ARC_BORDER_PAINT
The paint used to draw border. |
static double |
DEFAULT_BORDER_SIZE
The default border size. |
static boolean |
DEFAULT_DRAW_RADIUS
A default boolean flag controls whether or not draw arc radius. |
static boolean |
DEFAULT_DRAW_TICK
A default flag that controls whether or not the tick is drawn. |
static boolean |
DEFAULT_DRAW_TICK_LABEL
A default flag that controls whether or not the tick label is drawn. |
static java.awt.Font |
DEFAULT_TICK_LABEL_FONT
The font used to draw tick label. |
static java.text.NumberFormat |
DEFAULT_TICK_LABEL_FORMAT
The default tick label format. |
static java.awt.Paint |
DEFAULT_TICK_LABEL_PAINT
The paint used to draw tick label. |
static double |
DEFAULT_TICK_LENGTH
The default tick length. |
static java.awt.Paint |
DEFAULT_TICK_PAINT
The default paint used to draw ticks. |
static java.awt.Stroke |
DEFAULT_TICK_STROKE
The default stroke used to draw ticks. |
Fields inherited from class com.ijchart.xychart.shape.AbstractChartShape |
---|
DEFAULT_DRAW_TYPE, DEFAULT_SHAPE_ID, DEFAULT_VISIBLE, transformedShape |
Constructor Summary | |
---|---|
MeterArcChartShape(java.awt.geom.Arc2D arc)
A constructor. |
|
MeterArcChartShape(java.awt.geom.Arc2D arc,
double startTickAngle,
double tickAngleSize,
java.lang.Number[] tickLabels)
A constructor. |
Method Summary | |
---|---|
protected void |
calculateTransformedShape()
Calculate the transformed shape. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
draw(java.awt.Graphics2D g2)
Draw the ChartShape on a Java 2d graphics device(such as the screen or the printer). |
protected void |
drawSelect(java.awt.Graphics2D g2)
Draw the selected ChartShape on a Java 2d graphics device(such as the screen or the printer). |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
java.awt.geom.Arc2D |
getArc()
Returns the arc shape. |
double |
getBorderSize()
Returns the border size. |
protected java.awt.Shape |
getHotspotShape()
Returns the hotspot shape. |
java.awt.geom.Point2D |
getLockPoint()
Returns the lock coordinates of this shape. |
ShapeType |
getShapeType()
The type for describe this shape. |
double |
getStartTickAngle()
Returns the start angle for draw tick. |
java.awt.Font |
getTickLabelFont()
Returns the font used to draw tick label. |
java.text.NumberFormat |
getTickLabelFormat()
Returns the tick label format. |
java.awt.Paint |
getTickLabelPaint()
Returns the paint used to draw tick label. |
java.lang.Number[] |
getTickLabels()
Returns the array of tick labels. |
java.util.Collection |
getTickLabelShapes()
Returns the list of tick label shapes and is unmodifiable. |
double |
getTickLength()
Returns the tick length. |
java.util.Collection |
getTickLineShapes()
Returns the list of tick line shapes and is unmodifiable. |
java.awt.Paint |
getTickPaint()
Returns the paint used to draw ticks. |
double |
getTickSizeAngle()
Returns the tick size (measured in degree). |
java.awt.Stroke |
getTickStroke()
Returns the stroke used to draw ticks. |
java.awt.geom.Point2D |
getTopLeftPoint()
Returns the top left corner coordinates of this shape. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isDrawRadius()
A boolean flag controls whether or not draw arc radius. |
boolean |
isDrawTick()
A flag that controls whether or not the tick is drawn. |
boolean |
isDrawTickLabel()
A flag that controls whether or not the tick label is drawn. |
void |
setArc(java.awt.geom.Arc2D arc)
Sets the arc shape,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setBorderSize(double size)
Sets the border size,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setDrawRadius(boolean flag)
A boolean flag controls whether or not draw arc radius,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setDrawTick(boolean flag)
A flag that controls whether or not the tick is drawn,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setDrawTickLabel(boolean flag)
A flag that controls whether or not the tick label is drawn,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setStartTickAngle(double angle)
Sets the start angle for draw tick,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickLabelFont(java.awt.Font font)
Sets the font used to draw tick label,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickLabelFormat(java.text.NumberFormat format)
Sets the tick label format,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickLabelPaint(java.awt.Paint paint)
Sets the paint used to draw tick label,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickLabels(java.lang.Number[] labels)
Sets the array of tick labels,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickLength(double length)
Sets the tick length,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickPaint(java.awt.Paint paint)
Sets the paint used to draw ticks,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickSizeAngle(double size)
Sets the tick size (measured in degree),and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTickStroke(java.awt.Stroke stroke)
Sets the stroke used to draw ticks,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
translate(double tx,
double ty)
Concatenates the current Graphics2D Transform with a translation transform.and sends a ChartShapeChangeEvent 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_DRAW_RADIUS
public static final boolean DEFAULT_DRAW_TICK_LABEL
public static final boolean DEFAULT_DRAW_TICK
public static final double DEFAULT_TICK_LENGTH
public static final java.awt.Paint DEFAULT_TICK_PAINT
public static final java.awt.Stroke DEFAULT_TICK_STROKE
public static final java.awt.Font DEFAULT_TICK_LABEL_FONT
public static final java.awt.Paint DEFAULT_TICK_LABEL_PAINT
public static final double DEFAULT_BORDER_SIZE
public static final java.text.NumberFormat DEFAULT_TICK_LABEL_FORMAT
public static final java.awt.Paint DEFAULT_ARC_BORDER_PAINT
Constructor Detail |
---|
public MeterArcChartShape(java.awt.geom.Arc2D arc)
arc
- Arc2D
A arc shape (null not permitted).public MeterArcChartShape(java.awt.geom.Arc2D arc, double startTickAngle, double tickAngleSize, java.lang.Number[] tickLabels)
arc
- Arc2D
A arc shape (null not permitted).startTickAngle
- double
The start angle for draw tick (measured in degree).tickAngleSize
- double
The tick size (measured in degree).tickLabels
- Number[]
The array of tick labels (null permitted).Method Detail |
---|
public java.awt.geom.Arc2D getArc()
public void setArc(java.awt.geom.Arc2D arc)
ChartShapeChangeEvent
to all registered listeners.
arc
- Arc2D
The arc shape (null not permitted).public double getBorderSize()
public void setBorderSize(double size)
ChartShapeChangeEvent
to all registered listeners.
size
- double
The border size.public boolean isDrawRadius()
public void setDrawRadius(boolean flag)
ChartShapeChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public boolean isDrawTick()
public void setDrawTick(boolean flag)
ChartShapeChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public boolean isDrawTickLabel()
public void setDrawTickLabel(boolean flag)
ChartShapeChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public double getStartTickAngle()
public void setStartTickAngle(double angle)
ChartShapeChangeEvent
to all registered listeners.
angle
- double
The angle.public java.awt.Font getTickLabelFont()
public void setTickLabelFont(java.awt.Font font)
ChartShapeChangeEvent
to all registered listeners.
font
- Font
The font (null not permitted).public java.text.NumberFormat getTickLabelFormat()
public void setTickLabelFormat(java.text.NumberFormat format)
ChartShapeChangeEvent
to all registered listeners.
format
- NumberFormat
The number format object (null permitted).public java.awt.Paint getTickLabelPaint()
public void setTickLabelPaint(java.awt.Paint paint)
ChartShapeChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public java.lang.Number[] getTickLabels()
public void setTickLabels(java.lang.Number[] labels)
ChartShapeChangeEvent
to all registered listeners.
labels
- Number[]
The array of tick labels (null permitted).public double getTickLength()
public void setTickLength(double length)
ChartShapeChangeEvent
to all registered listeners.
length
- double
The tick length (must be greater than 0).public java.awt.Paint getTickPaint()
public void setTickPaint(java.awt.Paint paint)
ChartShapeChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public double getTickSizeAngle()
public void setTickSizeAngle(double size)
ChartShapeChangeEvent
to all registered listeners.
size
- double
The tick size (must be greater than 0).public java.awt.Stroke getTickStroke()
public void setTickStroke(java.awt.Stroke stroke)
ChartShapeChangeEvent
to all registered listeners.
stroke
- Stroke
The stroke (null not permitted).public java.util.Collection getTickLineShapes()
public java.util.Collection getTickLabelShapes()
public void draw(java.awt.Graphics2D g2)
draw
in interface IChartShape
g2
- Graphics2D
The graphics device (such as the screen or the printer) (null not permitted).protected void drawSelect(java.awt.Graphics2D g2)
drawSelect
in class AbstractChartShape
g2
- Graphics2D
The graphics device (such as the screen or the printer) (null not permitted).protected void calculateTransformedShape()
calculateTransformedShape
in class AbstractChartShape
public void translate(double tx, double ty)
ChartShapeChangeEvent
to all registered listeners.
Subsequent rendering is translated by the specified
distance relative to the previous position.
This is equivalent to calling transform(T), where T is an
AffineTransform represented by the following matrix:
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ].
translate
in interface IChartShape
tx
- double
The distance to translate along the x-axis.ty
- double
The distance to translate along the y-axis.public java.awt.geom.Point2D getTopLeftPoint()
getTopLeftPoint
in interface IChartShape
public java.awt.geom.Point2D getLockPoint()
getLockPoint
in interface IChartShape
getLockPoint
in class AbstractChartShape
protected java.awt.Shape getHotspotShape()
getHotspotShape
in class AbstractChartShape
public ShapeType getShapeType()
getShapeType
in interface IChartShape
ShapeType
.public int hashCode()
hashCode
in class AbstractChartShape
public boolean equals(java.lang.Object obj)
equals
in class AbstractChartShape
obj
-
the reference object with which to compare.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractChartShape
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |