public class GraphPolicy extends SvgXmlFile
Modifier and Type | Field and Description |
---|---|
static int |
AGENT_RADIUS |
static String |
COLOR_BLUE |
static String |
COLOR_GRAY |
static String |
COLOR_GREEN |
Document |
doc |
static int |
NODE_RADIUS |
static String |
previewFile |
static String |
svgFile |
svgEnding
Constructor and Description |
---|
GraphPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
create() |
void |
createFolder(String name) |
void |
createPreviewSvg()
Method creates preview-SVG when called; should be called at the end of the match
because it needs the number of SVGs created
|
Document |
createXML() |
void |
drawEdge(GraphEdge e) |
int |
drawFirstTable(Vector<TeamState> teamsStates,
long width,
int currStep)
Draws a table containing the following information in the top right corner:
TeamName, Total Score, Step Score, Current Zone Value, Current Achievement Points, Achievements
|
void |
drawGraph(String string,
int sizeX,
int sizeY,
Vector<GraphNode> nodes,
Vector<GraphEdge> edges) |
void |
drawNode(GraphNode n) |
void |
drawRoundRect(int x,
int y,
int width,
int height,
boolean fill,
String fillColor,
String frameColor,
int frameWidth) |
int |
drawSecondTable(Vector<GraphSimulationAgentState> agents,
long width,
int y)
Draws name, role, current energy, max energy,current health,
max health, strength and vis range of agent in output "table"
|
void |
drawText(int x,
int y,
String t,
String color) |
String |
getTeamOne() |
void |
listAchievements(int y,
long width,
Vector<TeamState> teamsStates) |
void |
save(double internalWidth,
double internalHeight) |
void |
setTeamNames(Vector<String> teamNames2) |
generateXML, openFile, saveXML
public static String svgFile
public static String previewFile
public Document doc
public static final int NODE_RADIUS
public static final int AGENT_RADIUS
public static final String COLOR_GREEN
public static final String COLOR_BLUE
public static final String COLOR_GRAY
public void create()
public void drawGraph(String string, int sizeX, int sizeY, Vector<GraphNode> nodes, Vector<GraphEdge> edges)
public void drawEdge(GraphEdge e)
public void drawNode(GraphNode n)
public void drawRoundRect(int x, int y, int width, int height, boolean fill, String fillColor, String frameColor, int frameWidth)
public int drawFirstTable(Vector<TeamState> teamsStates, long width, int currStep)
teamsStates
- - the teams' statespublic int drawSecondTable(Vector<GraphSimulationAgentState> agents, long width, int y)
public void save(double internalWidth, double internalHeight)
public Document createXML()
public void createPreviewSvg()
public void createFolder(String name)
public String getTeamOne()
Copyright © 2013. All Rights Reserved.