|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsddl.hierarchy.Drawing
public class Drawing
Class representing a positioned Shape (or its concrete form). You can extract specific reference points from a Drawing
Constructor Summary | |
---|---|
Drawing(Shape s)
Constructor for a Drawing. |
|
Drawing(Shape s,
AbstractPoint location)
Constructor for a Drawing. |
Method Summary | |
---|---|
int |
addDefinedPoint(AbstractPoint point)
Add a new reference point |
void |
addDependency(Drawing dependency)
Add a dependency to a drawing. |
boolean |
canBeDrawn()
Determine if a drawing can be drawn |
AbstractPoint |
clip(Drawing other)
Returns the intersection point between two Drawing |
void |
draw(AbstractPoint location,
java.io.PrintWriter out)
Draws the current drawing and defined all of its reference points |
java.util.LinkedList<Drawing> |
getDependencies()
Get all dependencies. |
Drawing |
getDependency(int i)
Get a dependency to a drawing. |
java.lang.String |
getName()
Returns the name of the drawing |
int |
getNumberOfDependencies()
Get the number of dependencies. |
Shape |
getShape()
Returns the Shape associated with the Drawing |
Drawing |
getSubDrawing(java.lang.String name)
Returns a subdrawing in the current drawing |
void |
hasBeenDrawn()
Sets the drawing as being drawn. |
boolean |
isDrawn()
Determine if the drawing has been drawn. |
Path |
obtainPath()
Returns the Path from the Shape associated with the Drawing |
java.lang.String |
returnString()
Returns a String defining the name of the drawing |
void |
setDrawingName(java.lang.String name)
Sets a drawing name |
void |
setPosition(AbstractPoint position)
Sets the position of the drawing |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Drawing(Shape s)
public Drawing(Shape s, AbstractPoint location)
Method Detail |
---|
public void setPosition(AbstractPoint position)
position
- The position of the drawing¸public void setDrawingName(java.lang.String name)
name
- Name of the Drawingpublic java.lang.String getName()
public Drawing getSubDrawing(java.lang.String name)
name
- The name of the subdrawing
public java.lang.String returnString()
public int addDefinedPoint(AbstractPoint point)
point
- The point which has been defined
public void addDependency(Drawing dependency)
public Drawing getDependency(int i)
public java.util.LinkedList<Drawing> getDependencies()
public int getNumberOfDependencies()
public void hasBeenDrawn()
public boolean isDrawn()
public boolean canBeDrawn()
public Shape getShape()
public void draw(AbstractPoint location, java.io.PrintWriter out)
location
- The location of the drawing from the main drawingout
- File to write topublic Path obtainPath()
public AbstractPoint clip(Drawing other)
other
- The other Drawing to be clipped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |