Package rocca
Class RoccaSidePanel
java.lang.Object
PamguardMVC.PamObserverAdapter
rocca.RoccaSidePanel
- All Implemented Interfaces:
 PamObserver,PamSidePanel
- 
Nested Class Summary
Nested Classes - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpeciesTreeVotes(String sNum, double[] newTreeVotes) Finds the RoccaSightingDataUnit with the passed sighting number, and adds the tree votes to the running total.findSightingUnit(String sNum) Searches through the Sighting Data Block for the passed sighting number.intgetPanel()longgetRSDB()int[]Returns the classification counts for the current species listvoidincSpeciesCount(String sNum, int speciesToInc, double startTime, double dur, boolean isClick) Increments a specific species classification count serialVersionUID=15 2014/11/12 add start time to method, and pass to the RoccaSightingDataUnit.voidincSpeciesCount(String sNum, String speciesToInc, double startTime, double dur, boolean isClick) Increments a specific species classification count serialVersionUID=15 2014/11/12 add start time to method, and pass to the RoccaSightingDataUnit.voidreceiveSourceNotification(int type, Object object) Receive a notification from the data source - typically a change in DAQ status.voidvoidsetAutosaveFreq(int autosaveFreq) Note: this method changes the field, but does not update the timer.voidsetCurrentUnit(RoccaSightingDataUnit currentUnit) voidsetEndOfWhistle(long time, double freq) voidUpdates the Encounter ID text box to the current Rocca Parameters valuevoidUpdates the Known Species ID text box to the current Rocca Parameters valuevoidsetSpecies(String[] speciesAsString) Creates a new list of species and sets the counts to 0.voidsetSpeciesClassCount(int[] speciesClassCount) Sets all the species counts.voidsetStartOfWhistle(long time, double freq) voidMethods inherited from class PamguardMVC.PamObserverAdapter
addData, getObserverObject, masterClockUpdate, noteNewSettings, removeObservable, setSampleRate, updateData 
- 
Constructor Details
- 
RoccaSidePanel
 
 - 
 - 
Method Details
- 
getRSDB
 - 
setNewEncounterID
public void setNewEncounterID()Updates the Encounter ID text box to the current Rocca Parameters value - 
setNewSpeciesID
public void setNewSpeciesID()Updates the Known Species ID text box to the current Rocca Parameters value - 
getPanel
- Specified by:
 getPanelin interfacePamSidePanel- Returns:
 - Reference to a graphics component that can be added to the view. This will typically be a JPanel or a JInternalFrame; The component will be displayed to the side of the main tab control.
 
 - 
rename
- Specified by:
 renamein interfacePamSidePanel
 - 
getObserverName
- Specified by:
 getObserverNamein interfacePamObserver
 - 
receiveSourceNotification
Description copied from interface:PamObserverReceive a notification from the data source - typically a change in DAQ status. See the constants listed in AcquisitionProcess for potential change types.- Specified by:
 receiveSourceNotificationin interfacePamObserver- Overrides:
 receiveSourceNotificationin classPamObserverAdapter- Parameters:
 type- the type of changeobject- generic object added here so that we can include anything in the future
 - 
setSpecies
Creates a new list of species and sets the counts to 0. Repaints the sidepanel once the fields are updated- Parameters:
 speciesAsString- a string array of species names (max 5 characters). Note that "Ambig" is automatically added to the beginning of the list, and should note be included in the speciesAsString parameter.
 - 
updateSightingClass
public void updateSightingClass() - 
getSpeciesClassCount
public int[] getSpeciesClassCount()Returns the classification counts for the current species list- Returns:
 - an int array containing the classification counts
 
 - 
setSpeciesClassCount
public void setSpeciesClassCount(int[] speciesClassCount) Sets all the species counts.- Parameters:
 speciesClassCount- an int array with the counts for each species. The length of the array must match the length of the species list
 - 
findSightingUnit
Searches through the Sighting Data Block for the passed sighting number. If the sighting number is not found, a "-1" is returned- Parameters:
 sNum- The sighting number to search for- Returns:
 - The RoccaSightingDataUnit matching the sighting number passed, or a new RoccaSightingDataUnit if the sighting number wasn't found found
 
 - 
incSpeciesCount
public void incSpeciesCount(String sNum, int speciesToInc, double startTime, double dur, boolean isClick) Increments a specific species classification count serialVersionUID=15 2014/11/12 add start time to method, and pass to the RoccaSightingDataUnit. serialVersionUID = 22 2015/06/13 add duration and isClick flag to method- Parameters:
 sNum- the sighting number to incrementspeciesToInc- the index of the species to incrementstartTime- the time of the first data unit, in millisecondsdur- the duration of the detection, in millisecondsisClick- a flag indicating whether the detection is a click or not
 - 
incSpeciesCount
public void incSpeciesCount(String sNum, String speciesToInc, double startTime, double dur, boolean isClick) Increments a specific species classification count serialVersionUID=15 2014/11/12 add start time to method, and pass to the RoccaSightingDataUnit. serialVersionUID = 22 2015/06/13 add duration and click flag to method- Parameters:
 sNum- the sighting number to incrementspeciesToInc- the index of the species to incrementstartTime- the time of the first data unit, in millisecondsdur- the duration of the detection, in millisecondsisClick- a flag indicating whether the detection is a click or not
 - 
addSpeciesTreeVotes
Finds the RoccaSightingDataUnit with the passed sighting number, and adds the tree votes to the running total. If the sighting number is not found, a new RoccaSightingDataUnit is created. serialVersionUID=24 2016/08/10 also set boolean indicating that there's new data in the list, so that the ancillary variables are recalculated on the next save- Parameters:
 sNum- The sighting number to search fornewTreeVotes- An array of tree votes
 - 
getSightingNum
 - 
setStartOfWhistle
public void setStartOfWhistle(long time, double freq)  - 
setEndOfWhistle
public void setEndOfWhistle(long time, double freq)  - 
getAutosaveFreq
public int getAutosaveFreq() - 
setAutosaveFreq
public void setAutosaveFreq(int autosaveFreq) Note: this method changes the field, but does not update the timer. In order to adjust the period the old timer would need to be deleted and a new timer started. Could also use a ScheduledThreadPoolExecutor...- Parameters:
 autosaveFreq-
 - 
setCurrentUnit
 - 
getRequiredDataHistory
- Specified by:
 getRequiredDataHistoryin interfacePamObserver- Overrides:
 getRequiredDataHistoryin classPamObserverAdapter- Parameters:
 arg- optional argument from PamObservable- Returns:
 - time in milliseconds required by data held in PamObservable
 
 
 -