Package Spectrogram
Class DirectDrawProjector
Spectrgoram projector for drawing directly onto the spectrogram display.
Unlike the SpectroramProjector, which maps pixels 1:1, this projector needs the scales of the display since it draws directly onto the AWT component.
- Author:
- Doug Gillespie
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class PamView.GeneralProjector
GeneralProjector.ParameterType, GeneralProjector.ParameterUnits -
Field Summary
Fields inherited from class PamView.GeneralProjector
NPARAMETERS, viewer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoord3d(double timeMillis, double freqHz, double d3) Function ultimately used by a PamDataBlock to convert it's own data, in whatever form that is in into screen coordinates.getCoord3d(Coordinate3d dataValues) Same as getCoordinate3d but using the generic typegetDataPosition(PamCoordinate screenPosition) Do the exact opposite of getCoord3d and turn a screen position back into a data coordinate (e.g.intintintprotected voidsetScales(int displayWidth, int displayHeight, double startMillis, double timeRangeMillis, double[] frequencyRange, float sampleRate, double imagePos) Methods inherited from class PamView.GeneralProjector
addHoverData, addHoverData, addHoverData, addHoverData, addHoverData, addHoverData, clearHoverList, findClosestDataUnitIndex, findClosestDataUnitIndex, getDataSelector, getHoverDataList, getHoverDataSynchroniser, getHoveredDataUnit, getHoverText, getHoverText, getMouseHoverAdapter, getPamSymbolChooser, getParameterTypes, getParameterUnits, getParmeterType, getParmeterUnits, getProjectorDrawingOptions, isViewer, setDataSelector, setPamSymbolChooser, setParmeterType, setParmeterUnits, setProjectorDrawingOptions
-
Constructor Details
-
DirectDrawProjector
-
-
Method Details
-
setScales
protected void setScales(int displayWidth, int displayHeight, double startMillis, double timeRangeMillis, double[] frequencyRange, float sampleRate, double imagePos) -
getCoord3d
Description copied from class:GeneralProjectorSame as getCoordinate3d but using the generic type- Specified by:
getCoord3din classGeneralProjector<Coordinate3d>- Parameters:
dataValues- object extending PamCoordinate- Returns:
- 3d coordinate.
-
getCoord3d
Description copied from class:GeneralProjectorFunction ultimately used by a PamDataBlock to convert it's own data, in whatever form that is in into screen coordinates.- Specified by:
getCoord3din classGeneralProjector<Coordinate3d>- Parameters:
timeMillis- d2 and d3 are data representing whatever is appropriate for the concrete instance of the projector (e.g. Latitude, Longitude, depth, Time Frequency, etc)- Returns:
- A 3 dimensional coordinate (realistically z is never currently used)
-
getDataPosition
Description copied from class:GeneralProjectorDo the exact opposite of getCoord3d and turn a screen position back into a data coordinate (e.g. a time / freq, a lat long, etc)/.- Specified by:
getDataPositionin classGeneralProjector<Coordinate3d>- Parameters:
screenPosition- screen position- Returns:
- data object.
-
getSpectrogramDisplay
- Returns:
- the spectrogramDisplay
-
getDisplayHeight
public int getDisplayHeight()- Returns:
- the displayHeight
-
getDisplayWidth
public int getDisplayWidth()- Returns:
- the displayWidth
-
getPanelId
public int getPanelId()- Returns:
- the panelId
-