Package dataPlots
Class TDControl
java.lang.Object
userDisplay.UserDisplayComponentAdapter
dataPlots.TDControl
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
,UserDisplayComponent
-
Constructor Summary
ConstructorDescriptionTDControl
(TDParameters tdParameters) TDControl
(TDParameters tdParameters, boolean registerSettings) TDControl
(TDParameters tdParameters, boolean registerSettings, boolean showControlPanel) Create a new time display. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGraph()
void
Called when the component is removed from the display.Get a title for the frame the component will be added to.int
Get the number of pixels in a time graph.Get the pause button.int
long
boolean
Check whether the time display has a control panel.boolean
isViewer()
void
void
notifyModelChanged
(int changeType) Pick up model changed notifications from a parent user display.void
Called when the component is first displayed.void
removeGraph
(int iGraph) Remove graph with given index.void
void
repaintAll
(long millis) boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setShowControlPanel
(boolean showControlPanel) Set whether the graphs has a control panel, allowing panels etc to be added.void
setShowGraphLabels
(boolean show) Set whether graphs within the display show their label.void
Subscribe datablocks to the time scroller.Methods inherited from class userDisplay.UserDisplayComponentAdapter
getUniqueName, setUniqueName
-
Constructor Details
-
TDControl
-
TDControl
-
TDControl
Create a new time display.- Parameters:
tdParameters
- - time display paramaters.registerSettings
- - register settings or not.showControlPanel
- - show a control panel on the graph allowing users to add/remnove panels.
-
TDControl
public TDControl()
-
-
Method Details
-
subscribeScrollDataBlocks
public void subscribeScrollDataBlocks()Subscribe datablocks to the time scroller.
seems like a daft call sequence, but the time scroller will only hold one copy of each block, so if a block is removed, it may be that it shouldn't be removed - so easer just to remake the entire list every time -
layoutGraphs
public void layoutGraphs() -
createScroller
-
getComponent
- Specified by:
getComponent
in interfaceUserDisplayComponent
- Returns:
- The Swing component to add to the frame
-
openComponent
public void openComponent()Description copied from interface:UserDisplayComponent
Called when the component is first displayed.- Specified by:
openComponent
in interfaceUserDisplayComponent
- Overrides:
openComponent
in classUserDisplayComponentAdapter
-
closeComponent
public void closeComponent()Description copied from interface:UserDisplayComponent
Called when the component is removed from the display.- Specified by:
closeComponent
in interfaceUserDisplayComponent
- Overrides:
closeComponent
in classUserDisplayComponentAdapter
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:UserDisplayComponent
Pick up model changed notifications from a parent user display.- Specified by:
notifyModelChanged
in interfaceUserDisplayComponent
- Overrides:
notifyModelChanged
in classUserDisplayComponentAdapter
-
getTdParameters
- Returns:
- the tdParameters
-
getTdAxes
- Returns:
- the tdAxes
-
getRunMode
public int getRunMode()- Returns:
- the runMode
-
getTimeScroller
- Returns:
- the pamScroller
-
getGraphs
- Returns:
- the graphs
-
repaintAll
public void repaintAll() -
repaintAll
public void repaintAll(long millis) -
getTimeRangeSpinner
- Returns:
- the timeRangeSpinner
-
addGraph
public void addGraph() -
removeGraph
public void removeGraph(int iGraph) Remove graph with given index.- Parameters:
iGraph
- graph index.
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-
isViewer
public boolean isViewer()- Returns:
- the isViewer
-
getDataObserver
-
getGraphTimePixels
public int getGraphTimePixels()Get the number of pixels in a time graph. All should be the same, so just grab the first one.- Returns:
- number of time pixels in the plots.
-
isShowControlPanel
public boolean isShowControlPanel()Check whether the time display has a control panel.- Returns:
- true if there is a control panel. False if not control panel is present.
-
setShowControlPanel
public void setShowControlPanel(boolean showControlPanel) Set whether the graphs has a control panel, allowing panels etc to be added.- Parameters:
showControlPanel
- - true to show a control panel.
-
setShowGraphLabels
public void setShowGraphLabels(boolean show) Set whether graphs within the display show their label. Generally this is only to save a little space.- Parameters:
show
- - true if graphs show a label describing graph on top right.
-
getPauseButton
Get the pause button.- Returns:
- the pause button for the graph.
-
getFrameTitle
Description copied from interface:UserDisplayComponent
Get a title for the frame the component will be added to.- Specified by:
getFrameTitle
in interfaceUserDisplayComponent
- Overrides:
getFrameTitle
in classUserDisplayComponentAdapter
- Returns:
- a title for the components frame.
-