|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IChartShape
Title: IJChart
Description: a chart library for the Java(tm) platform.
Described in the chart for the use of graphical interfaces, for a variety of graphic charts are seen as a separate graphic objectsCopyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_BORDER_PAINT
The default border Paint |
static java.awt.Stroke |
DEFAULT_BORDER_STROKE
The default border Stroke |
static java.awt.Paint |
DEFAULT_CONTENT_PAINT
The default content Paint |
static boolean |
DEFAULT_DRAW_BORDER
Default draw outline is false |
static float |
DEFAULT_FILL_ALPHA
Thedefault alpha value for fill background. |
static java.awt.Paint |
DEFAULT_FILL_PAINT
The default fill Paint |
static boolean |
DEFAULT_FILL_SHAPE
Default fill shape is true |
static GradientPaintTransformType |
DEFAULT_GRADIENT_PAINT_TRANSFORM_TYPE
The defeault GradientPaint transform type. |
static RectangleInsets |
DEFAULT_MARGIN
Default margin. |
static java.awt.Paint |
DEFAULT_SELECT_FILL_PAINT
The fill paint of selected area. |
static float |
DEFAULT_SELECT_RECT_ALPHA
The alpha value of selected area. |
static double |
DEFAULT_SELECT_RECT_WIDTH
The width of selected area. |
static boolean |
DEFAULT_SELECTED
The default value of shape selected. |
static java.awt.Font |
DEFAULT_TEXT_FONT
The default font. |
static double |
DEFAULT_TOOLTIP_SHAPE_WIDTH
The default tooltip shape width. |
static java.lang.String |
HOTSPOT_TYPE_CIRCLE
The circle shape of a hyperlink AREA in an image MAP. |
static java.lang.String |
HOTSPOT_TYPE_POLYGON
The polygon shape of a hyperlink AREA in an image MAP. |
static java.lang.String |
HOTSPOT_TYPE_RECTANGLE
The rectangle shape of a hyperlink AREA in an image MAP. |
Method Summary | |
---|---|
void |
addChangeListener(IChartShapeChangeListener listener)
Registers an object for notification of changes to the IChartShape |
boolean |
contains(double x,
double y)
Tests if a specified Point2D is inside the boundary of the ChartShape. |
boolean |
contains(java.awt.geom.Point2D point)
Tests if a specified Point2D is inside the boundary of the ChartShape. |
void |
draw(java.awt.Graphics2D g2)
Draw the ChartShape on a Java 2d graphics device(such as the screen or the printer). |
void |
forceChartShapeChanged()
If the data object of IChartShape changed and no event
triggered,set IChartShape changed by this method. |
java.awt.Paint |
getBorderPaint()
Get the ChartShape border Paint |
java.awt.Stroke |
getBorderStroke()
Get the ChartShape border Stroke |
java.awt.geom.Rectangle2D |
getBound()
Returns a Rectangle2D that completely encloses the Shape. |
IChartData |
getData()
Returns the IChartData object. |
float |
getFillAlpha()
Returns the alpha value for fill background. |
java.awt.Paint |
getFillPaint()
Get the ChartShape fill paint |
GradientPaintTransformType |
getGradientPaintTransformType()
Get the ChartShape GradientPaintTransformType type |
java.lang.String |
getHotspotPolyCoords(java.awt.Shape clipArea)
Returns a string containing the coordinates for a given shape.This string is intended for use in an image map. |
java.lang.String |
getHotspotType()
Returns the shape type of hotspot. |
int |
getId()
Returns the ID. |
java.awt.geom.Point2D |
getLockPoint()
Returns the lock coordinates of this shape. |
java.awt.Shape |
getOriginTooltipShape()
Returns the original tooltip shape. |
double |
getRotate()
Return the angle of rotation in radians. |
IShapeChange |
getShapeChange()
Returns the IShapeChange object. |
ChartShapeDrawType |
getShapeDrawType()
Returns the chart shape draw type. |
ShapeType |
getShapeType()
The type for describe this shape. |
java.awt.Shape |
getTooltipShape()
Returns the tooltip shape. |
java.lang.String |
getTooltipText()
Returns the tooltip text. |
java.awt.geom.Point2D |
getTopLeftPoint()
Returns the top left corner coordinates of this shape (not consider rotation). |
java.lang.String |
getURL()
Returns the URL text. |
boolean |
isDrawBorder()
A flag that controls whether or not the shape border is visible |
boolean |
isFillShape()
A flag that controls whether or not the shape is filled |
boolean |
isSelected()
Returns whether or not this shape is selected. |
boolean |
isVisible()
Returns whether or not the shape is visible. |
void |
removeAllChangeListener()
Deregisters all object for notification of changes to the IChartShape . |
void |
removeChangeListener(IChartShapeChangeListener listener)
Deregisters an object for notification of changes to the IChartShape . |
void |
setBorderPaint(java.awt.Paint paint)
Sets the shape border Paint |
void |
setBorderStroke(java.awt.Stroke stroke)
Sets the shape border Stroke |
void |
setData(IChartData data)
Sets the IChartData object. |
void |
setDrawBorder(boolean flag)
Sets a flag that controls whether or not the shape border is visible |
void |
setFillAlpha(float alpha)
The alpha value for fill background,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setFillPaint(java.awt.Paint paint)
Sets the shape fill Paint |
void |
setFillShape(boolean bFillShape)
Sets a flag that controls whether or not the shape is filled |
void |
setGradientPaintTransformType(GradientPaintTransformType transformType)
Sets the ChartShape GradientPaintTransformType type,use only when fill Paint is GradientPaint |
void |
setId(int shapeId)
Sets an ID for this shape,the shape ID is unique and continuous in a chart. |
void |
setOriginTooltipShape(java.awt.Shape shape)
Sets the original tooltip shape. |
void |
setRotate(double theta)
Sets a flag controls whether or not the shape is selected. |
void |
setShapeChange(IShapeChange change)
Sets the IShapeChange object. |
void |
setShapeDrawType(ChartShapeDrawType drawType)
Returns the chart shape draw type. |
void |
setTooltipText(java.lang.String tooltip)
Sets the tooltip text. |
void |
setURL(java.lang.String url)
Sets the URL text. |
void |
setVisible(boolean flag)
Sets whether or not the shape is visible. |
void |
translate(double tx,
double ty)
Concatenates the current Graphics2D Transform with a translation transform.and sends a ChartShapeChangeEvent to all registered listeners. |
Field Detail |
---|
static final boolean DEFAULT_DRAW_BORDER
static final boolean DEFAULT_FILL_SHAPE
static final float DEFAULT_FILL_ALPHA
static final java.awt.Paint DEFAULT_CONTENT_PAINT
static final java.awt.Paint DEFAULT_FILL_PAINT
static final java.awt.Paint DEFAULT_BORDER_PAINT
static final RectangleInsets DEFAULT_MARGIN
static final GradientPaintTransformType DEFAULT_GRADIENT_PAINT_TRANSFORM_TYPE
static final java.awt.Stroke DEFAULT_BORDER_STROKE
static final double DEFAULT_SELECT_RECT_WIDTH
static final float DEFAULT_SELECT_RECT_ALPHA
static final java.awt.Paint DEFAULT_SELECT_FILL_PAINT
static final java.awt.Font DEFAULT_TEXT_FONT
static final double DEFAULT_TOOLTIP_SHAPE_WIDTH
static final boolean DEFAULT_SELECTED
static final java.lang.String HOTSPOT_TYPE_CIRCLE
static final java.lang.String HOTSPOT_TYPE_POLYGON
static final java.lang.String HOTSPOT_TYPE_RECTANGLE
Method Detail |
---|
int getId()
void setId(int shapeId)
shapeId
- intboolean isDrawBorder()
void setDrawBorder(boolean flag)
flag
- boolean
true,draw the border of the shape;false otherwisejava.awt.Stroke getBorderStroke()
void setBorderStroke(java.awt.Stroke stroke)
stroke
- Stroke
The ChartShape border Stroke(null permitted).java.awt.Paint getBorderPaint()
void setBorderPaint(java.awt.Paint paint)
paint
- Paint
The ChartShape border Paint(null permitted).boolean isFillShape()
void setFillShape(boolean bFillShape)
bFillShape
- boolean
true,fill the shape;false otherwisejava.awt.Paint getFillPaint()
void setFillPaint(java.awt.Paint paint)
paint
- Paint
The ChartShape fill Paint(null not permitted).void setFillAlpha(float alpha)
ChartShapeChangeEvent
to all registered listeners.
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).float getFillAlpha()
GradientPaintTransformType getGradientPaintTransformType()
void setGradientPaintTransformType(GradientPaintTransformType transformType)
transformType
- GradientPaintTransformType (null permitted)java.lang.String getTooltipText()
void setTooltipText(java.lang.String tooltip)
tooltip
- String
The tooltip text (null permitted).java.lang.String getURL()
void setURL(java.lang.String url)
url
- String
The URL text (null permitted).void draw(java.awt.Graphics2D g2)
g2
- Graphics2D
The graphics device (such as the screen or the printer) (null not permitted).boolean contains(double x, double y)
x
- double
the x position.y
- double
the y position.
boolean contains(java.awt.geom.Point2D point)
point
- Point2D
The position,maybe a mouse point (null not permitted).
ShapeType getShapeType()
ShapeType
.double getRotate()
void setRotate(double theta)
[ cos(theta) -sin(theta) 0 ] [ sin(theta) cos(theta) 0 ] [ 0 0 1 ]Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
theta
-
the angle of rotation in radians.boolean isSelected()
void setSelected(boolean flag)
flag
- boolean
A boolean.java.awt.Shape getOriginTooltipShape()
void setOriginTooltipShape(java.awt.Shape shape)
shape
- Shape
A shape (null permitted).java.awt.Shape getTooltipShape()
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 ].
tx
- double
The distance to translate along the x-axis.ty
- double
The distance to translate along the y-axis.java.awt.geom.Point2D getTopLeftPoint()
java.awt.geom.Point2D getLockPoint()
IChartData getData()
void setData(IChartData data)
data
- IChartData
(null permitted).java.awt.geom.Rectangle2D getBound()
void addChangeListener(IChartShapeChangeListener listener)
IChartShape
listener
-
the object to register.void removeChangeListener(IChartShapeChangeListener listener)
IChartShape
.
listener
-
the object to deregister.void removeAllChangeListener()
IChartShape
.
void forceChartShapeChanged()
IChartShape
changed and no event
triggered,set IChartShape
changed by this method.
ChartShapeDrawType getShapeDrawType()
void setShapeDrawType(ChartShapeDrawType drawType)
drawType
- ChartShapeDrawType
(null not permitted).boolean isVisible()
void setVisible(boolean flag)
flag
- boolean
A boolean.void setShapeChange(IShapeChange change)
IShapeChange
object.
change
- IShapeChange
IShapeChange
object (null permitted).IShapeChange getShapeChange()
IShapeChange
object.
IShapeChange
object (maybe null).java.lang.String getHotspotType()
java.lang.String getHotspotPolyCoords(java.awt.Shape clipArea)
clipArea
- Shape
The clip area.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |