|
|||||||||
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.AbstractTextChartShape
com.ijchart.xychart.shape.AbstractRectangleTextChartShape
com.ijchart.xychart.shape.SectorChartShape
public class SectorChartShape
Title: IJChart
Description: a chart library for the Java(tm) platform.
Draw a sector shapeCopyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_ARC_BORDER_PAINT
The paint used to draw border. |
static double |
DEFAULT_DEPTH_3D
The default depth of 3D pie. |
static boolean |
DEFAULT_DRAW_RADIUS
A default boolean flag controls whether or not draw arc radius. |
static java.awt.Paint |
DEFAULT_LABEL_BACKGROUND_PAINT
The default section label background paint. |
static java.awt.Paint |
DEFAULT_LABEL_OUTLINE_PAINT
The default section label outline paint. |
static java.awt.Stroke |
DEFAULT_LABEL_OUTLINE_STROKE
The default section label outline stroke. |
static RectangleInsets |
DEFAULT_LABEL_PADDING
The default padding between the labels and the label outlines. |
static java.awt.Paint |
DEFAULT_LABEL_SHADOW_PAINT
The default section label shadow paint. |
static double |
DEFAULT_LABEL_SHADOW_X_OFFSET
The default x-offset for the label shadow effect. |
static double |
DEFAULT_LABEL_SHADOW_Y_OFFSET
The default y-offset for the label shadow effect. |
static boolean |
DEFAULT_SECTOR_IS_3D
A default flag that controls whether or not the sector is 3D. |
static java.awt.Paint |
DEFAULT_SECTOR_SHADOW_PAINT
The default paint used to draw sector shadow. |
static double |
DEFAULT_SECTOR_SHADOW_X_OFFSET
The default x-offset for the sector shadow effect. |
static double |
DEFAULT_SECTOR_SHADOW_Y_OFFSET
The default y-offset for the sector shadow effect. |
Fields inherited from class com.ijchart.xychart.shape.AbstractRectangleTextChartShape |
---|
DEFAULT_DRAW_AUTO_WRAP, DEFAULT_FORCE_INSIDE_TEXT_NO_WRAP, DEFAULT_FORCE_SHOW_ALL, DEFAULT_TEXT_MAX_SHOW_LINE |
Fields inherited from class com.ijchart.xychart.shape.AbstractTextChartShape |
---|
DEFAULT_TEXT_DIRECTION, DEFAULT_TEXT_HORIZONTAL_ALIGNMENT, DEFAULT_TEXT_POSITION, DEFAULT_TEXT_VERTICAL_ALIGNMENT |
Fields inherited from class com.ijchart.xychart.shape.AbstractChartShape |
---|
DEFAULT_DRAW_TYPE, DEFAULT_SHAPE_ID, DEFAULT_VISIBLE, transformedShape |
Constructor Summary | |
---|---|
SectorChartShape(java.awt.geom.Arc2D arc,
java.awt.geom.Rectangle2D drawArea,
java.lang.String text)
A constructor. |
|
SectorChartShape(java.awt.geom.Arc2D arc,
java.awt.geom.Rectangle2D drawArea,
java.lang.String text,
boolean sector3D)
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 |
getDepth3D()
Returns the depth of 3D pie. |
protected java.awt.Shape |
getHotspotShape()
Returns the hotspot shape. |
java.awt.Paint |
getLabelBackgroundPaint()
Returns the color used to draw the background of the section labels. |
java.awt.Paint |
getLabelOutlinePaint()
Returns the paint used to draw the outline of the section labels. |
java.awt.Stroke |
getLabelOutlineStroke()
Returns the stroke used to draw the outline of the section labels. |
RectangleInsets |
getLabelPadding()
Returns the padding between the labels and the label outlines. |
java.awt.Paint |
getLabelShadowPaint()
Returns the paint used to draw sector shadow. |
double |
getLabelShadowXOffset()
Returns the x-offset for the label shadow effect. |
double |
getLabelShadowYOffset()
Returns the y-offset for the label shadow effect. |
java.awt.geom.Point2D |
getLockPoint()
Returns the lock coordinates of this shape. |
protected java.awt.geom.Point2D[] |
getPointsOfArc(java.awt.geom.Arc2D arc)
Returns the points of arc:center,left,right. |
java.awt.Paint |
getSectorShadowPaint()
Returns the paint used to draw the shadow for the section labels. |
double |
getSectorShadowXOffset()
Returns the x-offset for the sector shadow effect. |
double |
getSectorShadowYOffset()
Returns the y-offset for the sector shadow effect. |
ShapeType |
getShapeType()
The type for describe this shape. |
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 |
isSector3D()
Returns the flag that controls whether or not the sector is 3D. |
void |
setArc(java.awt.geom.Arc2D arc)
Sets the arc shape,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setDepth3D(double depth3D)
Sets the depth of 3D pie 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 |
setLabelBackgroundPaint(java.awt.Paint paint)
Sets the color used to draw the background of the section labels and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setLabelOutlinePaint(java.awt.Paint paint)
Sets the paint used to draw the outline of the section labels and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setLabelOutlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the outline of the section labels and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setLabelPadding(RectangleInsets padding)
Sets the padding between the labels and the label outlines and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setLabelShadowPaint(java.awt.Paint paint)
Sets the paint used to draw sector shadow and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setLabelShadowXOffset(double offset)
Sets the x-offset for the label shadow effect and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setLabelShadowYOffset(double offset)
Sets the y-offset for the label shadow effect and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setSector3D(boolean flag)
Sets the flag that controls whether or not the sector is 3D and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setSectorShadowPaint(java.awt.Paint paint)
Sets the paint used to draw the shadow for the section labels and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setSectorShadowXOffset(double offset)
Sets the x-offset for the sector shadow effect and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setSectorShadowYOffset(double offset)
Sets the y-offset for the sector shadow effect 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 com.ijchart.xychart.shape.AbstractRectangleTextChartShape |
---|
drawText, drawTextWithTrimMarginRect, getDrawArea, getTextMaxShowLine, getTooltipShapeTranslatePoint, isAutoWrap, isForceInsideTextNoWrap, isForceShowAll, setAutoWrap, setDrawArea, setForceInsideTextNoWrap, setForceShowAllText, setTextMaxShowLine, splitString, toString |
Methods inherited from class com.ijchart.xychart.shape.AbstractTextChartShape |
---|
getText, getTextDirection, getTextFont, getTextHorizontalAlign, getTextPaint, getTextPosition, getTextVerticalAlign, isDrawText, setDrawText, setText, setTextDirection, setTextFont, setTextHorizontalAlign, setTextPaint, setTextPosition, setTextVerticalAlign |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_DRAW_RADIUS
public static final java.awt.Paint DEFAULT_ARC_BORDER_PAINT
public static final java.awt.Paint DEFAULT_LABEL_BACKGROUND_PAINT
public static final java.awt.Paint DEFAULT_LABEL_OUTLINE_PAINT
public static final java.awt.Stroke DEFAULT_LABEL_OUTLINE_STROKE
public static final java.awt.Paint DEFAULT_LABEL_SHADOW_PAINT
public static final RectangleInsets DEFAULT_LABEL_PADDING
public static final double DEFAULT_LABEL_SHADOW_X_OFFSET
public static final double DEFAULT_LABEL_SHADOW_Y_OFFSET
public static final java.awt.Paint DEFAULT_SECTOR_SHADOW_PAINT
public static final double DEFAULT_SECTOR_SHADOW_X_OFFSET
public static final double DEFAULT_SECTOR_SHADOW_Y_OFFSET
public static final boolean DEFAULT_SECTOR_IS_3D
public static final double DEFAULT_DEPTH_3D
Constructor Detail |
---|
public SectorChartShape(java.awt.geom.Arc2D arc, java.awt.geom.Rectangle2D drawArea, java.lang.String text)
arc
- Arc2D
A arc shape (null not permitted).drawArea
- Rectangle2D
The draw area (null not permitted).text
- String
The text (null permitted).public SectorChartShape(java.awt.geom.Arc2D arc, java.awt.geom.Rectangle2D drawArea, java.lang.String text, boolean sector3D)
arc
- Arc2D
A arc shape (null not permitted).drawArea
- Rectangle2D
The draw area (null not permitted).text
- String
The text (null permitted).sector3D
- boolean
A flag that controls whether or not the sector is 3D.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 boolean isDrawRadius()
public void setDrawRadius(boolean flag)
ChartShapeChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public java.awt.Paint getLabelBackgroundPaint()
public void setLabelBackgroundPaint(java.awt.Paint paint)
ChartShapeChangeEvent
to all registered listeners.
paint
- Paint
The paint (null permitted).public java.awt.Paint getLabelOutlinePaint()
public void setLabelOutlinePaint(java.awt.Paint paint)
ChartShapeChangeEvent
to all registered listeners.
paint
- Paint
The paint (null permitted).public java.awt.Stroke getLabelOutlineStroke()
public void setLabelOutlineStroke(java.awt.Stroke stroke)
ChartShapeChangeEvent
to all registered listeners.
stroke
- Stroke
The stroke (null permitted).public java.awt.Paint getLabelShadowPaint()
public void setLabelShadowPaint(java.awt.Paint paint)
ChartShapeChangeEvent
to all registered listeners.
paint
- Paint
The paint (null permitted).public RectangleInsets getLabelPadding()
public void setLabelPadding(RectangleInsets padding)
ChartShapeChangeEvent
to all registered listeners.
padding
- RectangleInsets
The padding (null not permitted).public double getLabelShadowXOffset()
public void setLabelShadowXOffset(double offset)
ChartShapeChangeEvent
to all registered listeners.
offset
- double
The x-offset.public double getLabelShadowYOffset()
public void setLabelShadowYOffset(double offset)
ChartShapeChangeEvent
to all registered listeners.
offset
- double
The y-offset.public java.awt.Paint getSectorShadowPaint()
public void setSectorShadowPaint(java.awt.Paint paint)
ChartShapeChangeEvent
to all registered listeners.
paint
- Paintpublic double getSectorShadowXOffset()
public void setSectorShadowXOffset(double offset)
ChartShapeChangeEvent
to all registered listeners.
offset
- double
The x-offset.public double getSectorShadowYOffset()
public void setSectorShadowYOffset(double offset)
ChartShapeChangeEvent
to all registered listeners.
offset
- double
The y-offset.public boolean isSector3D()
public void setSector3D(boolean flag)
ChartShapeChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public double getDepth3D()
public void setDepth3D(double depth3D)
ChartShapeChangeEvent
to all registered listeners.
depth3D
- double
The depth.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).public java.awt.geom.Point2D getLockPoint()
getLockPoint
in interface IChartShape
getLockPoint
in class AbstractRectangleTextChartShape
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
translate
in class AbstractRectangleTextChartShape
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
getTopLeftPoint
in class AbstractRectangleTextChartShape
protected java.awt.Shape getHotspotShape()
getHotspotShape
in class AbstractChartShape
public ShapeType getShapeType()
getShapeType
in interface IChartShape
ShapeType
.protected java.awt.geom.Point2D[] getPointsOfArc(java.awt.geom.Arc2D arc)
arc
- Arc2D
public int hashCode()
hashCode
in class AbstractRectangleTextChartShape
public boolean equals(java.lang.Object obj)
equals
in class AbstractRectangleTextChartShape
obj
-
the reference object with which to compare.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractRectangleTextChartShape
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 |