public class RoccaSidePanel extends java.lang.Object implements PamSidePanel, PamObserver
Modifier and Type | Class and Description |
---|---|
class |
RoccaSidePanel.SidePanel |
Constructor and Description |
---|
RoccaSidePanel(RoccaControl roccaControl) |
Modifier and Type | Method and Description |
---|---|
void |
addSpeciesTreeVotes(java.lang.String sNum,
double[] newTreeVotes)
Finds the RoccaSightingDataUnit with the passed sighting number, and adds
the tree votes to the running total.
|
RoccaSightingDataUnit |
findSightingUnit(java.lang.String sNum)
Searches through the Sighting Data Block for the passed sighting number.
|
int |
getAutosaveFreq() |
java.lang.String |
getObserverName() |
PamObserver |
getObserverObject() |
javax.swing.JComponent |
getPanel() |
long |
getRequiredDataHistory(PamObservable o,
java.lang.Object arg) |
RoccaSightingDataBlock |
getRSDB() |
java.lang.String |
getSightingNum() |
int[] |
getSpeciesClassCount()
Returns the classification counts for the current species list
|
void |
incSpeciesCount(java.lang.String sNum,
int speciesToInc,
double startTime)
Increments a specific species classification count
serialVersionUID=15 2014/11/12 add start time to method, and pass
to the RoccaSightingDataUnit.
|
void |
incSpeciesCount(java.lang.String sNum,
java.lang.String speciesToInc,
double startTime)
Increments a specific species classification count
serialVersionUID=15 2014/11/12 add start time to method, and pass
to the RoccaSightingDataUnit.
|
void |
masterClockUpdate(long milliSeconds,
long sampleNumber) |
void |
noteNewSettings() |
void |
removeObservable(PamObservable o)
called when an Observable (PamDataBlock) is removed from the system
|
void |
rename(java.lang.String newName) |
void |
setAutosaveFreq(int autosaveFreq)
Note: this method changes the field, but does not update the timer.
|
void |
setCurrentUnit(RoccaSightingDataUnit currentUnit) |
void |
setEndOfWhistle(long time,
double freq) |
void |
setSampleRate(float sampleRate,
boolean notify)
New sample rate
|
void |
setSpecies(java.lang.String[] speciesAsString)
Creates a new list of species and sets the counts to 0.
|
void |
setSpeciesClassCount(int[] speciesClassCount)
Sets all the species counts.
|
void |
setStartOfWhistle(long time,
double freq) |
void |
update(PamObservable o,
PamDataUnit arg)
Informs the PamObserver that new data have been added to the Observable
class
|
void |
updateSightingClass() |
public RoccaSidePanel(RoccaControl roccaControl)
public RoccaSightingDataBlock getRSDB()
public PamObserver getObserverObject()
getObserverObject
in interface PamObserver
public javax.swing.JComponent getPanel()
getPanel
in interface PamSidePanel
public void rename(java.lang.String newName)
rename
in interface PamSidePanel
public java.lang.String getObserverName()
getObserverName
in interface PamObserver
public void setSpecies(java.lang.String[] speciesAsString)
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.public void updateSightingClass()
public int[] getSpeciesClassCount()
public void setSpeciesClassCount(int[] speciesClassCount)
speciesClassCount
- an int array with the counts for each species.
The length of the array must match the length of the species listpublic RoccaSightingDataUnit findSightingUnit(java.lang.String sNum)
sNum
- The sighting number to search forpublic void incSpeciesCount(java.lang.String sNum, int speciesToInc, double startTime)
sNum
- the sighting number to incrementspeciesToInc
- the index of the species to incrementstartTime
- the time of the first data unit, in millisecondspublic void incSpeciesCount(java.lang.String sNum, java.lang.String speciesToInc, double startTime)
sNum
- the sighting number to incrementspeciesToInc
- the index of the species to incrementstartTime
- the time of the first data unit, in millisecondspublic void addSpeciesTreeVotes(java.lang.String sNum, double[] newTreeVotes)
sNum
- The sighting number to search fornewTreeVotes
- An array of tree votespublic java.lang.String getSightingNum()
public void setStartOfWhistle(long time, double freq)
public void setEndOfWhistle(long time, double freq)
public int getAutosaveFreq()
public void setAutosaveFreq(int autosaveFreq)
autosaveFreq
- public void setCurrentUnit(RoccaSightingDataUnit currentUnit)
public long getRequiredDataHistory(PamObservable o, java.lang.Object arg)
getRequiredDataHistory
in interface PamObserver
o
- PamObservable class requiring the dataarg
- optional argument from PamObservablepublic void noteNewSettings()
noteNewSettings
in interface PamObserver
public void removeObservable(PamObservable o)
PamObserver
removeObservable
in interface PamObserver
public void setSampleRate(float sampleRate, boolean notify)
PamObserver
setSampleRate
in interface PamObserver
notify
- Notify other PamObservers and PamObservables in the chain.public void masterClockUpdate(long milliSeconds, long sampleNumber)
masterClockUpdate
in interface PamObserver
public void update(PamObservable o, PamDataUnit arg)
PamObserver
update
in interface PamObserver
o
- Reference to the Observable (a PamDataBlock)arg
- Reference to the new PamDataUnit