All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.contrib.TriangleFigure
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractFigure
|
+----CH.ifa.draw.figures.AttributeFigure
|
+----CH.ifa.draw.figures.RectangleFigure
|
+----CH.ifa.draw.contrib.TriangleFigure
- public class TriangleFigure
- extends RectangleFigure
A triangle with same dimensions as its enclosing rectangle,
and apex at any of 8 places
-
fRotation
-
-
TriangleFigure()
-
-
TriangleFigure(Point, Point)
-
-
center()
- Gets the center of a figure.
-
chop(Point)
-
-
clone()
- Clones a figure.
-
connectionInsets()
- Returns the connection inset.
-
containsPoint(int, int)
- Checks if a point is inside the figure.
-
draw(Graphics)
- Draws the figure in the given graphics.
-
handles()
- Returns the handles of a Figure that can be used
to manipulate some of its attributes.
-
polygon()
- Return the polygon describing the triangle
-
read(StorableInput)
- Reads the Figure from a StorableInput.
-
rotate(double)
-
-
write(StorableOutput)
- Stores the Figure to a StorableOutput.
fRotation
protected int fRotation
TriangleFigure
public TriangleFigure()
TriangleFigure
public TriangleFigure(Point origin,
Point corner)
handles
public Vector handles()
- Returns the handles of a Figure that can be used
to manipulate some of its attributes.
- Overrides:
- handles in class RectangleFigure
rotate
public void rotate(double angle)
polygon
public Polygon polygon()
- Return the polygon describing the triangle
draw
public void draw(Graphics g)
- Draws the figure in the given graphics.
- Overrides:
- draw in class AttributeFigure
connectionInsets
public Insets connectionInsets()
- Returns the connection inset.
- Overrides:
- connectionInsets in class AbstractFigure
containsPoint
public boolean containsPoint(int x,
int y)
- Checks if a point is inside the figure.
- Overrides:
- containsPoint in class AbstractFigure
center
public Point center()
- Gets the center of a figure.
- Overrides:
- center in class AbstractFigure
chop
public Point chop(Point p)
clone
public Object clone()
- Clones a figure.
- Overrides:
- clone in class AbstractFigure
write
public void write(StorableOutput dw)
- Stores the Figure to a StorableOutput.
- Overrides:
- write in class RectangleFigure
read
public void read(StorableInput dr) throws IOException
- Reads the Figure from a StorableInput.
- Overrides:
- read in class RectangleFigure
All Packages Class Hierarchy This Package Previous Next Index