sddl.hierarchy
Class EqTriangle

java.lang.Object
  extended by sddl.hierarchy.Shape
      extended by sddl.hierarchy.EqTriangle

public class EqTriangle
extends Shape

This class represents an equilateral triangle.

Version:
1.00
Author:
Mathieu Bourgeois

Constructor Summary
EqTriangle()
          Standard SDDL constructor for the triangle
EqTriangle(double size)
          Java-only constructor
 
Method Summary
 EqTriangle copy()
          Returns a copy of this EqTriangle
 void draw(AbstractPoint location, java.io.PrintWriter out)
          Standard SDDL draw function.
 double getSize()
          Standard SDDL getter for size property
 Path obtainPath()
          Returns a Path describing the equilateral triangle
 void setSize(double size)
          Standard SDDL setter for size property
 
Methods inherited from class sddl.hierarchy.Shape
isVisible, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqTriangle

public EqTriangle()
Standard SDDL constructor for the triangle


EqTriangle

public EqTriangle(double size)
Java-only constructor

Parameters:
size - The size of one side of the triangle
Method Detail

copy

public EqTriangle copy()
Returns a copy of this EqTriangle

Specified by:
copy in class Shape
Returns:
A copy of this EqTriangle

setSize

public void setSize(double size)
Standard SDDL setter for size property

Parameters:
size - The size of one side of the triangle

getSize

public double getSize()
Standard SDDL getter for size property

Returns:
The size of one side of the triangle

draw

public void draw(AbstractPoint location,
                 java.io.PrintWriter out)
Description copied from class: Shape
Standard SDDL draw function. Every shape must implement this

Specified by:
draw in class Shape
Parameters:
location - The location of the Shape on the main drawing
out - The file to be written to

obtainPath

public Path obtainPath()
Returns a Path describing the equilateral triangle

Specified by:
obtainPath in class Shape
Returns:
A Path describing the equilateral triangle