public class TDGraph
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
TDGraph.GraphPlotPanel |
Constructor and Description |
---|
TDGraph(TDControl tdControl,
int graphNumber) |
Modifier and Type | Method and Description |
---|---|
void |
addDataItem(TDDataInfo dataInfo)
Add a data item to be plotted on this display
|
void |
addDataItem(TDDataProvider dataProvider) |
void |
addPlotListener(PlotMouseAdapter plotMouseAdapater)
Add a mouse plot adapter to each panel on the graph.
|
void |
addPlotMouseListener(PlotMouseListener plotMouseListener)
Add a plot mouse listener.
|
void |
addPlotMouseMotionListener(PlotMouseMotionListener plotMouseMotionListener)
Add a plot mouse motion listener.
|
void |
addPlotZoomer(PlotZoomerAdapter plotZoomerAdapter)
Add a plot zoomer adapter to the graph.
|
void |
addSelectedDataUnit(java.util.ArrayList<FoundDataUnit> pamDataUnits)
Add a list of data units to the end current selected data units.
|
void |
addSelectedDataUnit(FoundDataUnit pamDataUnit)
Add a selected data unit to the current selected data unit list.
|
void |
checkAxis() |
void |
clearSelectedDataUnits()
Clear all selected data units.
|
int |
getAxisExtent(java.awt.Graphics g) |
CompoundHidingDialog |
getCompoundHidingDialog()
Get the hiding panel which contains settings for all the current datablocks associated with the graph.
|
java.util.ArrayList<TDDataInfo> |
getDataList()
List containing info on data units which can be displayed on the graph.
|
java.lang.String |
getDataNamesForAxis(java.lang.String axisName)
Get a list of data sources that can provide data to the
given axis name.
|
PamAxis |
getGraphAxis() |
java.lang.String |
getGraphLabel() |
int |
getGraphNumber() |
PamPanel |
getGraphOuterPanel() |
GraphParameters |
getGraphParameters() |
TDGraph.GraphPlotPanel |
getGraphPlotPanel(int iPanel) |
int |
getNumPlotPanels()
Get the total number of graph plot panels.
|
int |
getNumPlotZoomers()
Get the number of PlotZoomerAdapters associated with this graph
|
PlotZoomerAdapter |
getPlotZoomer(int i)
Get a zoomer for this graph.
|
java.util.ArrayList<FoundDataUnit> |
getSelectedDataUnits()
Get selected data units for this graph.
|
TDControl |
getTdControl() |
int |
getTimePixels()
get the number of pixels on the time axis of a plot
|
boolean |
hasAvailableAxisName(java.lang.String units) |
void |
layoutGraph()
Can be called at any time the orientation changes to
re-do the layout of the graph windows.
|
void |
listAvailableAxisNames()
Sort out the list of availableDataUnits
and anything else that needs doing once
data are added or removed.
|
void |
notifyModelChanged(int changeType)
Get notifications from the main controller.
|
GraphParameters |
prepareGraphParameters()
A bit different to the standard getter in that this
only gets called just before teh configuration is
serialized into the psf.
|
boolean |
removeAllPlotMouseListeners()
Remove all plot mouse listeners from the tdgraph.
|
boolean |
removeAllPlotMouseMotionListeners()
Remove all plot mouse motion listeners from the tdGraph.
|
void |
removeAllZoomers()
Clear all the zoomers associated with this graph
|
void |
removeDataItem(TDDataInfo dataInfo)
Remove a data item from the plot list.
|
void |
removeGraph() |
void |
removeListDuplicates(java.util.ArrayList<FoundDataUnit> selectedDataUnits)
Check for duplicate values in the selected data units and delete.
|
boolean |
removePlotMouseListener(PlotMouseListener plotMouseListener)
Remove a plot mouse listener.
|
boolean |
removePlotMouseMotionListener(PlotMouseMotionListener plotMouseMotionListener)
Remove a plot mouse motion listener.
|
void |
repaint(long millis)
Repaint all graph components.
|
void |
selectDataLine(TDDataInfo dataInfo,
DataLineInfo dataLine)
Called when the user selects a specific data line for a specific
data type.
|
void |
setAxisName(java.lang.String axisName)
Called when the user sets the type of axis units.
|
void |
setGraphParameters(GraphParameters graphParameters)
This only gets called when the serialised settings from psf file
have been loaded, not at any other time !
|
void |
setNumberOfPlots(int numPlots)
Set the number of plots within the graph.
|
void |
setSelectedDataUnits(java.util.ArrayList<FoundDataUnit> selectedDataUnits)
Set selected data units for the graph.
|
void |
setShowTopLabel(boolean showTopLabel)
Set whether to show a top label for this graph.
|
void |
setTopPanel(PamPanel topPanel)
Set a panel at the top of the graph;
|
void |
showOptionsDialog(TDDataInfo dataInfo)
Show the options dialog for a particular data type
|
void |
subscribeScrollDataBlocks(PamScroller timeScroller)
Subscribe data blocks to the time scroller system
so their data get loaded in viewer mode.
|
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 TDGraph(TDControl tdControl, int graphNumber)
public void addPlotListener(PlotMouseAdapter plotMouseAdapater)
plotMouseAdapater-
- an extension of MouseAdapter desgined for primarily for picking detections on a graph, however maybe extended to many other functions.public void addPlotZoomer(PlotZoomerAdapter plotZoomerAdapter)
plotZoomerAdapter
- - plot zoomer adapter.public void removeAllZoomers()
public PlotZoomerAdapter getPlotZoomer(int i)
i
- which zoomer to getpublic int getNumPlotZoomers()
public void setTopPanel(PamPanel topPanel)
topPanel
- public void addDataItem(TDDataProvider dataProvider)
public void addDataItem(TDDataInfo dataInfo)
dataInfo
- item to addpublic void removeGraph()
public void removeDataItem(TDDataInfo dataInfo)
dataInfo
- item to remove.public void listAvailableAxisNames()
public boolean hasAvailableAxisName(java.lang.String units)
public void checkAxis()
public java.lang.String getGraphLabel()
public void layoutGraph()
public int getAxisExtent(java.awt.Graphics g)
public PamPanel getGraphOuterPanel()
public int getNumPlotPanels()
public TDGraph.GraphPlotPanel getGraphPlotPanel(int iPanel)
iPanel
- index of the panel.public int getGraphNumber()
public PamAxis getGraphAxis()
public void subscribeScrollDataBlocks(PamScroller timeScroller)
timeScroller
- public void notifyModelChanged(int changeType)
changeType
- public java.util.ArrayList<TDDataInfo> getDataList()
public java.lang.String getDataNamesForAxis(java.lang.String axisName)
axisName
- public void setAxisName(java.lang.String axisName)
unitsType
- public void setNumberOfPlots(int numPlots)
numPlots
- number of plots to show.public void selectDataLine(TDDataInfo dataInfo, DataLineInfo dataLine)
dataInfo
- dataLine
- public GraphParameters getGraphParameters()
public GraphParameters prepareGraphParameters()
public void setGraphParameters(GraphParameters graphParameters)
graphParameters
- the graphParameters to setpublic void showOptionsDialog(TDDataInfo dataInfo)
dataInfo
- public TDControl getTdControl()
public int getTimePixels()
public void timeScrollValueChanged(long valueMillis)
valueMillis
- new scroll value in millispublic void timeScrollRangeChanged(long minimumMillis, long maximumMillis)
minimumMillis
- new minimum in millismaximumMillis
- new maximum in millis.public void repaint(long millis)
millis
- paint delaypublic void timeRangeSpinnerChange(double oldValue, double newValue)
oldValue
- old value (seconds)newValue
- new value (seconds)public void addPlotMouseListener(PlotMouseListener plotMouseListener)
plotMouseListener
- public boolean removePlotMouseListener(PlotMouseListener plotMouseListener)
plotMouseListener
- public void addPlotMouseMotionListener(PlotMouseMotionListener plotMouseMotionListener)
plotMouseMotionListener
- public boolean removePlotMouseMotionListener(PlotMouseMotionListener plotMouseMotionListener)
plotMouseMotionListener
- public boolean removeAllPlotMouseMotionListeners()
public boolean removeAllPlotMouseListeners()
public void setShowTopLabel(boolean showTopLabel)
showTopLabel
- - true to show top labelpublic java.util.ArrayList<FoundDataUnit> getSelectedDataUnits()
public void setSelectedDataUnits(java.util.ArrayList<FoundDataUnit> selectedDataUnits)
selectedDataUnits.
- Data units, which, if displayed, will be highlighted.public void clearSelectedDataUnits()
public void addSelectedDataUnit(FoundDataUnit pamDataUnit)
pamDataUnit
- public void addSelectedDataUnit(java.util.ArrayList<FoundDataUnit> pamDataUnits)
pamDataUnits
- public void removeListDuplicates(java.util.ArrayList<FoundDataUnit> selectedDataUnits)
public CompoundHidingDialog getCompoundHidingDialog()