|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsddl.hierarchy.Shape
sddl.hierarchy.Canvas
public class Canvas
This Shape only represents a container. It has its own coordinate system and can be used to construct complex shapes.
Constructor Summary | |
---|---|
Canvas()
Standard SDDL constructor |
Method Summary | |
---|---|
void |
addCanvas(Canvas added,
AbstractPoint location)
Not used |
Drawing |
addShape(Shape s,
AbstractPoint location)
Adds a Shape in the current Canvas |
Drawing |
addShape(Shape s,
AbstractPoint location,
java.lang.String name)
Adds a Shape in the current Canvas |
Canvas |
copy()
Returns a copy of this Canvas |
void |
draw(AbstractPoint location,
java.io.PrintWriter out)
Standard SDDL draw function. |
void |
drawCanvas(AbstractPoint location,
java.util.LinkedList<Drawing> remainingDraws,
java.io.PrintWriter out)
Draws this specific canvas |
void |
drawMain(java.io.PrintWriter out)
Starts the drawing of the main canvas and everything linked to it |
Canvas |
getCanvas(int i)
Not used |
AbstractPoint |
getCanvasLocation(int i)
Not used |
Drawing |
getDrawing(int i)
Gets a specific drawing with its index |
Drawing |
getDrawing(java.lang.String name)
Get one of the drawing in this canvas with its specific name |
AbstractPoint |
getDrawingLocation(int i)
Get the location of a drawing from its index |
AbstractPoint |
getDrawingLocation(java.lang.String name)
Get the location of one of the drawing in this canvas with its specific name |
Drawing |
getDrawingOrNull(java.lang.String name)
Get the drawing of this name or return null |
int |
getNumberOfCanvas()
Not used |
int |
getNumberOfDrawings()
Returns the number of drawings in this canvas |
boolean |
isMain()
Verifies if this canvas is the main canvas |
Path |
obtainPath()
Not implemented on a canvas |
void |
setCanvasPosition(AbstractPoint position)
Sets the position at which the canvas is positionned compared to its father canvas |
void |
setMain()
Sets the Canvas as the main canvas |
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 |
---|
public Canvas()
Method Detail |
---|
public Canvas copy()
copy
in class Shape
public void setCanvasPosition(AbstractPoint position)
position
- The position relative to its fatherpublic void setMain()
public boolean isMain()
public void addCanvas(Canvas added, AbstractPoint location)
public Canvas getCanvas(int i)
public AbstractPoint getCanvasLocation(int i)
public int getNumberOfCanvas()
public Drawing addShape(Shape s, AbstractPoint location)
s
- The Shape to be addedlocation
- The location at which to add it (respective to its father canvas)
public Drawing addShape(Shape s, AbstractPoint location, java.lang.String name)
s
- The Shape to be addedlocation
- The location at which to add it (respective to its father canvas)name
- A name to give to the resulting drawing
public Drawing getDrawing(int i)
i
- The index of the drawing (starting at 0)
public Drawing getDrawing(java.lang.String name)
name
- The name of the drawing
public AbstractPoint getDrawingLocation(java.lang.String name)
name
- The name of the drawing
public Drawing getDrawingOrNull(java.lang.String name)
name
- The name of the drawing
public AbstractPoint getDrawingLocation(int i)
i
- Index of the drawing
public int getNumberOfDrawings()
public void draw(AbstractPoint location, java.io.PrintWriter out)
Shape
draw
in class Shape
location
- The location of the Shape on the main drawingout
- The file to be written topublic void drawMain(java.io.PrintWriter out)
out
- The file to write topublic void drawCanvas(AbstractPoint location, java.util.LinkedList<Drawing> remainingDraws, java.io.PrintWriter out)
location
- The location relative to the main drawingremainingDraws
- Drawing remaining to be drawnout
- File to write topublic Path obtainPath()
obtainPath
in class Shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |