|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.imagero.swing.shape.ShapeUnit
ShapeUnit consists of Shape and drawing options - AffineTransform, Paint, Image and so on.
| Field Summary | |
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_CLICKED
|
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_DRAGGED
|
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_ENTERED
|
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_EXITED
|
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_MOVED
|
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_PRESSED
|
static com.imagero.swing.shape.ShapeUnit.EventKey |
MOUSE_RELEASED
|
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ShapeUnit(java.awt.Shape shape)
create new ShapeUnit with supplied Shape without AffineTransform |
|
ShapeUnit(java.awt.Shape shape,
java.awt.geom.AffineTransform transform)
create new ShapeUnit |
|
ShapeUnit(java.awt.Shape shape,
java.awt.geom.AffineTransform transform,
java.awt.Paint paint)
|
|
ShapeUnit(java.awt.Shape shape,
java.awt.Paint paint)
create new ShapeUnit |
|
| Method Summary | |
void |
addAction(com.imagero.swing.shape.ShapeUnit.EventKey eventKey,
javax.swing.Action a)
|
boolean |
contains(int x,
int y)
|
javax.swing.Action |
getAction(com.imagero.swing.shape.ShapeUnit.EventKey eventKey,
int index)
|
int |
getActionCount(com.imagero.swing.shape.ShapeUnit.EventKey eventKey)
|
float |
getAlpha()
|
java.awt.Rectangle |
getBounds()
get bounds of this ShapeUnit |
java.awt.Paint |
getFillPaint()
|
java.awt.Image |
getImage()
get Image |
java.awt.Point |
getImageLocation()
get location of top left Image corner |
java.awt.Point |
getImageLocation(java.awt.Point p)
get location of top left Image corner |
java.awt.Paint |
getOutlinePaint()
|
java.awt.Shape |
getShape()
|
java.awt.Stroke |
getStroke()
get stroke for shape outline drawing |
java.awt.geom.AffineTransform |
getTransform()
get AffineTransform |
java.awt.Shape |
getTransformedShape()
get Shape transformed with currently defined AffineTransform |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int w,
int h)
|
void |
invalidateShape()
|
boolean |
isDrawShapeOutline()
get current setting for drawShapeOutline option |
void |
paint(java.awt.Graphics2D g)
paint ShapeUnit into supplied Graphics |
void |
removeAction(javax.swing.Action a)
|
boolean |
removeAction(javax.swing.Action a,
com.imagero.swing.shape.ShapeUnit.EventKey eventKey)
|
void |
resetTransform()
reset current transform (set to default one - which was supplied in constructor or setted by setTransform) |
void |
setAlpha(float alpha)
|
void |
setDrawShapeOutline(boolean drawShapeOutline)
set drawShapeOutline option |
void |
setFillPaint(java.awt.Paint fillPaint)
|
void |
setImage(java.awt.Image image)
set Image used (instead of Paint) to fill current Shape |
void |
setImageLocation(int x,
int y)
set top left location of Image |
void |
setImageLocation(java.awt.Point location)
set top left location of Image |
void |
setOutlinePaint(java.awt.Paint drawPaint)
|
void |
setStroke(java.awt.Stroke stroke)
set Stroke for Shape outline drawing |
void |
setTransform(java.awt.geom.AffineTransform transform)
set current and default AffineTransform. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_CLICKED
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_ENTERED
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_EXITED
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_PRESSED
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_RELEASED
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_MOVED
public static final com.imagero.swing.shape.ShapeUnit.EventKey MOUSE_DRAGGED
| Constructor Detail |
public ShapeUnit(java.awt.Shape shape)
shape -
public ShapeUnit(java.awt.Shape shape,
java.awt.geom.AffineTransform transform)
shape - transform -
public ShapeUnit(java.awt.Shape shape,
java.awt.Paint paint)
shape - Shapepaint - Paint
public ShapeUnit(java.awt.Shape shape,
java.awt.geom.AffineTransform transform,
java.awt.Paint paint)
| Method Detail |
public void addAction(com.imagero.swing.shape.ShapeUnit.EventKey eventKey,
javax.swing.Action a)
public boolean removeAction(javax.swing.Action a,
com.imagero.swing.shape.ShapeUnit.EventKey eventKey)
public void removeAction(javax.swing.Action a)
public float getAlpha()
public void setAlpha(float alpha)
public int getActionCount(com.imagero.swing.shape.ShapeUnit.EventKey eventKey)
public javax.swing.Action getAction(com.imagero.swing.shape.ShapeUnit.EventKey eventKey,
int index)
public void invalidateShape()
public java.awt.Shape getTransformedShape()
public boolean contains(int x,
int y)
public java.awt.Shape getShape()
public java.awt.geom.AffineTransform getTransform()
public void setTransform(java.awt.geom.AffineTransform transform)
transform - new AffineTransformpublic void resetTransform()
public java.awt.Rectangle getBounds()
public java.awt.Image getImage()
public void setImage(java.awt.Image image)
image - Imagepublic void setImageLocation(java.awt.Point location)
location - Point
public void setImageLocation(int x,
int y)
public java.awt.Point getImageLocation()
public java.awt.Point getImageLocation(java.awt.Point p)
p - Point - if not null, then its x and y fields filled with actual values, otherwise new Point is created
public java.awt.Paint getFillPaint()
public void setFillPaint(java.awt.Paint fillPaint)
public java.awt.Paint getOutlinePaint()
public void setOutlinePaint(java.awt.Paint drawPaint)
public boolean isDrawShapeOutline()
public void setDrawShapeOutline(boolean drawShapeOutline)
drawShapeOutline - new valuepublic java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
stroke - new Strokepublic void paint(java.awt.Graphics2D g)
g - Graphics
public boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int w,
int h)
imageUpdate in interface java.awt.image.ImageObserver
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||