massim.visualization
Class MainPolicy

java.lang.Object
  extended by massim.visualization.svg.SvgXmlFile
      extended by massim.visualization.MainPolicy
Direct Known Subclasses:
ColumnPolicy, GridPolicy, RowPolicy

public class MainPolicy
extends SvgXmlFile


Field Summary
 org.w3c.dom.Document doc
           
 int numberCellGridX
           
 int numberCellGridY
           
static java.lang.String previewFile
           
 boolean readTheConfig
           
 boolean setAgentblue
           
 boolean setAgentred
           
 boolean setBlueDepot
           
 boolean setDepot
           
 boolean setFence
           
 boolean setGold
           
 boolean setRedDepot
           
 boolean setSwitch
           
 boolean setTree
           
static java.lang.String svgFile
           
 
Fields inherited from class massim.visualization.svg.SvgXmlFile
svgEnding
 
Constructor Summary
MainPolicy()
           
 
Method Summary
 void createFile(java.lang.String part1, java.lang.String part2)
           
 void createFolder(java.lang.String name)
           
 void createPathFolder()
          this method create the output folder if not exist.
 org.w3c.dom.Document createXML()
          ) This method create a new svg (xml) file
 java.lang.String getConfigFile()
           
 java.lang.String getNameOutputFile()
           
 java.lang.String getNamePreviewSvg()
           
 java.lang.String getOutPut()
           
 java.lang.String getPath()
           
 java.lang.String getSvgEnding()
           
 void previewSvg()
          create the preview / controll svg to play the simulation
 void resetValues()
           
 void save(org.w3c.dom.Document doc, double internalHeight, double internalWidth)
          method write the SVG file to disk.
 void setConfigPath(java.lang.String string)
           
 void setHeadInformationFirstLevel(java.lang.String headInfo)
          set the first Informationline over the grid
 void setHeadInformationSecondLevel(java.lang.String headInfo)
          set the second Informationline over the grid
 void setImageHeight(java.lang.String newSvgImageHeight)
           
 void setImageWidth(java.lang.String newSvgImageWidth)
           
 void setNameOutputFile(java.lang.String newNameOutputFile)
           
 void setOutPut(java.lang.String newPath)
           
 void setPath(java.lang.String newPath)
           
 
Methods inherited from class massim.visualization.svg.SvgXmlFile
generateXML, openFile, saveXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

svgFile

public static java.lang.String svgFile

previewFile

public static java.lang.String previewFile

setTree

public boolean setTree

setDepot

public boolean setDepot

setGold

public boolean setGold

setRedDepot

public boolean setRedDepot

setBlueDepot

public boolean setBlueDepot

readTheConfig

public boolean readTheConfig

numberCellGridX

public int numberCellGridX

numberCellGridY

public int numberCellGridY

doc

public org.w3c.dom.Document doc

setAgentblue

public boolean setAgentblue

setAgentred

public boolean setAgentred

setFence

public boolean setFence

setSwitch

public boolean setSwitch
Constructor Detail

MainPolicy

public MainPolicy()
Method Detail

getSvgEnding

public java.lang.String getSvgEnding()

getConfigFile

public java.lang.String getConfigFile()

getNameOutputFile

public java.lang.String getNameOutputFile()

getNamePreviewSvg

public java.lang.String getNamePreviewSvg()

getPath

public java.lang.String getPath()

setOutPut

public void setOutPut(java.lang.String newPath)

getOutPut

public java.lang.String getOutPut()

setPath

public void setPath(java.lang.String newPath)

setNameOutputFile

public void setNameOutputFile(java.lang.String newNameOutputFile)

setImageHeight

public void setImageHeight(java.lang.String newSvgImageHeight)

setImageWidth

public void setImageWidth(java.lang.String newSvgImageWidth)

setHeadInformationFirstLevel

public void setHeadInformationFirstLevel(java.lang.String headInfo)
set the first Informationline over the grid

Parameters:
headInfo - the String with the text

setHeadInformationSecondLevel

public void setHeadInformationSecondLevel(java.lang.String headInfo)
set the second Informationline over the grid

Parameters:
headInfo - the String with the text

setConfigPath

public void setConfigPath(java.lang.String string)

resetValues

public void resetValues()

createPathFolder

public void createPathFolder()
this method create the output folder if not exist.


createFolder

public void createFolder(java.lang.String name)

createFile

public void createFile(java.lang.String part1,
                       java.lang.String part2)
                throws java.io.IOException
Throws:
java.io.IOException

createXML

public org.w3c.dom.Document createXML()
) This method create a new svg (xml) file

Returns:
document is new SVG file

previewSvg

public void previewSvg()
create the preview / controll svg to play the simulation


save

public void save(org.w3c.dom.Document doc,
                 double internalHeight,
                 double internalWidth)
method write the SVG file to disk.

Parameters:
doc - the document which will be write to disk
internalHeight - the height of the hole SVG need to scale
internalWidth - the width of the hole SVG need to scale


Copyright © 2012. All Rights Reserved.