|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GP.Graphics.Shape | +--GP.Graphics.Triangle
Fields inherited from class GP.Graphics.Shape |
ourNumShapes |
Constructor Summary | |
Triangle()
This constructor builds an isosceles triangle within the applet with its center at (0,0). |
|
Triangle(Container container)
This constructor builds an isosceles triangle in the specified container with its center at (0,0). |
|
Triangle(Triangle other)
This constructor builds this triangle as an exact copy of the one one passed to it, with the same vertices, size, color, orientation, container, and positio. |
Method Summary | |
Graphic |
Copy()
This method returns a triangle which is identical to this one. |
Position |
GetVertex1()
This function returns the offset of the first vertex of the triangle from the position (0,0). |
Position |
GetVertex2()
This function returns the offset of the second vertex of the triangle from the position (0,0). |
Position |
GetVertex3()
This function returns the offset of the third vertex of the triangle from the position (0,0). |
void |
SetPosition(Position pos)
This method should set the current position of the object. |
void |
SetSize(Size size)
This function is used to set the size of the triangle. |
void |
SetVertex1(Position vertex1)
Use this method to set the position of the first vertex in the triangle. |
void |
SetVertex2(Position vertex2)
Use this method to set the position of the second vertex in the triangle. |
void |
SetVertex3(Position vertex3)
Use this method to set the position of the third vertex in the triangle. |
void |
SetVertices(Position vertex1,
Position vertex2,
Position vertex3)
|
Methods inherited from class GP.Graphics.Shape |
Act, AddBehavior, ApplyBehaviors, ApplyInstincts, DeSelect, equals, Fill, Frame, GetApplet, GetBoxBoundedSize, GetColor, GetContainer, GetCurrentTime, GetFillStyle, GetOrientation, GetPivot, GetPosition, GetSize, Hide, IsPositionInside, IsVisible, Move, Move, Move, MoveBackward, MoveForward, MoveToBack, MoveToFront, Pause, Play, PositionIsOnlyInsideMe, PreferedSize, React, Refresh, RemoveAllBehaviors, RemoveBehavior, ReplaceAllBehaviors, Scale, Scale, Scale, Select, SetColor, SetContainer, SetFillStyle, SetOrientation, SetPivot, Show, Show, Start, Stop, toString, Turn, Turn, Turn, Turn, Turn, Turn |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Triangle()
public Triangle(Container container)
container
- The container of the triangle.public Triangle(Triangle other)
t
- The triangle to clone.Method Detail |
public Graphic Copy()
Copy
in class Shape
public void SetSize(Size size)
SetSize
in class Shape
size
- The new size of the triangle.public void SetPosition(Position pos)
Positionable
SetPosition
in class Shape
GP.Positionable
position
- the new positionpublic void SetVertices(Position vertex1, Position vertex2, Position vertex3)
public void SetVertex1(Position vertex1)
vertex1
- The new coordinate of the first vertex.public void SetVertex2(Position vertex2)
vertex2
- The new coordinate of the second vertex.public void SetVertex3(Position vertex3)
vertex3
- The new coordinate of the first vertex.public Position GetVertex1()
public Position GetVertex2()
public Position GetVertex3()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |