sddl.hierarchy
Class Square

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

public class Square
extends Shape

This Shape represents a standard square

Version:
1.00
Author:
Mathieu Bourgeois

Constructor Summary
Square()
          Default SDDL constructor
Square(double length)
          Java-only default constructor
 
Method Summary
 Square copy()
          Returns a copy of this Square
 void draw(AbstractPoint location, java.io.PrintWriter out)
          Standard SDDL draw function
 double getLength()
          Standard SDDL getter for parameter length
 Path obtainPath()
          Gives a Path describing the square
 void setLength(double length)
          Standard SDDL setter for parameter length
 
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

Square

public Square()
Default SDDL constructor


Square

public Square(double length)
Java-only default constructor

Parameters:
length - The length of each side of the square
Method Detail

setLength

public void setLength(double length)
Standard SDDL setter for parameter length

Parameters:
length - The length of each side of the square

getLength

public double getLength()
Standard SDDL getter for parameter length

Returns:
The length of each side of the square

draw

public void draw(AbstractPoint location,
                 java.io.PrintWriter out)
Standard SDDL draw function

Specified by:
draw in class Shape
Parameters:
location - The location of the current object on the main drawing
out - The writer used to write the file

obtainPath

public Path obtainPath()
Gives a Path describing the square

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

copy

public Square copy()
Returns a copy of this Square

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