public class JWavDisplayer extends javax.swing.JComponent implements Disposable
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
JWavDisplayer() |
Modifier and Type | Method and Description |
---|---|
void |
adjust(float factor)
Ajust the volume of this sample ... the sample is then modified
|
void |
clearHightLight() |
void |
clearSelection() |
void |
crop(long start,
long end)
Crop the current section ...
|
void |
displayAudioInputStream(ManagedAudioInputStream ais) |
void |
dispose()
Dispose the resources associated to an object
|
protected void |
finalize() |
ManagedAudioInputStream |
getAudioStream()
get a copy of the audio stream
|
long |
getCurrentEndLoopPos()
return the current endloop pos, -1 if none defined
|
long |
getCurrentStartLoopPos()
Return the current start loop pos (or -1) if not defined
|
long |
getFullLength() |
long |
getPosFromScreen(int x) |
double |
getScale() |
long |
getSelectionEnd() |
long |
getSelectionStart() |
long |
getStart() |
boolean |
hasSelection() |
static void |
main(java.lang.String[] args)
Test method for the panel / frame ...
|
protected void |
paintComponent(java.awt.Graphics g) |
void |
resetLoopParameters()
Reset the current loop parameters
|
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setBounds(java.awt.Rectangle r) |
void |
setCurrentEndLoopPos(long currentEndLoopPos) |
void |
setCurrentStartLoopPos(long currentStartLoopPos) |
void |
setHightLight(long pos) |
void |
setScale(double newScale) |
void |
setSelectionEnd(long selectionEnd) |
void |
setSelectionStart(long selectionStart) |
void |
setStart(long start) |
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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI
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
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, getAccessibleContext, 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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public void displayAudioInputStream(ManagedAudioInputStream ais) throws java.lang.Exception
java.lang.Exception
public ManagedAudioInputStream getAudioStream() throws java.lang.Exception
java.lang.Exception
public void adjust(float factor) throws java.lang.Exception
factor
- java.lang.Exception
public void crop(long start, long end) throws java.lang.Exception
start
- end
- java.lang.Exception
public long getPosFromScreen(int x)
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void clearHightLight()
public void setHightLight(long pos)
public void setCurrentStartLoopPos(long currentStartLoopPos)
public long getCurrentStartLoopPos()
public void setCurrentEndLoopPos(long currentEndLoopPos)
public void resetLoopParameters()
public long getCurrentEndLoopPos()
public boolean hasSelection()
public void setSelectionStart(long selectionStart)
public void setSelectionEnd(long selectionEnd)
public long getSelectionStart()
public long getSelectionEnd()
public void clearSelection()
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
public void setBounds(java.awt.Rectangle r)
setBounds
in class java.awt.Component
public double getScale()
public void setScale(double newScale)
public void setStart(long start)
public long getStart()
public long getFullLength()
public void dispose()
Disposable
dispose
in interface Disposable
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- java.lang.Exception