public class RoccaSpecPopUp
extends javax.swing.JPanel
Modifier and Type | Field and Description |
---|---|
static int |
AXIS_SIZE |
static boolean |
CONTOUROFF
constant indicating the contour should be turned off
|
static boolean |
CONTOURON
constant indicating the contour should be turned on
|
static boolean |
RETURNFLOAT
constant indicating the getXPosition or getYPosition method should
return a float
|
static boolean |
RETURNINT
constant indicating the getXPosition or getYPosition method should
return an int
|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
RoccaSpecPopUp(double[][] d,
java.lang.String title)
Dummy constructor - only used to test display
|
RoccaSpecPopUp(RoccaProcess roccaProcess,
FFTDataBlock fftDataBlock,
double boxBotFreq,
double boxTopFreq,
PamRawDataBlock rawData,
SpectrogramDisplay display,
int channel) |
Modifier and Type | Method and Description |
---|---|
java.awt.Point[] |
getContour() |
boolean |
getContourState() |
double[][] |
getData() |
java.io.File |
getDataBlockFilename(RoccaContourDataBlock rcdb,
java.lang.String ext)
Generates a filename for the wav clip and the csv file containing the
contour points, based on the filename template stored in RoccaParameters
|
SpectrogramPanel |
getDataPanel() |
java.awt.Point |
getDragPoint() |
RoccaAxis |
getFreqAxis() |
double[] |
getFreqBins() |
double |
getHighPassFreq() |
double |
getLowPassFreq() |
static int |
getNumDetections() |
long[] |
getTimeBins() |
java.util.ArrayList<java.awt.Point> |
getUserPoints() |
static void |
incNumDetections() |
static void |
main(java.lang.String[] args)
Method for testing RoccaSpecPopUp
|
void |
run()
Launch this RoccaSpecPopUp in its own JFrame.
|
boolean |
saveContourPoints()
Saves the contour points in the datablock in a csv file.
|
boolean |
saveContourStats()
Saves all contour stats to the contour stats summary file, as defined in
the Rocca Parameters.
|
void |
setInitialPosition()
Sets the initial position of the vertical scrollbar to center the user-
selected area in the display window
|
static void |
setNumDetections(int numDetections) |
boolean |
showPeaks() |
boolean |
tracingNow() |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
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, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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
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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int AXIS_SIZE
public static final boolean CONTOUROFF
public static final boolean CONTOURON
public static final boolean RETURNINT
public static final boolean RETURNFLOAT
public RoccaSpecPopUp(double[][] d, java.lang.String title)
d
- title
- public RoccaSpecPopUp(RoccaProcess roccaProcess, FFTDataBlock fftDataBlock, double boxBotFreq, double boxTopFreq, PamRawDataBlock rawData, SpectrogramDisplay display, int channel)
roccaProcess
- fftDataBlock
- startFreq
- endFreq
- rawData
- display
- channel
- public boolean saveContourPoints()
Note that this method has now (as of 2012/08/12) been duplicated in RoccaProcess in order to accomodate data from the Whistle & Moan detector. It should be deleted from RoccaSpecPopUp at some point in the future
roccaContourDataBlock
- the datablock containing the selected
whistle contourpublic java.io.File getDataBlockFilename(RoccaContourDataBlock rcdb, java.lang.String ext)
rcdb
- The RoccaContourDataBlock containing the data to saveext
- The filename extension (wav or csv)public boolean saveContourStats()
Note that this method has now (as of 2012/08/12) been duplicated in RoccaProcess in order to accomodate data from the Whistle & Moan detector. It should be deleted from RoccaSpecPopUp at some point in the future
public void run()
public void setInitialPosition()
public boolean showPeaks()
public java.awt.Point[] getContour()
public double[][] getData()
public java.awt.Point getDragPoint()
public boolean tracingNow()
public java.util.ArrayList<java.awt.Point> getUserPoints()
public boolean getContourState()
public static int getNumDetections()
public static void setNumDetections(int numDetections)
public static void incNumDetections()
public double[] getFreqBins()
public long[] getTimeBins()
public SpectrogramPanel getDataPanel()
public RoccaAxis getFreqAxis()
public double getHighPassFreq()
public double getLowPassFreq()
public static void main(java.lang.String[] args)
Requires a csv file containing the FFT data to be displayed, with no header. Size of file is hard-coded in the specData variable. Note that this is commented out, along with the Csvreader import, because it was throwing an error when compiled. To use this test, uncomment the reader section and the csvreader import at the top.