|
|||||||||
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.AbstractImageChartShape
com.ijchart.xychart.shape.RectangleImageChartShape
public class RectangleImageChartShape
Title: IJChart
Description: a chart library for the Java(tm) platform.
Draw an image in a rectangle.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static boolean |
DEFAULT_IMAGE_FILL_AREA
A default flag controls whether or not to fill the area by image. |
Fields inherited from class com.ijchart.xychart.shape.AbstractImageChartShape |
---|
DEFAULT_IMAGE_ALPHA, DEFAULT_IMAGE_HORIZONTAL_ALIGNMENT, DEFAULT_IMAGE_VERTICAL_ALIGNMENT |
Fields inherited from class com.ijchart.xychart.shape.AbstractChartShape |
---|
DEFAULT_DRAW_TYPE, DEFAULT_SHAPE_ID, DEFAULT_VISIBLE, transformedShape |
Constructor Summary | |
---|---|
RectangleImageChartShape(java.awt.geom.Rectangle2D drawArea,
java.awt.Image image)
Draw image in area drawArea. |
|
RectangleImageChartShape(java.awt.geom.Rectangle2D drawArea,
java.awt.Image image,
boolean drawBorder)
Draw image in area drawArea. |
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.Rectangle2D |
getDrawArea()
Returns the text draw area. |
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. |
protected java.awt.geom.Point2D |
getTooltipShapeTranslatePoint()
Returns the translate point of tooltip shape. |
java.awt.geom.Point2D |
getTopLeftPoint()
Returns the top left corner coordinates of this shape (not consider rotation). |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isImageFill()
Returns whether or not fill area by image. |
void |
setDrawArea(java.awt.geom.Rectangle2D drawArea)
Sets the text draw area. |
void |
setImageFill(boolean fill)
Sets whether or not fill area by image,and sends a ChartShapeChangeEvent to all
registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
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.AbstractImageChartShape |
---|
getImage, getImageAlpha, getImageHorizontalAlign, getImageVerticalAlign, isHorizontalRepeat, isVerticalRepeat, setHorizontalRepeat, setImage, setImageAlpha, setImageHorizontalAlign, setImageVerticalAlign, setVerticalRepeat |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_IMAGE_FILL_AREA
Constructor Detail |
---|
public RectangleImageChartShape(java.awt.geom.Rectangle2D drawArea, java.awt.Image image)
drawArea
- Rectangle2D
The draw area (null not permitted).image
- Image
The image (null permitted).public RectangleImageChartShape(java.awt.geom.Rectangle2D drawArea, java.awt.Image image, boolean drawBorder)
drawArea
- Rectangle2D
The draw area (null not permitted).image
- Image
The image (null permitted).drawBorder
-
A flag that controls whether or not the shape border is visible.Method Detail |
---|
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 void setDrawArea(java.awt.geom.Rectangle2D drawArea)
drawArea
- Rectangle2D
The text draw area (null not permitted).public java.awt.geom.Rectangle2D getDrawArea()
public boolean isImageFill()
public void setImageFill(boolean fill)
ChartShapeChangeEvent
to all
registered listeners.
fill
- boolean
Sets whether or not fill area by image.protected java.awt.geom.Point2D getTooltipShapeTranslatePoint()
getTooltipShapeTranslatePoint
in class AbstractChartShape
public boolean equals(java.lang.Object obj)
equals
in class AbstractImageChartShape
obj
-
the reference object with which to compare.
public int hashCode()
hashCode
in class AbstractImageChartShape
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractImageChartShape
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.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |