public class CShape extends java.lang.Object implements java.lang.Cloneable, CElement, GraphicalShape
Canvas
. The shape is defined by a
geometry and some grahical attributes, and it can have
tags. A shape can be marked as drawable or not, and pickable or not.
When a shape is not drawable, it is not displayed by the enclosing canvas.
When a shape is not pickable, it is ignored by the enclosing canvas for pick
operations.
The geometry of a shape is defined by an arbitrary Java2D
Shape
. Subclasses of CShape
define specific
geometries, namely rectangle, ellipse, polyline, text, and image. The
geometry of a shape is transformed by an affine transformation that
combines a scale, a rotation and a translation. The default transformation is
the identity. The rotation, scale and translateTo operations occur around the
shape's reference point, which by default is at the center of the
shape's bounding box. The reference point can be changed. It is defined
relatively to the shape's bounding box, i.e (0, 0) means the top left corner
of the shape, (1,1) the bottom right corner, (0.5, 0.5) the center, etc.
By default, the geometry of the shape is relative to the enclosing canvas's coordinate system. However a shape can have a parent, which is another shape in the canvas. In this case the shape's transform is a composition of the transform of its parent and its own transform. This means that changing the transform of the parent shape will affect its children. A shape can be the parent of an arbitrary number of shapes, and can itself have a parent.
The last element that affects the shape's geometry is the clipping shape. A shape can be clipped by another shape of the canvas. The clipped shape is only visible within the interior of the clipping shape.
The graphical attributes of a shape consists of a fill paint, an
outline paint and a stroke style. The fill paint is used if the shape is
filled to paint the interior of the shape. The outline paint and stroke style
are used if the shape is outlined to paint the border of the shape. Paints
and stroke styles can be any Java2D objects that implement the
Paint
and Stroke
interfaces respectively.
Graphical attributes affect picking. For example, if a shape is not filled,
only the border stroke is taken into account for picking.
Tags can be attached to a shape. See Tag
for details.
It is important to remember that tags cannot be added to a shape until the
shape is added to a canvas. This is because each canvas manages its own set
of tags.
Constructor and Description |
---|
CShape()
Builds an empty
CShape . |
CShape(java.awt.Shape s)
Builds a
CShape from a Java2D shape. |
Modifier and Type | Method and Description |
---|---|
CElement |
above(CElement before)
Moves this shape in the canvas's display list so that it is right above a
the top most shape contained in a given CElement.
|
CElement |
aboveAll()
Moves this shape in the canvas's display list so that it is above all
other shapes.
|
CShape |
addChild(CShape c)
Adds a child to this shape.
|
void |
addGhost()
Builds the 'ghost' of this shape.
|
CElement |
addTag(CExtensionalTag t)
Adds a tag to this shape.
|
CElement |
addTag(CTag t)
Adds a tag to this shape only if the tag is a
CExtensionalTag , does anything otherwise. |
CElement |
addTag(java.lang.String t)
Adds a
CNamedTag tag to this shape. |
CShape |
addTo(Canvas c)
Adds this shape to a canvas.
|
CElement |
animate(Animation anim)
Associates an animation to this shape.
|
CEllipse |
asEllipse() |
CImage |
asImage() |
CPolyLine |
asPolyLine() |
CRectangle |
asRectangle() |
CRectangularShape |
asRectangularShape() |
CText |
asText() |
void |
attachSM(CStateMachine sm,
boolean reset)
Attaches a state machine to this
CElement to describe its behavior. |
CElement |
below(CElement after)
Moves this shape in the canvas's display list so that it is right below a
the top least shape contained in a given CElement.
|
CElement |
belowAll()
Moves this shape in the canvas's display list so that it is below all
other shapes.
|
java.awt.geom.Point2D |
canvasToShape(java.awt.geom.Point2D p)
Converts a point relative to the canvas into a point relative to a shape
(the origin of the coordinate system becomes the left upper point of this shape).
|
java.awt.geom.Point2D |
canvasToShapeRef(java.awt.geom.Point2D p)
Converts a point relative to the canvas into a point relative to the bounding box of a shape shape
(the origin of the coordinate system becomes the left upper point of this shape, a unit has the size of the bounding box of this shape).
|
java.lang.Object |
clone() |
CShape |
contains(double x,
double y)
Tests whether a point (x, y) is inside this shape.
|
CShape |
contains(double x,
double y,
double w,
double h)
Tests whether a rectangle R is inside this shape.
|
CShape |
contains(java.awt.geom.Point2D p)
Tests whether a point p is inside this shape (ignores clipping shape).
|
CShape |
contains(java.awt.Rectangle r)
Tests whether a rectangle R is inside this shape.
|
CShape |
copyTo(CShape sms)
Copies this shape into a destination shape.
|
void |
detachSM(CStateMachine sm)
Detaches a state machine from this
CElement . |
CShape |
duplicate()
Creates a new copy of this shape and returns it.
|
CShape |
duplicateWithTags()
Creates a new copy of this shape and returns it.
|
CShape |
firstShape()
Returns the first shape contained in this
CElement . |
CElement |
fixReferenceShapeToCurrent()
This method can be useful before changing the parent of a shape while keeping
its transformation that can be inherited from its current parent.
|
java.awt.Shape |
getAbsShape() |
java.awt.geom.AffineTransform |
getAbsTransform()
Returns the absolute affine transformation that is applied to the shape.
|
java.util.LinkedList<CShape> |
getAntialiasedShapes()
Returns the list of CShape that have this tag and that are antialiased.
|
CRectangle |
getBoundingBox() |
Canvas |
getCanvas()
Return the canvas this shape belongs to, if any.
|
double |
getCenterX() |
double |
getCenterY() |
CShape |
getChild(int i)
Returns the ith child of this shape.
|
java.util.LinkedList<CShape> |
getChildren()
Returns the children of this shape as a linked list.
|
int |
getChildrenCount()
Counts the number of children of this shape.
|
CShape |
getClip()
Returns the shape that clips this shape, if any.
|
java.util.LinkedList<CShape> |
getFilledShapes()
Returns the list of CShape that have this tag and that are filled.
|
java.awt.Paint |
getFillPaint() |
CShape |
getFirstAntialiasedShape()
Returns the first antialiased CShape contained in this
CElement . |
CShape |
getFirstFilledShape()
Returns the first CShape contained in this
CElement and that is filled. |
CShape |
getFirstHavingTag(CTag t)
Returns the topmost CShape that has tag t.
|
CShape |
getFirstOutlinedShape()
Returns the first CShape contained in this
CElement and that is outlined. |
CShape |
getGhost()
Builds the 'ghost' of this shape if it does not already exists.
|
double |
getHeight() |
CHierarchyTag |
getHierarchy()
Returns the hierarchy of this shape.
|
CPolyLine |
getIntersection(CShape s)
Computes the shape corresponding to the intersection of this shape with
another given shape.
|
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
java.util.LinkedList<CShape> |
getOutlinedShapes()
Returns the list of CShape that have this tag and that are outlined.
|
java.awt.Paint |
getOutlinePaint()
Returns the outline Paint, which is used to display the boundary of the
shape when it is outlined.
|
CShape |
getParent()
Returns the parent of this shape, if any.
|
double |
getReferenceX()
Returns the x coordinate of this shape's reference point.
|
double |
getReferenceY()
Returns the y coordinate of this shape's reference point.
|
java.lang.Object |
getRenderingHint(java.awt.RenderingHints.Key hintKey)
Returns the rendering attribute of this
CShape given a
hint key. |
double |
getRotation()
Returns this shape's rotation angle.
|
double |
getScaleX()
Returns the x scale value.
|
double |
getScaleY()
Returns the y scale value.
|
java.awt.Shape |
getShape()
Returns the Java2D shape of reference, i.e.
|
java.awt.Stroke |
getStroke()
Returns the stroke style, which specifies the shape of the boundary of
the shape when it is outlined (thickness, dash pattern, etc.).
|
CPolyLine |
getSubtraction(CShape s)
Computes the shape corresponding to the subtraction of this shape by
another given shape.
|
java.util.LinkedList<CExtensionalTag> |
getTags() |
java.awt.geom.AffineTransform |
getTransform()
Returns the affine transformation that is applied to the shape.
|
double |
getTranslateX()
Returns the x coordinate of this shape.
|
double |
getTranslateY()
Returns the y coordinate of this shape.
|
java.awt.AlphaComposite |
getTransparencyFill() |
java.awt.AlphaComposite |
getTransparencyOutline() |
double |
getWidth() |
boolean |
hasTag(CTag t)
Tests whether this shape has a given tag.
|
boolean |
hasTag(java.lang.String t)
Tests whether this shape has a given
CNamedTag tag. |
int |
indexOf(CShape child)
Returns the index of
child . |
CShape |
intersects(CShape s)
Tests whether a
CShape s intersects this shape. |
boolean |
isAbove(CShape before)
Tests if this shape is above another shape in the display list.
|
boolean |
isAntialiased()
Returns true if this shape is antialiased.
|
boolean |
isBelow(CShape after)
Tests if this shape is before another shape in the display list.
|
boolean |
isDrawable()
Returns true if this shape is to be displayed.
|
boolean |
isFilled()
Returns true if this shape is filled.
|
CShape |
isOnOutline(java.awt.geom.Point2D p)
Tests whether a point p is on this shape's outline.
|
boolean |
isOutlined()
Returns true if every shape contained in this
CElement is outlined. |
boolean |
isPickable()
Returns true if the shape can be picked.
|
boolean |
isPicked(java.awt.geom.Point2D location) |
void |
paint(java.awt.Graphics g)
Paints the shape.
|
CShape |
pick(java.awt.geom.Point2D p,
int tolerance)
Tests whether a point p is inside this shape.
|
CElement |
pickStyle(CShape picked)
Copies style attributes of a given CShape on this CShape.
|
CShape |
remove()
Removes this shape from its canvas.
|
java.util.LinkedList<CShape> |
removeAllChildren()
Removes all the children of this shape and returns them.
|
CShape |
removeChild(CShape s)
Removes a child from this shape.
|
CShape |
removeChild(int i)
Removes the ith child of this shape and returns it.
|
void |
removeGhost()
Removes the 'ghost' of this shape from the canvas.
|
CElement |
removeTag(CExtensionalTag t)
Removes a tag from this shape only if the tag is a
CExtensionalTag . |
CElement |
removeTag(java.lang.String t)
Removes a tag from this shape.
|
CElement |
rotateBy(double dt)
Rotates this shape by dt.
|
CElement |
rotateTo(double t)
Rotates this shape to angle t.
|
CElement |
scaleBy(double ds)
Scales this shape by s horizontally and vertically.
|
CElement |
scaleBy(double x,
double y)
Scales this shape by x horizontally and y vertically.
|
CElement |
scaleTo(double s)
Sets this shape's scale to s horizontally and vertically.
|
CElement |
scaleTo(double x,
double y)
Sets the scale of this shape to x horizontally and y vertically.
|
CElement |
setAntialiased(boolean a)
Specifies whether this shape is antialiased.
|
CElement |
setClip(CShape clip)
Sets the clipping shape of this shape.
|
CElement |
setDrawable(boolean d)
Specifies whether this shape is to be displayed.
|
CElement |
setFilled(boolean isFilled)
Sets the filled property of this shape.
|
CElement |
setFillPaint(java.awt.Paint fp)
Sets the fill Paint, which is used to display the interior of the shape
when it is filled.
|
CElement |
setOutlined(boolean o)
Sets the outlined property of this shape.
|
CElement |
setOutlinePaint(java.awt.Paint op)
Sets the outline Paint, which is used to display the boundary of the
shape when it is outlined.
|
CElement |
setParent(CShape p)
Sets the parent of this shape (only if the parent and this ahape are in
the same canvas).
|
CElement |
setPickable(boolean pick)
Specifies whether this shape can be picked.
|
CElement |
setReferencePoint(double x,
double y)
Set this shape's reference point.
|
CElement |
setReferencePoint(java.awt.geom.Point2D ptRef)
Set this shape's reference point.
|
CElement |
setRenderingHint(java.awt.RenderingHints.Key hintKey,
java.lang.Object hintValue)
Defines the rendering attributes of this
CShape . |
CElement |
setShape(java.awt.Shape s)
Sets the shape.
|
CElement |
setStroke(java.awt.Stroke str)
Sets the stroke style, which specifies the shape of the boundary of the
shape when it is outlined (thickness, dash pattern, etc.).
|
CElement |
setTransformToIdentity()
Sets the transformation of this shape to identity.
|
CElement |
setTransparencyFill(java.awt.AlphaComposite transparencyFill)
Sets the
transparencyFill of this shape, which applies to
the interior. |
CElement |
setTransparencyFill(float alpha)
Sets the
transparencyFill of this shape, which applies to
the interior. |
CElement |
setTransparencyOutline(java.awt.AlphaComposite transparencyOutline)
Sets the
transparencyOutline of this shape, which applies
to the boundary. |
CElement |
setTransparencyOutline(float transparencyOutline)
Sets the
transparencyOutline of this shape, which applies
to the boundary. |
java.awt.geom.Point2D |
shapeToCanvas(java.awt.geom.Point2D p)
Converts a point relative to the shape into a point relative to the
canvas.
|
CElement |
translateBy(double dx,
double dy)
Translates this shape by dx, dy.
|
CElement |
translateTo(double x,
double y)
Translates this shape to x, y (the point of reference of this shape will
be exactly at (x, y)).
|
public CShape()
CShape
.public CShape(java.awt.Shape s)
CShape
from a Java2D shape.s
- The java2D shapepublic Canvas getCanvas()
public java.awt.Shape getShape()
public CElement setShape(java.awt.Shape s)
setShape
in interface CElement
s
- The new Java2D shape.setShape(java.awt.Shape)
public CShape addTo(Canvas c)
c
- The canvas.public CShape remove()
public void paint(java.awt.Graphics g)
g
- The graphics with which the shape must be painted.public boolean isDrawable()
isDrawable
in interface CElement
isDrawable()
public CElement setDrawable(boolean d)
setDrawable
in interface CElement
d
- True if the shape is to be displayed, false otherwise.setDrawable(boolean)
public CElement pickStyle(CShape picked)
picked
- The CShape
on which the style attributes must be picked.public CElement setTransparencyFill(java.awt.AlphaComposite transparencyFill)
transparencyFill
of this shape, which applies to
the interior.setTransparencyFill
in interface CElement
transparencyFill
- The AlphaComposite
transparency mode.setTransparencyFill(AlphaComposite)
public CElement setTransparencyOutline(java.awt.AlphaComposite transparencyOutline)
transparencyOutline
of this shape, which applies
to the boundary.setTransparencyOutline
in interface CElement
transparencyOutline
- The AlphaComposite
transparency mode.setTransparencyOutline(AlphaComposite)
public CElement setTransparencyFill(float alpha)
transparencyFill
of this shape, which applies to
the interior. The transparency composition mode is
AlphaComposite.SRC_OVER
, use the
setTransparencyFill(AlphaComposite)
.setTransparencyFill
in interface CElement
alpha
- The transparencyFill level (0.0 = transparent, 1.0 = opaque).setTransparencyFill(AlphaComposite)
public CElement setTransparencyOutline(float transparencyOutline)
transparencyOutline
of this shape, which applies
to the boundary. The transparency composition mode is
AlphaComposite.SRC_OVER
, use the
setTransparencyOutline(AlphaComposite)
.setTransparencyOutline
in interface CElement
transparencyOutline
- The transparencyOutline
level (0.0 =
transparent, 1.0 = opaque).setTransparencyOutline(AlphaComposite)
public boolean isFilled()
isFilled
in interface CElement
isFilled()
public CElement setFilled(boolean isFilled)
setFilled
in interface CElement
isFilled
- True if the shape is filled.setFilled(boolean)
public java.awt.Paint getFillPaint()
public java.awt.AlphaComposite getTransparencyFill()
AlphaComposite
used to render the interior of
this shape.public java.awt.AlphaComposite getTransparencyOutline()
AlphaComposite
used to fill
this shape.public CElement setFillPaint(java.awt.Paint fp)
setFillPaint
in interface CElement
fp
- The fill Paint.setFillPaint(Paint)
public boolean isOutlined()
CElement
CElement
is outlined.isOutlined
in interface CElement
isOutlined()
public CElement setOutlined(boolean o)
setOutlined
in interface CElement
o
- True if the shape is outlined.setOutlined(boolean)
public java.awt.Stroke getStroke()
public CElement setStroke(java.awt.Stroke str)
setStroke
in interface CElement
str
- The stroke style.setStroke(java.awt.Stroke)
public java.awt.Paint getOutlinePaint()
public CElement setOutlinePaint(java.awt.Paint op)
setOutlinePaint
in interface CElement
op
- The outline Paint.setOutlinePaint(Paint)
public CShape getClip()
public CElement setClip(CShape clip)
setClip
in interface CElement
clip
- The clipping shape, or null to reset clipping of this shape.setClip(CShape)
public boolean isAntialiased()
isAntialiased
in interface CElement
isAntialiased()
public CElement setAntialiased(boolean a)
setAntialiased
in interface CElement
a
- True if this shape is to be antialiased.setAntialiased(boolean)
public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key hintKey)
CShape
given a
hint key. See java.awt.RenderingHints
for available hint
keys and hint values.hintKey
- The hint keypublic CElement setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
CShape
. See
java.awt.RenderingHints
for available hint keys and hint
values.setRenderingHint
in interface CElement
hintKey
- The hint keyhintValue
- The hint valueCShape
.public CHierarchyTag getHierarchy()
public CShape getParent()
public java.util.LinkedList<CShape> getChildren()
public int getChildrenCount()
public CShape getChild(int i)
i
- The indexpublic int indexOf(CShape child)
child
.child
- The child to find.child
, -1 if not found.public CShape removeChild(int i)
i
- The index of the child to remove.public java.util.LinkedList<CShape> removeAllChildren()
public CElement setParent(CShape p)
setParent
in interface CElement
p
- The new parent, or null if the shape is to have no parent.setParent(CShape)
public CShape addChild(CShape c)
c
- The child shapepublic CShape removeChild(CShape s)
s
- The child shape to removeImpossibleOperationOnDifferentCanvasException
ImpossibleOperationOnDifferentCanvasException
public CElement setTransformToIdentity()
setTransformToIdentity
in interface CElement
setTransformToIdentity()
public java.awt.geom.AffineTransform getTransform()
getAbsTransform()
public java.awt.geom.AffineTransform getAbsTransform()
public double getReferenceX()
public double getReferenceY()
public CElement setReferencePoint(double x, double y)
setReferencePoint
in interface CElement
x
- The x coordinate of the new reference point.y
- The y coordinate of the new reference point.setReferencePoint(double, double)
public CElement setReferencePoint(java.awt.geom.Point2D ptRef)
ptRef
- The new reference point.public CElement translateBy(double dx, double dy)
translateBy
in interface CElement
dx
- The x offsetdy
- The y offsettranslateBy(double, double)
public CElement translateTo(double x, double y)
translateTo
in interface CElement
x
- The x coordinatey
- The y coordinatetranslateTo(double, double)
public double getTranslateX()
public double getTranslateY()
public CElement rotateBy(double dt)
rotateBy
in interface CElement
dt
- The angle offsetrotateBy(double)
public CElement rotateTo(double t)
rotateTo
in interface CElement
t
- The anglerotateTo(double)
public double getRotation()
public CElement scaleBy(double x, double y)
scaleBy
in interface CElement
x
- The x scale factory
- The y scale factorscaleBy(double, double)
public CElement scaleTo(double x, double y)
scaleTo
in interface CElement
x
- The x scaley
- The y scalescaleTo(double, double)
public CElement scaleBy(double ds)
scaleBy
in interface CElement
ds
- The scale factorscaleBy(double)
public CElement scaleTo(double s)
scaleTo
in interface CElement
s
- The scale valuescaleTo(double)
public double getScaleX()
public double getScaleY()
public java.awt.geom.Point2D shapeToCanvas(java.awt.geom.Point2D p)
p
- -
The point to be convertedpublic java.awt.geom.Point2D canvasToShape(java.awt.geom.Point2D p)
p
- The point to be convertedpublic java.awt.geom.Point2D canvasToShapeRef(java.awt.geom.Point2D p)
p
- The point to be convertedpublic CRectangle getBoundingBox()
getBoundingBox
in interface CElement
public double getHeight()
public double getWidth()
public double getMinX()
public double getMinY()
public double getMaxX()
public double getMaxY()
public double getCenterX()
getCenterX
in interface CElement
public double getCenterY()
getCenterY
in interface CElement
public boolean isPickable()
pick, pickAll
)
and by the state machines.isPickable
in interface CElement
isPickable()
public CElement setPickable(boolean pick)
pick, pickAll
)
and by the state machines.setPickable
in interface CElement
pick
- True if this shape can be picked, false otherwise.setOutlined(boolean)
public CShape contains(double x, double y)
public CShape contains(java.awt.geom.Point2D p)
public CShape pick(java.awt.geom.Point2D p, int tolerance)
p
- The pointShape.contains(Point2D)
public CShape contains(double x, double y, double w, double h)
contains
in interface CElement
x
- The x coordinate of the upper left corner of Ry
- The y coordinate of the upper left corner of Rw
- The width of Rh
- The height of RShape.contains(double, double, double, double)
public CShape contains(java.awt.Rectangle r)
public CShape isOnOutline(java.awt.geom.Point2D p)
isOnOutline
in interface CElement
p
- The pointisOnOutline(Point2D)
public CShape intersects(CShape s)
CShape
s intersects this shape.intersects
in interface CElement
s
- The shapeintersects(CShape)
public java.awt.Shape getAbsShape()
public CElement fixReferenceShapeToCurrent()
fixReferenceShapeToCurrent
in interface CElement
public CPolyLine getIntersection(CShape s)
getIntersection
in interface CElement
s
- The shapeCPolyLine
if s intersects
it, null otherwise.getIntersection(CShape)
public CPolyLine getSubtraction(CShape s)
s
- The shapeCPolyLine
if s
intersects it, null otherwise.public boolean isAbove(CShape before)
before
- The shape.before
(false if this shape or the the shape before
are
not attached to a canvas).public CElement above(CElement before)
above
in interface CElement
before
- The element that must be right below this shape in the display
listbelow(CElement)
public CElement aboveAll()
aboveAll
in interface CElement
aboveAll()
public boolean isBelow(CShape after)
after
- The shape.after
(false if this shape or the the shape after
are
not attached to a canvas).public CElement below(CElement after)
below
in interface CElement
after
- The element that must be right above this shape in the display
listbelow(CElement)
public CElement belowAll()
belowAll
in interface CElement
belowAll()
public CElement addTag(CTag t)
CExtensionalTag
, does anything otherwise.t
- The tag to be addedpublic CElement addTag(CExtensionalTag t)
public CElement addTag(java.lang.String t)
CNamedTag
tag to this shape.addTag
in interface CElement
t
- The name of the tag to be addedaddTag(String)
public boolean hasTag(CTag t)
public boolean hasTag(java.lang.String t)
CNamedTag
tag.hasTag
in interface CElement
t
- The name of the tag to be testedhasTag(String)
public java.util.LinkedList<CExtensionalTag> getTags()
public CElement removeTag(CExtensionalTag t)
CExtensionalTag
.removeTag
in interface CElement
t
- The tag to removeremoveTag(CExtensionalTag)
public CElement removeTag(java.lang.String t)
removeTag
in interface CElement
t
- The name of the CNamedTag
tag to removeremoveTag(String)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public CShape copyTo(CShape sms)
sms
- The destination shapepublic CShape duplicate()
duplicateWithTags()
public CShape duplicateWithTags()
duplicate()
public CRectangle asRectangle()
public CEllipse asEllipse()
public CPolyLine asPolyLine()
public CRectangularShape asRectangularShape()
public CText asText()
public CImage asImage()
public void addGhost()
addGhost
in interface CElement
addGhost()
public CShape getGhost()
public void removeGhost()
removeGhost
in interface CElement
removeGhost()
public void attachSM(CStateMachine sm, boolean reset)
CElement
to describe its behavior.public void detachSM(CStateMachine sm)
CElement
.public java.util.LinkedList<CShape> getAntialiasedShapes()
getAntialiasedShapes
in interface CElement
isAntialiased()
public java.util.LinkedList<CShape> getFilledShapes()
getFilledShapes
in interface CElement
isFilled()
public java.util.LinkedList<CShape> getOutlinedShapes()
getOutlinedShapes
in interface CElement
isOutlined()
public CShape getFirstHavingTag(CTag t)
getFirstHavingTag
in interface CElement
t
- The taghasTag(fr.lri.swingstates.canvas.CTag)
public CShape firstShape()
CElement
.firstShape
in interface CElement
CElement
, null if no shape is contained.public CShape getFirstAntialiasedShape()
CElement
.getFirstAntialiasedShape
in interface CElement
CElement
, null if no CShape is antialiased.isAntialiased()
public CShape getFirstFilledShape()
CElement
and that is filled.getFirstFilledShape
in interface CElement
CElement
and that is filled, null if no CShape is filled.isFilled()
public CShape getFirstOutlinedShape()
CElement
and that is outlined.getFirstOutlinedShape
in interface CElement
CElement
and that is outlined, null if no CShape is outlined.isOutlined()
public CElement animate(Animation anim)
animate
in interface CElement
anim
- The animation to associate to this CShape
.CShape
as a CElement
animate(Animation)
public boolean isPicked(java.awt.geom.Point2D location)
isPicked
in interface GraphicalShape