Package dataPlots
Class TDControl
java.lang.Object
userDisplay.UserDisplayComponentAdapter
dataPlots.TDControl
- All Implemented Interfaces:
PamSettings,SettingsNameProvider,UserDisplayComponent
-
Constructor Summary
ConstructorsConstructorDescriptionTDControl(TDParameters tdParameters) TDControl(TDParameters tdParameters, boolean registerSettings) TDControl(TDParameters tdParameters, boolean registerSettings, boolean showControlPanel) Create a new time display. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGraph()voidCalled when the component is removed from the display.Get a title for the frame the component will be added to.intGet the number of pixels in a time graph.Get the pause button.intlongbooleanCheck whether the time display has a control panel.booleanisViewer()voidvoidnotifyModelChanged(int changeType) Pick up model changed notifications from a parent user display.voidCalled when the component is first displayed.voidremoveGraph(int iGraph) Remove graph with given index.voidvoidrepaintAll(long millis) booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsetShowControlPanel(boolean showControlPanel) Set whether the graphs has a control panel, allowing panels etc to be added.voidsetShowGraphLabels(boolean show) Set whether graphs within the display show their label.voidSubscribe 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:
getComponentin interfaceUserDisplayComponent- Returns:
- The Swing component to add to the frame
-
openComponent
public void openComponent()Description copied from interface:UserDisplayComponentCalled when the component is first displayed.- Specified by:
openComponentin interfaceUserDisplayComponent- Overrides:
openComponentin classUserDisplayComponentAdapter
-
closeComponent
public void closeComponent()Description copied from interface:UserDisplayComponentCalled when the component is removed from the display.- Specified by:
closeComponentin interfaceUserDisplayComponent- Overrides:
closeComponentin classUserDisplayComponentAdapter
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:UserDisplayComponentPick up model changed notifications from a parent user display.- Specified by:
notifyModelChangedin interfaceUserDisplayComponent- Overrides:
notifyModelChangedin classUserDisplayComponentAdapter- Parameters:
changeType-
-
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:
getUnitNamein interfaceSettingsNameProvider- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitTypein interfacePamSettings- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReferencein interfacePamSettings- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersionin interfacePamSettings- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettingsin interfacePamSettings- Parameters:
pamControlledUnitSettings-- 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:UserDisplayComponentGet a title for the frame the component will be added to.- Specified by:
getFrameTitlein interfaceUserDisplayComponent- Overrides:
getFrameTitlein classUserDisplayComponentAdapter- Returns:
- a title for the components frame.
-