public abstract class TDDataInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNITS_ANGLE |
static java.lang.String |
UNITS_TEMPERATURE |
Constructor and Description |
---|
TDDataInfo(TDDataProvider tdDataProvider,
TDGraph tdGraph,
PamDataBlock pamDataBlock) |
Modifier and Type | Method and Description |
---|---|
void |
addDataUnits(DataLineInfo dataLineInfo)
Add a type of data unit to the list.
|
void |
clearDraw()
Clear any residual drawing objects that get held between calls,
e.g.
|
void |
drawData(int plotNumber,
java.awt.Graphics g,
java.awt.Rectangle windowRect,
int orientation,
PamAxis timeAxis,
long scrollStart,
PamAxis graphAxis)
Paint data into the graphics window.
|
java.awt.Polygon |
drawDataUnit(PamDataUnit pamDataUnit,
java.awt.Graphics g,
java.awt.Rectangle windowRect,
int orientation,
PamAxis timeAxis,
long scrollStart,
PamAxis yAxis,
int type)
Draw a data unit.
|
void |
drawHighLightData(int plotNumber,
java.awt.Graphics g,
java.awt.Rectangle windowRect,
int orientation,
PamAxis timeAxis,
long scrollStart,
PamAxis graphAxis)
Draw highlighted data.
|
boolean |
editOptions(java.awt.Window frame)
Edit options - generally involves throwing up a
dialog of some sort.
|
DataLineInfo |
getCurrentDataLine() |
int |
getCurrentDataLineIndex() |
PamDataBlock |
getDataBlock()
Get the datablock for this information
|
int |
getDataDimensions() |
java.util.ArrayList<DataLineInfo> |
getDataLineInfos()
Short string names of the dimensions of the data.
|
java.lang.String |
getDataName()
A longer data name, more descriptive than the data units.
|
TDDataProvider |
getDataProvider() |
abstract java.lang.Double |
getDataValue(PamDataUnit pamDataUnit)
Gets a value for a specific data unit which should be in the
same units as the scale information.
|
TDScaleInformation |
getFixedScaleInformation(int orientation) |
HidingDialogComponent |
getHidingDialogComponent()
Return a hiding dialog component which will get incorporated into
a larger tabbed sliding dialog.
|
TDScaleInformation |
getScaleInformation(int orientation,
boolean autoScale) |
java.lang.String |
getShortName()
Get a shorter name for use in displays.
|
java.io.Serializable |
getStoredSettings()
Get an object that will be packed up with the serialised settings
when information about a plot get's stored.
|
abstract TDSymbolChooser |
getSymbolChooser() |
TDGraph |
getTdGraph() |
java.lang.String |
getToolTipText(PamDataUnit pamDataUnit) |
boolean |
hasAxisName(java.lang.String axisName) |
boolean |
hasOptions()
Has options that will result in a dialog.
|
boolean |
isShowing() |
void |
notifyModelChanged(int changeType)
Get notifications from the main controller.
|
void |
removeData()
Called whenever a data line is removed from a graph, or when a graph is removed from
a plot.
|
void |
selectDataLine(DataLineInfo dataLine)
Called when the user selects a specific data line
|
boolean |
setCurrentAxisName(java.lang.String axisName)
Set the current data units - this must be a String which
matches one of the strings in dataLineInfos() or all will
go horribly wrong.
|
void |
setFixedScaleInformation(TDScaleInformation fixedScaleInformation) |
void |
setShowing(boolean isShowing)
Set whether or not it's showing in current graph window.
|
boolean |
setStoredSettings(java.io.Serializable storedSettings)
Set settings which have been read back from storage (the psf file).
|
void |
timeRangeSpinnerChange(double oldValue,
double newValue)
Called when the time range spinner on the main display panel changes.
|
void |
timeScrollRangeChanged(long minimumMillis,
long maximumMillis)
Called in viewer mode when the time scroll range moves.
|
void |
timeScrollValueChanged(long valueMillis)
Called in viewer mode when the time scroller moves.
|
public static final java.lang.String UNITS_ANGLE
public static final java.lang.String UNITS_TEMPERATURE
public TDDataInfo(TDDataProvider tdDataProvider, TDGraph tdGraph, PamDataBlock pamDataBlock)
public PamDataBlock getDataBlock()
public abstract java.lang.Double getDataValue(PamDataUnit pamDataUnit)
pamDataUnit
- public java.util.ArrayList<DataLineInfo> getDataLineInfos()
public void addDataUnits(DataLineInfo dataLineInfo)
unitType
- String name of the data unit.public boolean setCurrentAxisName(java.lang.String axisName)
AxisName
- public boolean hasAxisName(java.lang.String axisName)
axisName
- public DataLineInfo getCurrentDataLine()
public final java.lang.String getDataName()
public java.lang.String getShortName()
public final TDDataProvider getDataProvider()
public TDScaleInformation getScaleInformation(int orientation, boolean autoScale)
orientation
- public TDScaleInformation getFixedScaleInformation(int orientation)
public void setFixedScaleInformation(TDScaleInformation fixedScaleInformation)
fixedScaleInformation
- the fixedScaleInformation to setpublic int getDataDimensions()
public abstract TDSymbolChooser getSymbolChooser()
public java.lang.String getToolTipText(PamDataUnit pamDataUnit)
pamDataUnit
- data unitpublic void clearDraw()
public void drawData(int plotNumber, java.awt.Graphics g, java.awt.Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis graphAxis)
plotNumber
- plot numberg
- graphicswindowRect
- Window rectangle to draw inorientation
- orientationpamAxis
- scroll start time in millisecondstScale
- time scale in pixels per millisecond.graphAxis
- graph data axis for scaling.public void drawHighLightData(int plotNumber, java.awt.Graphics g, java.awt.Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis graphAxis)
plotNumber
- g
- windowRect
- orientation
- timeAxis
- scrollStart
- graphAxis
- public java.awt.Polygon drawDataUnit(PamDataUnit pamDataUnit, java.awt.Graphics g, java.awt.Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis yAxis, int type)
pamDataUnit
- data unit to drawg
- graphics handle to draw onwindowRect
- orientation
- orientation of the displaytimeAxis
- start time of the displaytimeScale
- timescale in pixels per millisecondyAxis
- yAxis (used for scale information for the data point)type
- flag for which type of symbol to draw. e.g normal or highlighted.public void selectDataLine(DataLineInfo dataLine)
dataLine
- public int getCurrentDataLineIndex()
public boolean hasOptions()
public boolean editOptions(java.awt.Window frame)
public HidingDialogComponent getHidingDialogComponent()
public TDGraph getTdGraph()
public java.io.Serializable getStoredSettings()
public boolean setStoredSettings(java.io.Serializable storedSettings)
storedSettings
- public void removeData()
public void timeScrollValueChanged(long valueMillis)
Most data won't need to do anything here since they are already subscribed to the scroller and will get their data loaded from psf automatically.
valueMillis
- new scroll value in millispublic void timeScrollRangeChanged(long minimumMillis, long maximumMillis)
Most data won't need to do anything here since they are already subscribed to the scroller and will get their data loaded from psf automatically.
minimumMillis
- new minimum in millismaximumMillis
- new maximum in millis.public void setShowing(boolean isShowing)
isShowing
- public boolean isShowing()
public void timeRangeSpinnerChange(double oldValue, double newValue)
oldValue
- old value (seconds)newValue
- new value (seconds)public void notifyModelChanged(int changeType)
changeType
-