org.hackystat.projectbrowser.page.trajectory.datapanel
Class SelectableTrajectoryStream

java.lang.Object
  extended by org.hackystat.projectbrowser.page.trajectory.datapanel.SelectableTrajectoryStream
All Implemented Interfaces:
java.io.Serializable

public class SelectableTrajectoryStream
extends java.lang.Object
implements java.io.Serializable

Group a selected flag with a TelemetryStream, so that this instance can be flaged as selected or not.

Author:
Shaoxuan, Pavel Senin.
See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Support serialization.
 
Constructor Summary
SelectableTrajectoryStream(org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream telemetryStream)
          Constructor.
SelectableTrajectoryStream(org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream stream, java.lang.Integer indent)
          Constructor.
 
Method Summary
 java.lang.String getBackgroundColorValue()
          Returns a background-color attribute with the value of color.
 double getBlankLength()
           
 java.lang.String getColor()
           
 java.lang.Integer getIndent()
          Get the indent.
 double getLineLength()
           
 java.lang.String getMarker()
           
 java.lang.String getMarkerImageUrl()
          Return a image url that shows only one marker.
 double getMaximum()
           
 double getMinimum()
           
 java.util.List<java.lang.Double> getNormalizedStreamData()
          Get the stream data.
 java.util.List<java.lang.Double> getStreamData()
          Get the stream data.
 java.util.List<java.lang.Double> getStreamData(java.lang.Integer maxStreamLength)
          Get the stream data.
 org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream getTelemetryStream()
           
 double getThickness()
           
 java.lang.String getUnitName()
          Return the Units of this stream.
 boolean isEmpty()
           
 boolean isSelected()
           
 void setBlankLength(double blankLength)
           
 void setColor(java.lang.String color)
           
 void setIndent(java.lang.Integer indent)
          Set the indent.
 void setLineLength(double lineLength)
           
 void setMarker(java.lang.String marker)
           
 void setSelected(boolean selected)
           
 void setTelemetryStream(org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream telemetryStream)
           
 void setThickness(double thickness)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Support serialization.

See Also:
Constant Field Values
Constructor Detail

SelectableTrajectoryStream

public SelectableTrajectoryStream(org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream telemetryStream)
Constructor.

Parameters:
telemetryStream - the TelemetryStream of this instance.

SelectableTrajectoryStream

public SelectableTrajectoryStream(org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream stream,
                                  java.lang.Integer indent)
Constructor.

Parameters:
stream - The telemetry stream.
indent - The indent value.
Method Detail

setSelected

public void setSelected(boolean selected)
Parameters:
selected - the selected to set

isSelected

public boolean isSelected()
Returns:
the selected

setTelemetryStream

public void setTelemetryStream(org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream telemetryStream)
Parameters:
telemetryStream - the telemetryStream to set

getTelemetryStream

public org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryStream getTelemetryStream()
Returns:
the telemetryStream

setColor

public void setColor(java.lang.String color)
Parameters:
color - the color to set

getColor

public java.lang.String getColor()
Returns:
the color

getBackgroundColorValue

public java.lang.String getBackgroundColorValue()
Returns a background-color attribute with the value of color.

Returns:
The background-color key-value pair.

setMarker

public void setMarker(java.lang.String marker)
Parameters:
marker - the marker to set

getMarker

public java.lang.String getMarker()
Returns:
the marker

isEmpty

public boolean isEmpty()
Returns:
the isEmpty

getMaximum

public double getMaximum()
Returns:
the maximum

getMinimum

public double getMinimum()
Returns:
the minimum

setThickness

public void setThickness(double thickness)
Parameters:
thickness - the thickness to set

getThickness

public double getThickness()
Returns:
the thickness

setLineLength

public void setLineLength(double lineLength)
Parameters:
lineLength - the lineLength to set

getLineLength

public double getLineLength()
Returns:
the lineLength

setBlankLength

public void setBlankLength(double blankLength)
Parameters:
blankLength - the blankLength to set

getBlankLength

public double getBlankLength()
Returns:
the blankLength

getStreamData

public final java.util.List<java.lang.Double> getStreamData(java.lang.Integer maxStreamLength)
Get the stream data.

Parameters:
maxStreamLength - The expected length of the list to plot. N/A points will be added to reach the length specified.
Returns:
the list of data of this stream

getNormalizedStreamData

public final java.util.List<java.lang.Double> getNormalizedStreamData()
Get the stream data.

Returns:
the list of data of this stream

getMarkerImageUrl

public java.lang.String getMarkerImageUrl()
Return a image url that shows only one marker. Using google chart to generate this image. there is an example output: http://chart.apis.google.com/chart? chs=20x20&cht=ls&chd=t:-1,1.0,-1&chds=0.9,1.1&chm=c,FF0000,0,-1,20.0

Returns:
the image url

getUnitName

public java.lang.String getUnitName()
Return the Units of this stream.

Returns:
String of the units.

getStreamData

public final java.util.List<java.lang.Double> getStreamData()
Get the stream data.

Returns:
the list of data of this stream

setIndent

public void setIndent(java.lang.Integer indent)
Set the indent.

Parameters:
indent - The indent value.

getIndent

public java.lang.Integer getIndent()
Get the indent.

Returns:
the indent value.