org.vectomatic.common.model
Class Shape
java.lang.Object
org.vectomatic.common.model.Shape
- All Implemented Interfaces:
- com.google.gwt.user.client.rpc.IsSerializable
- Direct Known Subclasses:
- Ellipse, Path, Polyline, Rect, ShapeGroup
public abstract class Shape
- extends Object
- implements com.google.gwt.user.client.rpc.IsSerializable
Base class for geometric shapes
- Author:
- Lukas Laag
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_model
protected transient DrawingModel _model
_id
protected int _id
_r
protected float _r
_s
protected Point _s
_t
protected Point _t
_dirty
protected transient boolean _dirty
_m
protected transient TransformMatrix _m
_bbox
protected BoundingBox _bbox
_attributes
protected Map<Attribute,IAttributeValue> _attributes
- A map of attribute, attribute values.
Shape
public Shape()
Shape
public Shape(Shape shape)
getRotation
public float getRotation()
setRotation
public void setRotation(float r)
getScaling
public Point getScaling(Point s)
setScaling
public void setScaling(Point s)
getTranslation
public Point getTranslation(Point t)
setTranslation
public void setTranslation(Point t)
getTransform
public TransformMatrix getTransform()
setTransform
public void setTransform(TransformMatrix m)
updateTransform
protected void updateTransform()
getBoundingBox
public BoundingBox getBoundingBox()
getModel
public DrawingModel getModel()
setModel
public void setModel(DrawingModel model)
getAttribute
public IAttributeValue getAttribute(Attribute attr)
setAttribute
public IAttributeValue setAttribute(Attribute attr,
IAttributeValue value)
clearAttribute
public IAttributeValue clearAttribute(Attribute attr)
getDefinedAttributes
public Set<Attribute> getDefinedAttributes()
definesAttribute
public boolean definesAttribute(Attribute attr)
copyAttributes
public void copyAttributes(Shape src)
acceptVisitor
public abstract void acceptVisitor(IShapeVisitor visitor)
isSame
public abstract boolean isSame(Shape shape)
- Returns true if the specified shape has the same
geometrical and styling properties as this shape,
false otherwise.
- Parameters:
shape
- A shape
- Returns:
- True if the specified shape has the same
geometrical and styling properties as this shape,
false otherwise.
Copyright © 2010. All Rights Reserved.