Class InjectorsGraph


  • public class InjectorsGraph
    extends java.lang.Object
    This structure represents a host with all its associated points, name and color
    Author:
    Julien Buret, Nicolas Droze, Bruno Dillenseger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.awt.Color color  
      int maxElements  
      java.lang.String name  
      java.util.ArrayList<java.util.Vector<java.awt.geom.Point2D.Double>> points  
    • Constructor Summary

      Constructors 
      Constructor Description
      InjectorsGraph​(int size, boolean isLimited)
      The constructor, which create all the vectors that will contain the points to store.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPoint​(java.awt.geom.Point2D.Double point, int type)
      This method adds a point to a specific graph of this host.
      void clearAllPoints()
      Remove all the points for this host.
      int getMaxElements()  
      void setMaxElements​(int nbPoints)
      Set the maximum number of points to store for the graph of this host.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        public java.lang.String name
      • color

        public java.awt.Color color
      • points

        public java.util.ArrayList<java.util.Vector<java.awt.geom.Point2D.Double>> points
      • maxElements

        public int maxElements
    • Constructor Detail

      • InjectorsGraph

        public InjectorsGraph​(int size,
                              boolean isLimited)
        The constructor, which create all the vectors that will contain the points to store.
        Parameters:
        size - The number of graphs for each host
        isLimited - True means that the number of points to store is limited.
    • Method Detail

      • addPoint

        public void addPoint​(java.awt.geom.Point2D.Double point,
                             int type)
        This method adds a point to a specific graph of this host.
        Parameters:
        point - The point to add.
        type - The type of graph this point belongs to.
      • clearAllPoints

        public void clearAllPoints()
        Remove all the points for this host.
      • setMaxElements

        public void setMaxElements​(int nbPoints)
        Set the maximum number of points to store for the graph of this host. (Useful only if the graph is limited)
        Parameters:
        nbPoints - The number of maximum points to store.
      • getMaxElements

        public int getMaxElements()