public class EditableEllipse2D extends EditableRectangle implements Cloneable
Rectangle2D.Double, Rectangle2D.Float
border, lastP1, lastP2, p1, p2, p3, p4, selected
height, width, x, y
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor and Description |
---|
EditableEllipse2D(int x,
int y,
int width,
int height) |
EditableEllipse2D(Point2D ini,
Point2D end) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes a copy of the shape.
|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
EditableShape[] |
divide(double x,
double y)
Divides the shape taking (x,y) as the "significant" point of the division.
|
EditableShape[] |
divide(double x,
double y,
boolean b) |
Ellipse2D |
getEllipse() |
PathIterator |
getPathIterator(AffineTransform at) |
boolean |
intersects(double x,
double y,
double w,
double h) |
void |
paintWithColor(Graphics g,
int drawingMode,
Color c)
Draws the shape with the indicated color.
|
aproximateNearestBorder, changeBorder, deselectBorder, distanceTo, drawBorders, getBorders, getEndPoint, getInitialPoint, getLocation, getNearestBorder, getNotSelectedBorder, hasClickedBorder, hasSelectedBorder, isAdjacentTo, isInto, isSelected, paint, paintSelection, selectBorder, setLimits, setLimits, setSelected, transform
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, toString
add, add, add, equals, getPathIterator, hashCode, intersect, intersectsLine, intersectsLine, outcode, setFrame, union
contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
finalize, getClass, notify, notifyAll, wait, wait, wait
contains, contains, getBounds, getBounds2D, getPathIterator, intersects
public void paintWithColor(Graphics g, int drawingMode, Color c)
EditableShape
paintWithColor
in interface EditableShape
paintWithColor
in class EditableRectangle
g
- The graphic environment where to draw the shapedrawingMode
- The drawing mode. Squares are drawed in red when this value is
ShapeGenPanel.NEW_POINTc
- The color to be used to draw the shapepublic boolean contains(double x, double y)
contains
in interface Shape
contains
in class Rectangle2D
public boolean contains(double x, double y, double w, double h)
contains
in interface Shape
contains
in class Rectangle2D
public PathIterator getPathIterator(AffineTransform at)
getPathIterator
in interface Shape
getPathIterator
in class Rectangle2D
public boolean intersects(double x, double y, double w, double h)
intersects
in interface Shape
intersects
in class Rectangle2D
public EditableShape[] divide(double x, double y, boolean b)
divide
in class EditableRectangle
public EditableShape[] divide(double x, double y)
EditableShape
divide
in interface EditableShape
divide
in class EditableRectangle
x
- The horizontal co-ordinate of the pointy
- The vertical co-ordinate of the pointpublic Ellipse2D getEllipse()
public Object clone()
EditableShape
clone
in interface EditableShape
clone
in class EditableRectangle
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.