|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
javazoom.jlgui.player.amp.visual.ui.SpectrumTimeAnalyzer
public class SpectrumTimeAnalyzer
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.awt.Color |
DEFAULT_BACKGROUND_COLOR
|
static int |
DEFAULT_FPS
|
static int |
DEFAULT_HEIGHT
|
static java.awt.Color |
DEFAULT_SCOPE_COLOR
|
static int |
DEFAULT_SPECTRUM_ANALYSER_BAND_COUNT
|
static float |
DEFAULT_SPECTRUM_ANALYSER_DECAY
|
static int |
DEFAULT_SPECTRUM_ANALYSER_FFT_SAMPLE_SIZE
|
static int |
DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY
|
static float |
DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO
|
static float |
DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO_RANGE
|
static float |
DEFAULT_VU_METER_DECAY
|
static int |
DEFAULT_WIDTH
|
static int |
DISPLAY_MODE_OFF
|
static int |
DISPLAY_MODE_SCOPE
|
static int |
DISPLAY_MODE_SPECTRUM_ANALYSER
|
static float |
MAX_SPECTRUM_ANALYSER_DECAY
|
static float |
MIN_SPECTRUM_ANALYSER_DECAY
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SpectrumTimeAnalyzer()
|
Method Summary | |
---|---|
void |
closeDSP()
Close DSP |
java.awt.Color |
getColor(java.lang.String linecolor)
Convert string to color. |
AbsoluteConstraints |
getConstraints()
|
static java.awt.Color[] |
getDefaultSpectrumAnalyserColors()
|
int |
getDisplayMode()
|
KJDigitalSignalProcessingAudioDataConsumer |
getDSP()
Return DSP. |
int |
getFps()
|
int |
getPeakDelay()
Return peak falloff delay |
java.awt.Color |
getScopeColor()
|
int |
getSpectrumAnalyserBandCount()
|
java.awt.Color[] |
getSpectrumAnalyserColors()
|
float |
getSpectrumAnalyserDecay()
|
boolean |
isPeaksEnabled()
|
boolean |
isShowingFPS()
|
void |
paintComponent(java.awt.Graphics pGraphics)
|
void |
process(float[] pLeft,
float[] pRight,
float pFrameRateRatioHint)
|
void |
setConstraints(AbsoluteConstraints cnts)
|
void |
setDisplayMode(int pMode)
Sets the current display mode. |
void |
setFps(int fps)
|
void |
setPeakColor(java.awt.Color c)
Set visual peak color. |
void |
setPeakDelay(int framestowait)
Set peak falloff delay. |
void |
setPeaksEnabled(boolean peaksEnabled)
|
void |
setScopeColor(java.awt.Color pColor)
Sets the color of the scope. |
void |
setShowFPS(boolean pState)
When 'true' is passed as a parameter, will overlay the "Frames Per Seconds" achieved by the component. |
void |
setSpectrumAnalyserBandCount(int pCount)
Sets the numbers of bands rendered by the spectrum analyser. |
void |
setSpectrumAnalyserColors(java.awt.Color[] pColors)
Sets the spectrum analyser color scale. |
void |
setSpectrumAnalyserDecay(float pDecay)
Sets the spectrum analyser band decay rate. |
void |
setSpectrumAnalyserFFTSampleSize(int pSize)
Sets the FFT sample size to be just for calculating the spectrum analyser values. |
void |
setupDSP(javax.sound.sampled.SourceDataLine line)
Setup DSP. |
void |
setVisColor(java.lang.String viscolor)
Set visual colors from skin. |
void |
startDSP(javax.sound.sampled.SourceDataLine line)
Starts DSP. |
void |
stopDSP()
Stop DSP. |
void |
writeDSP(byte[] pcmdata)
Write PCM data to DSP. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DISPLAY_MODE_SCOPE
public static final int DISPLAY_MODE_SPECTRUM_ANALYSER
public static final int DISPLAY_MODE_OFF
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final int DEFAULT_FPS
public static final int DEFAULT_SPECTRUM_ANALYSER_FFT_SAMPLE_SIZE
public static final int DEFAULT_SPECTRUM_ANALYSER_BAND_COUNT
public static final float DEFAULT_SPECTRUM_ANALYSER_DECAY
public static final int DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY
public static final float DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO
public static final float DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO_RANGE
public static final float MIN_SPECTRUM_ANALYSER_DECAY
public static final float MAX_SPECTRUM_ANALYSER_DECAY
public static final java.awt.Color DEFAULT_BACKGROUND_COLOR
public static final java.awt.Color DEFAULT_SCOPE_COLOR
public static final float DEFAULT_VU_METER_DECAY
Constructor Detail |
---|
public SpectrumTimeAnalyzer()
Method Detail |
---|
public void setConstraints(AbsoluteConstraints cnts)
public AbsoluteConstraints getConstraints()
public boolean isPeaksEnabled()
public void setPeaksEnabled(boolean peaksEnabled)
public int getFps()
public void setFps(int fps)
public void startDSP(javax.sound.sampled.SourceDataLine line)
line
- public void stopDSP()
public void closeDSP()
public void setupDSP(javax.sound.sampled.SourceDataLine line)
line
- public void writeDSP(byte[] pcmdata)
pcmdata
- public KJDigitalSignalProcessingAudioDataConsumer getDSP()
public void setVisColor(java.lang.String viscolor)
viscolor
- public void setPeakColor(java.awt.Color c)
c
- public void setPeakDelay(int framestowait)
framestowait
- public int getPeakDelay()
public java.awt.Color getColor(java.lang.String linecolor)
linecolor
-
public static java.awt.Color[] getDefaultSpectrumAnalyserColors()
public int getDisplayMode()
public int getSpectrumAnalyserBandCount()
public float getSpectrumAnalyserDecay()
public java.awt.Color getScopeColor()
public java.awt.Color[] getSpectrumAnalyserColors()
public boolean isShowingFPS()
public void paintComponent(java.awt.Graphics pGraphics)
paintComponent
in class javax.swing.JComponent
public void process(float[] pLeft, float[] pRight, float pFrameRateRatioHint)
public void setDisplayMode(int pMode)
pMode
- Must be either DISPLAY_MODE_SCOPE or DISPLAY_MODE_SPECTRUM_ANALYSER.public void setScopeColor(java.awt.Color pColor)
pColor
- public void setShowFPS(boolean pState)
pState
- public void setSpectrumAnalyserBandCount(int pCount)
pCount
- Cannot be more than half the "FFT sample size".public void setSpectrumAnalyserDecay(float pDecay)
pDecay
- Must be a number between 0.0 and 1.0 exclusive.public void setSpectrumAnalyserColors(java.awt.Color[] pColors)
pColors
- Any amount of colors may be used. Must not be null.public void setSpectrumAnalyserFFTSampleSize(int pSize)
pSize
- Cannot be more than the size of the sample provided by the DSP.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |