|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.figures.AttributeFigure
CH.ifa.draw.figures.RectangleFigure
CH.ifa.draw.contrib.TriangleFigure
public class TriangleFigure
A triangle with same dimensions as its enclosing rectangle, and apex at any of 8 places
Field Summary | |
---|---|
protected int |
fRotation
|
Fields inherited from interface CH.ifa.draw.framework.Figure |
---|
POPUP_MENU |
Constructor Summary | |
---|---|
TriangleFigure()
|
|
TriangleFigure(java.awt.Point origin,
java.awt.Point corner)
|
Method Summary | |
---|---|
java.awt.Point |
center()
Gets the center of a figure. |
java.awt.Point |
chop(java.awt.Point p)
|
java.lang.Object |
clone()
Clones a figure. |
java.awt.Insets |
connectionInsets()
Returns the connection inset. |
boolean |
containsPoint(int x,
int y)
Checks if a point is inside the figure. |
void |
draw(java.awt.Graphics g)
Draws the figure in the given graphics. |
java.util.Vector |
handles()
Returns the handles of a Figure that can be used to manipulate some of its attributes. |
java.awt.Polygon |
polygon()
Return the polygon describing the triangle |
void |
read(StorableInput dr)
Reads the Figure from a StorableInput. |
void |
rotate(double angle)
|
void |
write(StorableOutput dw)
Stores the Figure to a StorableOutput. |
Methods inherited from class CH.ifa.draw.figures.RectangleFigure |
---|
basicDisplayBox, basicMoveBy, displayBox, drawBackground, drawFrame |
Methods inherited from class CH.ifa.draw.figures.AttributeFigure |
---|
getAttribute, getDefaultAttribute, getFillColor, getFrameColor, setAttribute |
Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
---|
addFigureChangeListener, addToContainer, canConnect, changed, connectedTextLocator, connectorAt, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, size, willChange |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int fRotation
Constructor Detail |
---|
public TriangleFigure()
public TriangleFigure(java.awt.Point origin, java.awt.Point corner)
Method Detail |
---|
public java.util.Vector handles()
AbstractFigure
handles
in interface Figure
handles
in class RectangleFigure
Handle
public void rotate(double angle)
public java.awt.Polygon polygon()
public void draw(java.awt.Graphics g)
AttributeFigure
draw
in interface Figure
draw
in class AttributeFigure
g
- the Graphics to draw intopublic java.awt.Insets connectionInsets()
AbstractFigure
connectionInsets
in interface Figure
connectionInsets
in class AbstractFigure
public boolean containsPoint(int x, int y)
AbstractFigure
containsPoint
in interface Figure
containsPoint
in class AbstractFigure
public java.awt.Point center()
AbstractFigure
center
in interface Figure
center
in class AbstractFigure
public java.awt.Point chop(java.awt.Point p)
public java.lang.Object clone()
AbstractFigure
clone
in interface Figure
clone
in class AbstractFigure
Figure.clone()
public void write(StorableOutput dw)
AttributeFigure
write
in interface Storable
write
in class RectangleFigure
public void read(StorableInput dr) throws java.io.IOException
AttributeFigure
read
in interface Storable
read
in class RectangleFigure
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |