org.diyefi.openlogviewer.genericlog
Class GenericDataElement

java.lang.Object
  extended by org.diyefi.openlogviewer.genericlog.GenericDataElement
All Implemented Interfaces:
Transferable, Serializable, Comparable<GenericDataElement>

public final class GenericDataElement
extends Object
implements Comparable<GenericDataElement>, Serializable, Transferable

GenericDataElement is Comparable Serializable and Transferable and supports property change events it was built this way in order to be copy/pasteable later in the future when constructed this is the meat and potatoes of the program, the graphs and data displayed are pulled from these objects.

Author:
Bryan Harris
See Also:
Serialized Form

Constructor Summary
protected GenericDataElement(int initialLength)
          Constructor brings the GDE up to speed, defaulting with an available 50,000 datapoints in order to reduce the number of times the Array list has to copy its contents in order to increase size.
 
Method Summary
 void add(double value)
          override add( t) of ArrayList to find min and max values before adding to the List
 void addPropertyChangeListener(String property, PropertyChangeListener PCL)
           
 void clearOut()
           
 int compareTo(GenericDataElement otherGDE)
           
 double get(int index)
           
 Color getDisplayColor()
           
 double getDisplayMaxValue()
           
 double getDisplayMinValue()
           
 double getMaxValue()
           
 double getMinValue()
           
 String getName()
           
 int getSplitNumber()
           
 Object getTransferData(DataFlavor flavor)
           
 DataFlavor[] getTransferDataFlavors()
           
protected  void increaseCapacity(int ourLoadFactor)
           
protected static void incrementPosition()
           
 boolean isDataFlavorSupported(DataFlavor flavor)
           
 void removePropertyChangeListener(String property, PropertyChangeListener PCL)
           
 void reset()
          TODO move this into GUI space and out of this class!!
protected static void resetPosition()
           
 void setDisplayColor(Color c)
           
 void setDisplayMaxValue(double highValue)
           
 void setDisplayMinValue(double lowValue)
           
 void setName(String name)
          set header name, called during GenericLog construction
 void setSplitNumber(int splitNumber)
          sets the splitNumber or division of the graph in the graphing screen if its the same a property change event is fired called "Split"
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericDataElement

protected GenericDataElement(int initialLength)
Constructor brings the GDE up to speed, defaulting with an available 50,000 datapoints in order to reduce the number of times the Array list has to copy its contents in order to increase size.

Method Detail

increaseCapacity

protected void increaseCapacity(int ourLoadFactor)

incrementPosition

protected static void incrementPosition()

resetPosition

protected static void resetPosition()

add

public void add(double value)
override add( t) of ArrayList to find min and max values before adding to the List

Parameters:
d - Double - Double.parseDouble(String) value to add to the array

get

public double get(int index)

size

public int size()

setSplitNumber

public void setSplitNumber(int splitNumber)
sets the splitNumber or division of the graph in the graphing screen if its the same a property change event is fired called "Split"

Parameters:
splitNumber -

reset

public void reset()
TODO move this into GUI space and out of this class!!


addPropertyChangeListener

public void addPropertyChangeListener(String property,
                                      PropertyChangeListener PCL)

removePropertyChangeListener

public void removePropertyChangeListener(String property,
                                         PropertyChangeListener PCL)

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(GenericDataElement otherGDE)
Specified by:
compareTo in interface Comparable<GenericDataElement>

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Specified by:
getTransferData in interface Transferable
Throws:
UnsupportedFlavorException
IOException

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Specified by:
isDataFlavorSupported in interface Transferable

setName

public void setName(String name)
set header name, called during GenericLog construction

Parameters:
name -

getName

public String getName()

getMaxValue

public double getMaxValue()

getMinValue

public double getMinValue()

getDisplayMinValue

public double getDisplayMinValue()

getDisplayMaxValue

public double getDisplayMaxValue()

setDisplayMaxValue

public void setDisplayMaxValue(double highValue)

setDisplayMinValue

public void setDisplayMinValue(double lowValue)

getDisplayColor

public Color getDisplayColor()

setDisplayColor

public void setDisplayColor(Color c)

getSplitNumber

public int getSplitNumber()

clearOut

public void clearOut()


Copyright © 2011 DIYEFI.org. All Rights Reserved.