Package rocca

Class SpectrogramPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SpectrogramPanel extends JPanel
Creates a graphical representation from a matrix. Like Matlab's imagesc.
See Also:
  • Constructor Details Link icon

    • SpectrogramPanel Link icon

      public SpectrogramPanel(RoccaSpecPopUp roccaSpecPopUp)
      Creates a new SpectrogramPanel for the given data matrix
  • Method Details Link icon

    • setColors Link icon

      public void setColors()
      Set the colors of the spectrogram, based on the FFT values
    • setColorOffset Link icon

      public void setColorOffset(double colorOffset)
      Updates the offset factor used to calculate brightness. Increasing this variable increases the brightness of the spectrogram, while decreasing it has the opposite effect
      Parameters:
      colorOffset - the offset factor used to calculate the brightness
    • getColorOffset Link icon

      public double getColorOffset()
    • setColorScale Link icon

      public void setColorScale(double colorScale)
      Updates the scale factor used to calculate contrast. Increasing this variable increases the contrast of the spectrogram, while decreasing it has the opposite effect
      Parameters:
      colorScale - the scaling factor used to calculate the contrast
    • getColorScale Link icon

      public double getColorScale()
    • vzoomSet Link icon

      protected void vzoomSet(float vzoom)
      Zoom the image in the vertical direction, preparing for new display.
    • hzoomSet Link icon

      protected void hzoomSet(float zoom)
      Zoom the image in the horizontal direction, preparing for new display.
    • zoomSet Link icon

      protected void zoomSet(float zoom)
      Zoom the image in the horizontal direction, preparing for new display.
    • getVZoom Link icon

      public float getVZoom()
    • getHZoom Link icon

      public float getHZoom()
    • getData Link icon

      public double getData(int x, int y)
    • getDataWidth Link icon

      public int getDataWidth()
    • getDataHeight Link icon

      public int getDataHeight()
    • paintComponent Link icon

      public void paintComponent(Graphics g)
      Paint the component. This will be called by AWT/Swing.
      Overrides:
      paintComponent in class JComponent
      Parameters:
      g - The Graphics to draw on.
    • getScaledImageSize Link icon

      public Dimension getScaledImageSize()