|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmain.Visualizer
main.planetSh.PlanetshVisualizer
public class PlanetshVisualizer
The PlanetshVisualizer
class reads in an inputfile and runs the
GenerateMap
that is passed in to create the map object.
Field Summary | |
---|---|
private java.lang.String |
description
|
private DrawingParameters |
edgeParameters
|
private InputFileParser |
fileParser
|
private GenerateMap |
generateMap
|
private ImageParameters |
imageParameters
|
private NodeEdgeMap |
map
|
private boolean |
mapCreated
|
private java.lang.String |
mapViewFileName
|
private DrawingParameters |
nodeParameters
|
private PlanetLabMgr |
planetLabApi
|
private ScenarioConfig |
scenarioConfig
|
Fields inherited from class main.Visualizer |
---|
CONFIG_FILE_EXT, CONFIGS_DIR, PICTURES_DIR, VIEWS_DIR |
Constructor Summary | |
---|---|
PlanetshVisualizer(java.lang.String inputFileName,
GenerateMap generateMap,
PlanetLabMgr planetLabApi,
ScenarioConfig config)
Initializes the PlanetshVisualizer , which manages the specified map generator to generate a map. |
Method Summary | |
---|---|
void |
createMap()
does nothing |
static java.util.Vector<java.lang.String> |
getAvailableViews(boolean withFileExt)
Lists all available view files in the VIEWS_DIR and returns their names. |
GenerateMap |
getGenerateMap()
|
NodeEdgeMap |
getMap()
|
java.lang.String |
getMapViewFileName(boolean withFileExt)
|
boolean |
isMapCreated()
|
void |
loadGenerateMapParameters(java.lang.String inputFileName)
Loads the contents of the inputFileName. |
private void |
reassignNodesAndEdges()
uses the scenario-config data to generate the edges and to assign node colors |
void |
setMapCreated(boolean mapCreated)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean mapCreated
private InputFileParser fileParser
private DrawingParameters nodeParameters
private DrawingParameters edgeParameters
private ImageParameters imageParameters
private NodeEdgeMap map
private java.lang.String description
private PlanetLabMgr planetLabApi
private ScenarioConfig scenarioConfig
private GenerateMap generateMap
private java.lang.String mapViewFileName
Constructor Detail |
---|
public PlanetshVisualizer(java.lang.String inputFileName, GenerateMap generateMap, PlanetLabMgr planetLabApi, ScenarioConfig config) throws java.io.FileNotFoundException, java.io.IOException, java.text.ParseException, java.lang.Exception
PlanetshVisualizer
, which manages the specified map generator to generate a map.
inputFileName
- a String
that is the input file's namegenerateMap
- a GenerateMap
that specifies how to draw the
map
java.io.IOException
- if there's an error opening or reading a file
java.io.FileNotFoundException
- if a file is not found
java.text.ParseException
- if a parse error occurs
java.lang.Exception
Visualizer
Method Detail |
---|
public static java.util.Vector<java.lang.String> getAvailableViews(boolean withFileExt)
withFileExt
- - if true, the names will contain the file extensions,
otherwise the names will be returned without file extension.
public void loadGenerateMapParameters(java.lang.String inputFileName) throws java.io.FileNotFoundException, java.io.IOException, java.text.ParseException
inputFileName
-
java.io.FileNotFoundException
java.io.IOException
java.text.ParseException
Visualizer
public void createMap() throws java.io.IOException, java.io.FileNotFoundException, java.text.ParseException
Visualizer
createMap
in class Visualizer
java.io.IOException
- if there's an error opening or reading a file
java.io.FileNotFoundException
- if a file is not found
java.text.ParseException
- if a parse error occursprivate void reassignNodesAndEdges()
public NodeEdgeMap getMap()
getMap
in class Visualizer
public GenerateMap getGenerateMap()
getGenerateMap
in class Visualizer
public boolean isMapCreated()
public void setMapCreated(boolean mapCreated)
mapCreated
- the mapCreated to setpublic java.lang.String getMapViewFileName(boolean withFileExt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |