simulations.gui.curves
Class CurvesFactory

java.lang.Object
  extended by simulations.gui.curves.CurvesFactory

public class CurvesFactory
extends java.lang.Object

This class is used to create the curves of the game by modifying the Graphics of the composant


Constructor Summary
CurvesFactory()
          Creates a new instance of CurvesFactory
 
Method Summary
 void drawAxes(java.awt.Graphics g, int minX, int maxX, int minY, int maxY)
          This method insert the axes in the graph
 void drawCurves(java.awt.Graphics g, java.util.ArrayList playerListList, int minPoint, int maxPoint, int minTurn, int maxTurn, java.util.Vector colorsVector)
          This method creates the curves by affecting the Graphics The four last parameters define the display parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurvesFactory

public CurvesFactory()
Creates a new instance of CurvesFactory

Method Detail

drawAxes

public void drawAxes(java.awt.Graphics g,
                     int minX,
                     int maxX,
                     int minY,
                     int maxY)
This method insert the axes in the graph

Parameters:
minX - The min value in x
maxX - The max value in x
minY - The min value in y
maxY - The max value in x
g - The graphics

drawCurves

public void drawCurves(java.awt.Graphics g,
                       java.util.ArrayList playerListList,
                       int minPoint,
                       int maxPoint,
                       int minTurn,
                       int maxTurn,
                       java.util.Vector colorsVector)
This method creates the curves by affecting the Graphics The four last parameters define the display parameters

Parameters:
colorsVector - The colors vector to use to draw curves
g - The graphics of the component
playerListList - the list of the players in each turn
minPoint - The min point to consider (minY)
maxPoint - The max point to consider (maxY)
minTurn - The min turn to consider (minX)
maxTurn - The max turn to consider (maxX)