massim.competition2012
Class GraphPolicy
java.lang.Object
massim.visualization.svg.SvgXmlFile
massim.competition2012.GraphPolicy
public class GraphPolicy
- extends SvgXmlFile
Method Summary |
void |
create()
|
void |
createFolder(java.lang.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 |
org.w3c.dom.Document |
createXML()
|
void |
drawEdge(GraphEdge e)
|
int |
drawFirstTable(java.util.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(java.lang.String string,
int sizeX,
int sizeY,
java.util.Vector<GraphNode> nodes,
java.util.Vector<GraphEdge> edges)
|
void |
drawNode(GraphNode n)
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
boolean fill,
java.lang.String fillColor,
java.lang.String frameColor,
int frameWidth)
|
int |
drawSecondTable(java.util.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,
java.lang.String t,
java.lang.String color)
|
java.lang.String |
getTeamOne()
|
void |
listAchievements(int y,
long width,
java.util.Vector<TeamState> teamsStates)
|
void |
save(double internalWidth,
double internalHeight)
|
void |
setTeamNames(java.util.Vector<java.lang.String> teamNames2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
svgFile
public static java.lang.String svgFile
previewFile
public static java.lang.String previewFile
doc
public org.w3c.dom.Document doc
NODE_RADIUS
public static final int NODE_RADIUS
- See Also:
- Constant Field Values
AGENT_RADIUS
public static final int AGENT_RADIUS
- See Also:
- Constant Field Values
COLOR_GREEN
public static final java.lang.String COLOR_GREEN
- See Also:
- Constant Field Values
COLOR_BLUE
public static final java.lang.String COLOR_BLUE
- See Also:
- Constant Field Values
COLOR_GRAY
public static final java.lang.String COLOR_GRAY
- See Also:
- Constant Field Values
GraphPolicy
public GraphPolicy()
create
public void create()
drawGraph
public void drawGraph(java.lang.String string,
int sizeX,
int sizeY,
java.util.Vector<GraphNode> nodes,
java.util.Vector<GraphEdge> edges)
drawEdge
public void drawEdge(GraphEdge e)
drawNode
public void drawNode(GraphNode n)
drawText
public void drawText(int x,
int y,
java.lang.String t,
java.lang.String color)
drawRoundRect
public void drawRoundRect(int x,
int y,
int width,
int height,
boolean fill,
java.lang.String fillColor,
java.lang.String frameColor,
int frameWidth)
drawFirstTable
public int drawFirstTable(java.util.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
- Parameters:
teamsStates
- - the teams' states
- Returns:
- the current y-position after drawing the table
drawSecondTable
public int drawSecondTable(java.util.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"
- Returns:
- current y-position
listAchievements
public void listAchievements(int y,
long width,
java.util.Vector<TeamState> teamsStates)
save
public void save(double internalWidth,
double internalHeight)
createXML
public org.w3c.dom.Document createXML()
createPreviewSvg
public 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
createFolder
public void createFolder(java.lang.String name)
setTeamNames
public void setTeamNames(java.util.Vector<java.lang.String> teamNames2)
getTeamOne
public java.lang.String getTeamOne()
Copyright © 2012. All Rights Reserved.