edu.ntnu.ecosim.visual.graph
Class GraphLine

java.lang.Object
  extended by edu.ntnu.ecosim.visual.graph.GraphLine

public class GraphLine
extends java.lang.Object

The Class GraphLine is used to represent the lines of the graph, which when taken together represent the graph of one provider

Author:
martin.andreas.borke

Constructor Summary
GraphLine(java.lang.String name, java.awt.Color c, int startx, int starty)
          The Constructor.
 
Method Summary
 void addPoint(int x, int y)
          Adds a new point to the graphline
 java.awt.Color getColor()
          Gets the color of this line
 java.util.ArrayList<java.awt.geom.Line2D.Float> getLines()
          Gets the lines of this graph
 java.lang.String getName()
          Gets the name of the provider having this line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphLine

public GraphLine(java.lang.String name,
                 java.awt.Color c,
                 int startx,
                 int starty)
The Constructor.

Parameters:
startx - the startposition at the x axis
starty - the startposition at the y axis
c - the color the provider should be drawn in
name - the name of the provider
Method Detail

addPoint

public void addPoint(int x,
                     int y)
Adds a new point to the graphline

Parameters:
y - the y position
x - the x position

getLines

public java.util.ArrayList<java.awt.geom.Line2D.Float> getLines()
Gets the lines of this graph

Returns:
the lines

getColor

public java.awt.Color getColor()
Gets the color of this line

Returns:
the color

getName

public java.lang.String getName()
Gets the name of the provider having this line

Returns:
the name