Venice 0.7beta

org.mov.chart
Class ChartDrawingModel

java.lang.Object
  extended by org.mov.chart.ChartDrawingModel

public class ChartDrawingModel
extends java.lang.Object


Constructor Summary
ChartDrawingModel()
           
 
Method Summary
 void createNewLine(Coordinate start)
          Creates a new straight line drawn on the chart.
 DrawnLine getDrawnLine(int index)
          Return a specific line drawn on the chart
 java.util.Vector getDrawnLines()
          Return all the lines drawn on the chart.
 java.util.Vector getDrawnPoints()
          Return the list of all points drawn on the chart
 DrawnLine getLastLine()
          Return the last line drawn, or in the process of being drawn.
 java.util.HashMap getText()
          Return all the text written on the chart
 void removeLine(Coordinate start, Coordinate end)
          Remove the drawn line corresponding at a specific set of start and end points
 void removePoint(Coordinate point)
          Remove the point drawn on the chart at this coordinate
 void removeText(Coordinate point)
          Remove the text at a specific point
 void setPoint(Coordinate point)
          Place a point on the chart at a point
 void setText(Coordinate point, java.lang.String str)
          Put text on the chart at a specific point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartDrawingModel

public ChartDrawingModel()
Method Detail

createNewLine

public void createNewLine(Coordinate start)
Creates a new straight line drawn on the chart.

Parameters:
start - The first point on the line.

getLastLine

public DrawnLine getLastLine()
Return the last line drawn, or in the process of being drawn.

Returns:
A DrawnLine object (See DrawnLine.java)

getDrawnLines

public java.util.Vector getDrawnLines()
Return all the lines drawn on the chart.

Returns:
A Vector of DrawnLine objects

getDrawnLine

public DrawnLine getDrawnLine(int index)
Return a specific line drawn on the chart

Parameters:
index - The index to the list of lines
Returns:
the index'th DrawnLine object drawn on the chart.

removeLine

public void removeLine(Coordinate start,
                       Coordinate end)
Remove the drawn line corresponding at a specific set of start and end points

Parameters:
start - The start point of the line
end - The end point of the line

setPoint

public void setPoint(Coordinate point)
Place a point on the chart at a point

Parameters:
point - The coordinate to place on the chart

getDrawnPoints

public java.util.Vector getDrawnPoints()
Return the list of all points drawn on the chart

Returns:
A vector of all points drawn on the chart

removePoint

public void removePoint(Coordinate point)
Remove the point drawn on the chart at this coordinate

Parameters:
point - The coordinate of the point to remove

getText

public java.util.HashMap getText()
Return all the text written on the chart

Returns:
A HashMap of all the text, keyed by coordinates.

setText

public void setText(Coordinate point,
                    java.lang.String str)
Put text on the chart at a specific point

Parameters:
point - The coordinate on the chart of where the text is to placed
str - The string to write on the chart.

removeText

public void removeText(Coordinate point)
Remove the text at a specific point

Parameters:
point - The coordinate on the chart of where to delete the text

Venice 0.7beta