|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmain.GenerateMap
main.GenerateImage
public class GenerateImage
The GenerateImage
class provides methods for creating a JPEG
image of the map.
Field Summary | |
---|---|
private java.lang.String |
imageName
|
private java.awt.Graphics2D |
mapGraphics
|
private MapImage |
mapImage
|
private java.awt.image.BufferedImage |
mapJPEG
|
Fields inherited from class main.GenerateMap |
---|
description, edgeParameters, imageParameters, map, nodeParameters, ORIGINAL_NODE_SIZE_FACTOR, scenarioConfig |
Constructor Summary | |
---|---|
GenerateImage()
Constructs a new GenerateImage . |
Method Summary | |
---|---|
protected void |
clearData()
removes all nodes of mapImage |
protected void |
drawEdge(DrawableEdge drawableEdge)
Draws an edge on the map. |
protected void |
drawLabel(DrawableLabel drawableLabel)
Draws a label on the map. |
protected void |
drawNode(DrawableNode drawableNode)
Draws a node on the map. |
protected java.awt.Rectangle |
getDrawingAreaBounds()
Gets the size of the drawing area. |
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.awt.image.BufferedImage mapJPEG
private java.awt.Graphics2D mapGraphics
private MapImage mapImage
private java.lang.String imageName
Constructor Detail |
---|
public GenerateImage()
GenerateImage
.
Method Detail |
---|
protected void initialize() throws java.io.FileNotFoundException, java.io.IOException, java.text.ParseException
initialize
in class GenerateMap
java.io.FileNotFoundException
- if a file is not found
java.io.IOException
- if an I/O error occurs
java.text.ParseException
- if a parse error occursprotected void clearData()
clearData
in class GenerateMap
protected void drawNode(DrawableNode drawableNode)
drawNode
in class GenerateMap
drawableNode
- a DrawableNode
protected java.awt.Rectangle getDrawingAreaBounds()
protected void drawLabel(DrawableLabel drawableLabel)
drawLabel
in class GenerateMap
drawableLabel
- a DrawableLabel
protected void drawEdge(DrawableEdge drawableEdge)
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 |