|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmain.GenerateMap
main.GenerateDescription
public class GenerateDescription
The GenerateDescription
class provides methods for generating
a description of a map, so that the description could be read and transformed
into a visual map easily. The format is as follows: if an error occurs, only
the error is printed. Otherwise, the string "success" is printed on the first
line, the image file to use is printed on the second line, the map
description is printed on the following lines, then the string
"drawing_start" on its own line, then one line for each node or edge to be
drawn.
Field Summary | |
---|---|
private java.lang.String |
descriptionString
|
Fields inherited from class main.GenerateMap |
---|
description, edgeParameters, imageParameters, map, nodeParameters, ORIGINAL_NODE_SIZE_FACTOR, scenarioConfig |
Constructor Summary | |
---|---|
GenerateDescription()
Constructs a new GenerateDescription . |
Method Summary | |
---|---|
protected void |
clearData()
removes the previously generated data ie all nodes of the mapImage |
protected void |
drawEdge(DrawableEdge drawableEdge)
Constructs a line that specifies how to draw the given edge. |
protected void |
drawLabel(DrawableLabel drawableLabel)
Constructs a line that specifies how to draw the given label. |
protected void |
drawNode(DrawableNode drawableNode)
Constructs a line that specifies how to draw the given node. |
java.lang.Object |
getMap()
Finishes creating the map and returns it. |
protected void |
initialize()
Initializes the map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
private java.lang.String descriptionString
Constructor Detail |
---|
public GenerateDescription()
GenerateDescription
.
Method Detail |
---|
protected void initialize()
initialize
in class GenerateMap
protected void clearData()
clearData
in class GenerateMap
protected void drawNode(DrawableNode drawableNode)
node red green blue size id cityName x-coord y-coord
drawNode
in class GenerateMap
drawableNode
- a DrawableNode
protected void drawLabel(DrawableLabel drawableLabel)
label red green blue size id text x-coord y-coord
drawLabel
in class GenerateMap
drawableLabel
- a DrawableLabel
protected void drawEdge(DrawableEdge drawableEdge)
edge red green blue size x-coord1 y-coord1 x-coord2 y-coord2
drawEdge
in class GenerateMap
drawableEdge
- a DrawableEdge
public java.lang.Object getMap()
getMap
in class GenerateMap
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |