Class BasicAudioClipUI

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  BasicAudioClipUI.ViewSelection  
      • 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
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addActionListener​(java.awt.event.ActionListener acl)
      Add an actionlistener to the plugin.
      java.awt.Component asComponent()  
      void audioClipChanged​(AudioClipChangedEvent event)  
      void close()  
      void doLayout()  
      protected void fireActionEvent​(java.awt.event.ActionEvent ae)  
      protected java.lang.String formatPosition​(long framePosition)  
      protected double framesToTimeInSeconds​(long framePosition)  
      ActionTreeRoot getActionTreeRoot()  
      AudioClip getAudioSample()  
      javax.swing.JMenu[] getJMenus()  
      double getLengthInSeconds()  
      LocalizableMessage getLocalizableName()
      Get localized name.
      java.text.Format getTimeFormat()  
      javax.swing.JComponent[] getYScales()  
      boolean hasControlDialog()  
      boolean isPreferredFixedHeight()  
      boolean isShowTimeScaleGrid()  
      protected int mapFrameToPixel​(long framePosition)  
      protected long mapPixelToFrame​(int pixelPosition)  
      void removeActionListener​(java.awt.event.ActionListener acl)
      Remove an action listener.
      void setAudioSample​(AudioClip audioSample)
      Set the audio sample.
      protected void setAudioSource​(AudioSource audioSource)  
      void setMediaLengthUnit​(MediaLengthUnit mediaLengthUnit)
      Set media length units.
      void setProcessedFrameLength​(long frameLength)  
      protected void setSelection()  
      void setShowTimeScaleGrid​(boolean showTimeScaleGrid)  
      void setTimeFormat​(java.text.Format timeFormat)
      Set the time format to use.
      void setTimeScaleTickProvider​(TickProvider<java.lang.Long> timeScaleTickProvider)
      Set the provider for time scale ticks.
      void setVisible​(boolean visible)  
      void showJControlDialog​(java.awt.Component parentComponent)
      Show a dialog component for plugin controls.
      • 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, unregisterKeyboardAction, update
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_TIME_GRID_COLOR

        public final java.awt.Color DEFAULT_TIME_GRID_COLOR
      • audioSample

        protected AudioClip audioSample
      • channels

        protected int channels
      • lengthInSeconds

        protected double lengthInSeconds
      • length

        protected long length
      • audioFormat

        protected javax.sound.sampled.AudioFormat audioFormat
      • frameSize

        protected int frameSize
      • framesPerPixel

        protected double framesPerPixel
      • pixelsPerFrame

        protected double pixelsPerFrame
      • listenerList

        protected java.util.Vector<java.awt.event.ActionListener> listenerList
      • sampleRate

        protected float sampleRate
      • timeFormat

        protected java.text.Format timeFormat
      • timeScaleTickProvider

        protected TickProvider<java.lang.Long> timeScaleTickProvider
      • showTimeScaleGrid

        protected boolean showTimeScaleGrid
    • Method Detail

      • isShowTimeScaleGrid

        public boolean isShowTimeScaleGrid()
      • setShowTimeScaleGrid

        public void setShowTimeScaleGrid​(boolean showTimeScaleGrid)
      • mapPixelToFrame

        protected long mapPixelToFrame​(int pixelPosition)
      • mapFrameToPixel

        protected int mapFrameToPixel​(long framePosition)
      • framesToTimeInSeconds

        protected double framesToTimeInSeconds​(long framePosition)
      • setAudioSample

        public void setAudioSample​(AudioClip audioSample)
        Description copied from interface: AudioClipUI
        Set the audio sample.
        Specified by:
        setAudioSample in interface AudioClipUI
        Parameters:
        audioSample - the audiosample or null to clear
      • setVisible

        public void setVisible​(boolean visible)
        Overrides:
        setVisible in class javax.swing.JComponent
      • doLayout

        public void doLayout()
        Overrides:
        doLayout in class java.awt.Container
      • setProcessedFrameLength

        public void setProcessedFrameLength​(long frameLength)
      • getAudioSample

        public AudioClip getAudioSample()
      • getLengthInSeconds

        public double getLengthInSeconds()
      • setSelection

        protected void setSelection()
      • addActionListener

        public void addActionListener​(java.awt.event.ActionListener acl)
        Description copied from interface: AudioClipUI
        Add an actionlistener to the plugin.
        Specified by:
        addActionListener in interface AudioClipUI
      • removeActionListener

        public void removeActionListener​(java.awt.event.ActionListener acl)
        Description copied from interface: AudioClipUI
        Remove an action listener.
        Specified by:
        removeActionListener in interface AudioClipUI
      • fireActionEvent

        protected void fireActionEvent​(java.awt.event.ActionEvent ae)
      • getTimeFormat

        public java.text.Format getTimeFormat()
      • setTimeFormat

        public void setTimeFormat​(java.text.Format timeFormat)
        Description copied from interface: AudioClipUI
        Set the time format to use. For example framecount or media timne format ("00:00:00.000")
        Specified by:
        setTimeFormat in interface AudioClipUI
      • formatPosition

        protected java.lang.String formatPosition​(long framePosition)
      • setTimeScaleTickProvider

        public void setTimeScaleTickProvider​(TickProvider<java.lang.Long> timeScaleTickProvider)
        Description copied from interface: AudioClipUI
        Set the provider for time scale ticks. If there is a time scale in the audio sample GUI, it can provide the time ticks for the other plugins to display vertical time scale lines.
        Specified by:
        setTimeScaleTickProvider in interface AudioClipUI
      • getJMenus

        public javax.swing.JMenu[] getJMenus()
      • getYScales

        public javax.swing.JComponent[] getYScales()
        Specified by:
        getYScales in interface AudioClipUI
      • showJControlDialog

        public void showJControlDialog​(java.awt.Component parentComponent)
        Description copied from interface: AudioClipUI
        Show a dialog component for plugin controls.
        Specified by:
        showJControlDialog in interface AudioClipUI