com.exponto.jstock
Class PersistentLine

java.lang.Object
  extended bycom.exponto.jstock.PersistentLine

public class PersistentLine
extends java.lang.Object

Stores the start and endpoints of a line in a scale independent way so that the line can be redrawn when the scale is changed. x axis is represented by date, y axis by a price value

Author:
kaare

Constructor Summary
PersistentLine(Date dx1, double dy1, Date dx2, double dy2)
           
PersistentLine(int id, java.lang.String dx1, double dy1, java.lang.String dx2, double dy2)
           
 
Method Summary
 int getDeleted()
           
 int getLineIndex()
           
 int getSelected()
           
 Date getX1()
           
 Date getX2()
           
 double getY1()
           
 double getY2()
           
 boolean isDeleted()
           
 boolean isSelected()
           
 void setDeleted(int deletedNumber)
           
 void setLineIndex(int i)
           
 void setSelected(boolean b)
           
 void setSelected(int i)
           
 void setX1(Date d)
           
 void setX2(Date d)
           
 void setY1(double d)
           
 void setY2(double d)
           
 void undelete()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentLine

public PersistentLine(Date dx1,
                      double dy1,
                      Date dx2,
                      double dy2)

PersistentLine

public PersistentLine(int id,
                      java.lang.String dx1,
                      double dy1,
                      java.lang.String dx2,
                      double dy2)
Method Detail

getX1

public Date getX1()
Returns:
the Date representing the x1 coordinate

getX2

public Date getX2()
Returns:
the Date representing the x2 coordinate

getY1

public double getY1()
Returns:
a value (double) representing the y1 coordinate

getY2

public double getY2()
Returns:
a value (double) representing the y2 coordinate

setX1

public void setX1(Date d)
Parameters:
d - Date representing the x dimension of the start point

setX2

public void setX2(Date d)
Parameters:
d - Date representing the x dimension of the end point

setY1

public void setY1(double d)
Parameters:
d - double representing the y dimension of the start point

setY2

public void setY2(double d)
Parameters:
d - double representing the y dimension of the start end

getLineIndex

public int getLineIndex()
Returns:
the lineIndex as an int

setLineIndex

public void setLineIndex(int i)
Parameters:
i - sets the lineIndex to i.

isSelected

public boolean isSelected()
Returns:
true if selected, false otherwise

setSelected

public void setSelected(boolean b)
Parameters:
b - sets this line to selected if true, false otherwise

setSelected

public void setSelected(int i)

getSelected

public int getSelected()

setDeleted

public void setDeleted(int deletedNumber)

getDeleted

public int getDeleted()

isDeleted

public boolean isDeleted()

undelete

public void undelete()


Copyright © 2004 Kaare Ranum