Class RoccaSidePanel.SidePanel
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,ColorManaged
- Enclosing class:
RoccaSidePanel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddASighting
(boolean duplicatesOk) Ask the user for a new sighting number, and add it to the side paneladdASighting
(String newSNum) Add the new sighting number to the sidepanelvoid
Run the current Sighting through the classifier if available, or classify based on the total tree votes for each species serialVersionUID=24 2016/08/10 addedvoid
Creates a string containing the header information for the detection stats file serialVersionUID=15 2014/11/12 add time parameters to header serialVersionUID=22 2015/06/13 add overlap param to header and click/whistle count serialVersionUID=23 2016/01/04 removed spaces and paranethesis from header row, per ONR debrief doc serialVersionUID=24 2016/08/10 added latitude and longitude to output serialVersionUID=25 2017/04/10 added StartHr, PropWhists, PropClicks to output Note that RoccaClassifier.classifySighting searches the detectionHeader String for specific words.Creates a string containing the data for the passed detection.void
Delete a detection Currently untested and not attached to any buttonsvoid
void
enable/disable the sighting scroll buttons, depending on where we are in the sighting list 2019/11/25 add a check of the current data unit.void
Load the sighting information from an existing file.void
void
void
Rename the sighting number and the files with that sighting number as well.void
Saves the Encounter ID text to the Rocca Parametersvoid
Saves the Known Species ID text to the Rocca Parametersvoid
Save the sighting information immediatelyvoid
setBackground
(Color bg) Methods inherited from class PamView.panel.PamBorderPanel
addComponent, getColorId, setBorder
Methods inherited from class PamView.panel.PamPanel
getDefaultColor, getFrame, getPreferredBorderColours, layoutGrid, setDefaultColor
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
SidePanel
public SidePanel()
-
-
Method Details
-
setBackground
- Overrides:
setBackground
in classPamPanel
-
drawThePanel
public void drawThePanel() -
enableButtons
public void enableButtons()enable/disable the sighting scroll buttons, depending on where we are in the sighting list 2019/11/25 add a check of the current data unit. If it's been loaded from an old encounter stats file, don't let the user try to reclassify it. 2021/05/11 also disable the classify sightings button if we don't have any classifiers loaded -
prevSighting
public void prevSighting() -
nextSighting
public void nextSighting() -
clearSpeciesCount
public void clearSpeciesCount() -
renameSightingAndFiles
public void renameSightingAndFiles()Rename the sighting number and the files with that sighting number as well. This routine sets the current sighting number to NONE, and then calls the addASighting method. Since the current sighting number is NONE, addASighting will simply change the text of the current sighting instead of creating a whole new sighting. -
saveSighting
public void saveSighting()Save the sighting information immediately -
classifySighting
public void classifySighting()Run the current Sighting through the classifier if available, or classify based on the total tree votes for each species serialVersionUID=24 2016/08/10 added -
createDetectionStatsHeader
Creates a string containing the header information for the detection stats file serialVersionUID=15 2014/11/12 add time parameters to header serialVersionUID=22 2015/06/13 add overlap param to header and click/whistle count serialVersionUID=23 2016/01/04 removed spaces and paranethesis from header row, per ONR debrief doc serialVersionUID=24 2016/08/10 added latitude and longitude to output serialVersionUID=25 2017/04/10 added StartHr, PropWhists, PropClicks to output Note that RoccaClassifier.classifySighting searches the detectionHeader String for specific words. If the text ever changes here, it must be updated in the RoccaClassifier as well.- Returns:
- a String containing the header
-
createDetectionStatsString
Creates a string containing the data for the passed detection. The data includes the detection number, the counts for the current species list, the tree votes for the current species list, a species list combined into a single column as a double-check against the column headers (in case the classifier has changed), and finally the detection classificationNote that the
loadSighting()
method reads in the sighting stats information in the same order as shown here; if this format is changed, the loadSighting() method must be changed as well.serialVersionUID=15 2014/11/12 tell the data unit to calculate the time params and include them in the output
serialVersionUID=22 2015/06/13 add overlap param to the timeParams list, and split into separate calls for whistles and clicks. serialVersionUID=24 2016/08/10 check if this encounter was originally loaded from a saved file. If so, just use the data that was recovered from it during the load (since all the underlying data necessary to calculate the ancillary variables is lost) Also, add latitude and longitude
- Parameters:
unit
- the RoccaSightingDataUnit to get the data from- Returns:
- a string containing the current detection data
-
loadSighting
public void loadSighting()Load the sighting information from an existing file. Note that this method assumes the csv file has the same format as the one specified in the(RoccaSightingDataUnit unit) createDetectionStatsString
method. If the format in that method is ever changed, it should be changed here as well. Note also that this method does not check the existing datablock for duplicate sighting numbers. Since (at the moment) this method is only called to load a file when Pamguard starts and the datablock is empty, this isn't a problem.serialVersionUID=15 2014/11/12 include the time parameters THIS WAS NOT DONE!!!!! serialVersionUID=22 2015/06/13 include the time parameters (for real this time). Note that we don't load the time parameters, because there is no where to save them. We calculate them whenever we save the sighting stats files based on the start time and duration for each whistle in the sighting. THAT'S really the information we should save, but it would triple the memory requirements. For this method, we just need to skip over them in order to properly load the species tally and tree votes. serialVersionUID=24 2016/08/10 added the lat invalid input: '&' long parameters, so increased the column count by 2
-
deleteSighting
public void deleteSighting()Delete a detection Currently untested and not attached to any buttons -
addASighting
Ask the user for a new sighting number, and add it to the side panel- Parameters:
duplicatesOk
- Boolean indicating whether or not it's ok to use duplicate sighting numbers- Returns:
- the new sighting number
-
addASighting
Add the new sighting number to the sidepanel- Parameters:
newSNum
- the new sighting number to be used- Returns:
- the sighting number
-
saveNewEncounterID
public void saveNewEncounterID()Saves the Encounter ID text to the Rocca Parameters -
saveNewSpeciesID
public void saveNewSpeciesID()Saves the Known Species ID text to the Rocca Parameters
-