Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ca.bc.webarts
Class jOggPlayer

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Container
                  |
                  +--java.awt.Panel
                        |
                        +--java.applet.Applet
                              |
                              +--javax.swing.JApplet
                                    |
                                    +--ca.bc.webarts.jOggPlayer

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.lang.Runnable, java.io.Serializable

public class jOggPlayer
extends javax.swing.JApplet
implements java.awt.event.ActionListener, java.lang.Runnable

An Open Source Platform independant Graphical Vorbis Ogg Player!

You can now listen to your Oggs using an app that is NOT bloated. In fact this app/let can run on a web page (it is under 50 kB).

It provides the usual basics needed to enjoy your files:

- plays files from your hard drive or streams from a URL
- individual file play or multiple file looping play
- sequential or random play
- in applet volume control that goes to 11!
- visual song progrees indicator
- displays ogg file information comments ( song name, Artist etc.)
- unlimitted size playlist that can transparently include files and/or URLs
- user selectable directory recursion on file load
- can load a file, URL or a whole directory of files on startup
- PLUS it sounds great!

Visit the Homepage for latest news and updates.

Based on the Great work done by the jCraft crew to build jOrbis - the Java implementation of the Vorbis Ogg Codec by The XIPHOPHORUS Company.

All the aforementioned work has been released under an OpenSource GNU General Public License.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

See Also:
  Serialized Form

Inner Class Summary
`(package private) class` | `jOggPlayer.OggFileRef` A simple class to encapsulate the information required to use/reference an Ogg file.
`(package private) class` | `jOggPlayer.PlayList` A simple class to encapsulate the storage of references to Ogg files in a Playlist style.

Inner classes inherited from class javax.swing.JApplet
`javax.swing.JApplet.AccessibleJApplet`

Inner classes inherited from class java.applet.Applet
`java.applet.Applet.AccessibleApplet`

Inner classes inherited from class java.awt.Panel
`java.awt.Panel.AccessibleAWTPanel`

Inner classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Inner classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock`

Field Summary
`(package private) java.awt.Image` | `aboutGraphic_`
`(package private) java.awt.event.ActionListener` | `addFromPlaylistActionListener`
`(package private) java.awt.event.ActionListener` | `addSongActionListener`
`(package private) java.awt.event.ActionListener` | `addURLActionListener`
`(package private) static java.lang.String` | `APP_NAME`
`(package private) static java.net.URL` | `appCodeBase_`
`(package private) static jOggPlayer` | `applicationPlayer`
`(package private) static ColouredLabel` | `artistLabel`
`(package private) static ColouredLabel` | `artistLabelValue`
`(package private) java.lang.String[]` | `availableTextureNames_`
`(package private) java.awt.Image` | `backgroundTexture_`
`(package private) java.lang.String` | `backgroundTextureFilename_`
`(package private) java.io.InputStream` | `bitStream`
`(package private) static kiwi.ui.KPanel` | `bodyPanel`
`(package private) byte[]` | `buffer`
`(package private) int` | `bufferLengthInBytes`
`(package private) static int` | `bufferSize_`
`(package private) kiwi.ui.KButton` | `button`
`(package private) kiwi.ui.KButton` | `buttonAddToPlaylist`
`(package private) kiwi.ui.KButton` | `buttonAddUrlToPlaylist`
`(package private) java.awt.Color` | `buttonBackColour_`
`(package private) kiwi.ui.KButton` | `buttonDeleteFromPlaylist`
`(package private) kiwi.ui.KButton` | `buttonLast`
`(package private) kiwi.ui.KButton` | `buttonNext`
`(package private) static kiwi.ui.KPanel` | `buttonPanel`
`(package private) kiwi.ui.KButton` | `buttonPause`
`(package private) kiwi.ui.KButton` | `buttonRefreshPlaylist`
`(package private) int` | `bytes`
`(package private) javax.swing.JComboBox` | `cb`
`(package private) int` | `channels`
`(package private) javax.swing.JCheckBox` | `checkBoxLoop`
`(package private) javax.swing.JCheckBox` | `checkBoxPlaylist`
`(package private) javax.swing.JCheckBox` | `checkBoxRandom`
`(package private) static javax.swing.JCheckBox` | `checkBoxRecursePlaylist`
`(package private) static kiwi.ui.KPanel` | `checkPanel`
`(package private) static java.lang.String` | `CLASSPATH`
`(package private) int` | `controlHeight_`
`(package private) static kiwi.ui.KPanel` | `controlPanel`
`(package private) static byte[]` | `convbuffer`
`(package private) static int` | `convsize`
`(package private) double` | `currentVolumeMultiplier_`
`(package private) int` | `currVolSetting_`
`(package private) java.util.Date` | `date`
`(package private) java.awt.event.ActionListener` | `deleteAllActionListener`
`(package private) java.awt.event.ActionListener` | `deleteSelectedSongActionListener`
`(package private) static java.awt.Color` | `displayBackColour_`
`(package private) java.awt.Font` | `displayFont_`
`(package private) java.awt.Font` | `displayFontBold_`
`(package private) int` | `displayHeight_`
`(package private) static javax.swing.JPopupMenu` | `displayMenu`
`(package private) static javax.swing.JPanel` | `displayPanel`
`(package private) static java.awt.Color` | `displayTextColour_`
`(package private) int` | `displayWidth_`
`(package private) static kiwi.ui.KPanel` | `footerPanel`
`(package private) int` | `format`
`(package private) static javax.swing.JFrame` | `frame`
`(package private) static java.awt.Dimension` | `frameInitSize_`
`(package private) int` | `frameSizeInBytes`
`(package private) static kiwi.ui.KPanel` | `headerPanel`
`(package private) static java.lang.String` | `ICON_JAR_FILENAME`
`(package private) javax.swing.ImageIcon` | `iconAdd`
`(package private) javax.swing.ImageIcon` | `iconAddUrl`
`(package private) javax.swing.ImageIcon` | `iconBack`
`(package private) javax.swing.ImageIcon` | `iconDelete`
`(package private) javax.swing.ImageIcon` | `iconForward`
`(package private) static java.util.jar.JarFile` | `iconJar`
`(package private) javax.swing.ImageIcon` | `iconLoop`
`(package private) javax.swing.ImageIcon` | `iconPause`
`(package private) javax.swing.ImageIcon` | `iconPlay`
`(package private) javax.swing.ImageIcon` | `iconRefresh`
`(package private) javax.swing.ImageIcon` | `iconSelectedLoop`
`(package private) javax.swing.ImageIcon` | `iconStop`
`(package private) static java.lang.String` | `IMAGE_DIR`
`(package private) static java.lang.String[]` | `initArgs_`
`(package private) static javax.swing.JPanel` | `innerDisplayPanel`
`(package private) int` | `innerDisplayPanelHeight_`
`(package private) int` | `innerDisplayPanelWidth_`
`(package private) static kiwi.ui.KPanel` | `innerFooterPanel`
`(package private) static kiwi.ui.KPanel` | `innerHeaderPanel`
`(package private) static javax.swing.JPanel` | `innerLeftDisplayPanel`
`(package private) int` | `innerLeftDisplayPanelHeight_`
`(package private) int` | `innerLeftDisplayPanelWidth_`
`(package private) static kiwi.ui.KPanel` | `innerPanel`
`(package private) static kiwi.ui.KPanel` | `innerPlaylistPanel`
`(package private) static javax.swing.JPanel` | `innerRightDisplayPanel`
`(package private) int` | `innerRightDisplayPanelHeight_`
`(package private) static int` | `left_vol_scale`
`(package private) static kiwi.ui.KPanel` | `leftPanel`
`(package private) boolean` | `logVolumeScale_`
`(package private) java.lang.Thread` | `looperThread_`
`(package private) java.lang.Runnable` | `loopingRunnable_` Runs the Looping of Songs in its own thread.
`(package private) boolean` | `loopPaused_`
`(package private) static java.awt.Color` | `mainBackColour_`
`(package private) static javax.swing.JPopupMenu` | `mainMenu`
`(package private) static int` | `maxVolScale_`
`(package private) com.jcraft.jogg.Page` | `og`
`(package private) com.jcraft.jogg.Packet` | `op`
`(package private) com.jcraft.jogg.StreamState` | `os`
`(package private) javax.sound.sampled.SourceDataLine` | `outputLine`
`(package private) com.jcraft.jogg.SyncState` | `oy`
`(package private) kiwi.ui.KPanel` | `panel`
`(package private) java.lang.Thread` | `playerThread_`
`(package private) jOggPlayer.PlayList` | `playList`
`(package private) java.awt.Color` | `playlistBackColour_`
`(package private) static java.lang.String` | `playListDir_`
`(package private) java.lang.String` | `playListFile_`
`(package private) int` | `playlistHeight_`
`(package private) static javax.swing.JPopupMenu` | `playlistMenu`
`(package private) boolean` | `playListShowing_`
`(package private) static java.awt.event.MouseListener` | `popupListener`
`(package private) int` | `progressCount_`
`(package private) static double` | `progressFudge_`
`(package private) int` | `rate`
`(package private) static int` | `right_vol_scale`
`(package private) static kiwi.ui.KPanel` | `rightPanel`
`(package private) boolean` | `running_as_applet`
`(package private) java.awt.event.ActionListener` | `savePlaylistActionListener`
`(package private) boolean` | `showButtonBorders_`
`(package private) boolean` | `showTextures_`
`(package private) java.util.Vector` | `songComments_`
`(package private) javax.swing.JProgressBar` | `songProgress`
`(package private) int` | `songProgressHeight_`
`(package private) long` | `songStartTime_`
`private static java.lang.String` | `SYSTEM_FILE_SEPERATOR`
`(package private) static ColouredLabel` | `timeLabel`
`(package private) static ColouredLabel` | `timeLabelValue`
`(package private) boolean` | `timerRunning_`
`(package private) java.lang.Runnable` | `timeWatcherRunnable_` Handles the Timer display in its own Thread.
`(package private) java.lang.Thread` | `timeWatcherThread_`
`(package private) static ColouredLabel` | `titleLabel`
`(package private) static ColouredLabel` | `titleLabelValue`
`(package private) static java.lang.String` | `USER_DIR`
`(package private) static java.awt.GraphicsEnvironment` | `USER_GRAPHIC_ENV`
`(package private) com.jcraft.jorbis.Block` | `vb`
`(package private) com.jcraft.jorbis.Comment` | `vc`
`(package private) com.jcraft.jorbis.DspState` | `vd`
`(package private) static java.lang.String` | `VERSION`
`(package private) com.jcraft.jorbis.Info` | `vi`
`(package private) java.awt.Color` | `volumeBackColour_`
`(package private) static javax.swing.JSlider` | `volumeSlider`
`(package private) int` | `volumeWidth_`

Fields inherited from class javax.swing.JApplet
`accessibleContext, rootPane, rootPaneCheckingEnabled`

Fields inherited from class java.applet.Applet
`serialVersionUID, stub`

Fields inherited from class java.awt.Panel
`base, nameCounter`

Fields inherited from class java.awt.Container
`component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, needsPaint, printing, printingThreads`

Fields inherited from class java.awt.Component
`actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`jOggPlayer()`
`jOggPlayer(java.lang.String[] args)`

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` Handles all the Actions originating from the Control Buttons.
`private java.lang.String` | `chooseAFilename(java.lang.String startPath)` Encapsulates the showing of the FileChooser dialog and returns a String representing the absolute path
`private java.lang.String` | `chooseAFilename(java.lang.String startPath, boolean useFilter)` Encapsulates the showing of the FileChooser dialog and returns a String representing the abvsolute path
`private java.lang.String` | `getAbsolutePathFromClasspath(java.lang.String filename)`
`private static java.net.URL` | `getFileBaseURL(java.lang.String fileString)` Creates a URL for the specified filename string.
`private java.net.URL[]` | `getFileBaseURLs(java.lang.String[] fileStrings)` Creates a URL[] for the given Strings.
`private javax.sound.sampled.SourceDataLine` | `getOutputLine(int channels, int rate)`
`private java.lang.String[]` | `getPlaylistArray(java.lang.String[] fileNames)`
`private java.util.Vector` | `getPlaylistVector(java.lang.String fileNames)`
`private java.util.Vector` | `getPlaylistVector(java.lang.String[] fileNames)`
`private void` | `init_audio(int channels, int rate)`
`private void` | `init_jorbis()`
`void` | `init()`
`private void` | `initMenus()` Gets the Menus setup
`private void` | `initUI()` Gets the GUI setup
`private void` | `loadIconImages()`
`private java.awt.Image` | `loadImage(java.lang.String imageFilename, java.lang.String jarFilename)`
`private void` | `loadPlaylist()` Loads a playlist from the playlist file specified in the playListFile_ field.
`private java.lang.String[]` | `loadTextureNames()`
`static void` | `main(java.lang.String[] arg)`
`private static boolean` | `mySleep(long waitTime)` A method to simply abstract the Try/Catch required to put the current thread to sleep for the specified time in ms.
`private int` | `readFromStream(byte[] buffer, int index, int bufferSize_)`
`private java.lang.String` | `readline(java.io.InputStream is)` Reads a single line from the InputStream.
`void` | `run()` The Runnable to do the actual playing of the song.
`private void` | `savePlaylist(java.lang.String filename)` Saves the playlist to the file specified in the playListFile_ field.
`private void` | `setColours()` Sets all the Various colours to their current variable values.
`private void` | `setDisplayFont(java.awt.Font newFont)` Changes all the Labels in the Display area to the ne font.
`void` | `start()`
`private void` | `startTimer()`
`void` | `stop()`
`private void` | `tryPlay(java.lang.String item)`
`private void` | `tryPlay(java.net.URL url)`
`private void` | `updateDisplayPopup()` Updates the tooltip popup text for the Display area with the latest song info.
`double` | `volumeMultiplier(int currSetting)` Converts a linear mapped value to its Log equivalent.

Methods inherited from class javax.swing.JApplet
`addImpl, createRootPane, createRootPaneException, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update`

Methods inherited from class java.applet.Applet
`destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus`

Methods inherited from class java.awt.Panel
`, addNotify, constructComponentName`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paint, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, transferFocus, validate, validateTree, writeObject`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### SYSTEM_FILE_SEPERATOR

    private static final java.lang.String SYSTEM_FILE_SEPERATOR

### IMAGE_DIR

    static final java.lang.String IMAGE_DIR

### ICON_JAR_FILENAME

    static final java.lang.String ICON_JAR_FILENAME

### USER_DIR

    static final java.lang.String USER_DIR

### CLASSPATH

    static final java.lang.String CLASSPATH

### APP_NAME

    static final java.lang.String APP_NAME

### VERSION

    static final java.lang.String VERSION

### USER_GRAPHIC_ENV

    static final java.awt.GraphicsEnvironment USER_GRAPHIC_ENV

### running_as_applet

    boolean running_as_applet

### playListShowing_

    boolean playListShowing_

### loopPaused_

    boolean loopPaused_

### timerRunning_

    boolean timerRunning_

### logVolumeScale_

    boolean logVolumeScale_

### showButtonBorders_

    boolean showButtonBorders_

### showTextures_

    boolean showTextures_

### playerThread_

    java.lang.Thread playerThread_

### looperThread_

    java.lang.Thread looperThread_

### timeWatcherThread_

    java.lang.Thread timeWatcherThread_

### progressFudge_

    static double progressFudge_

### appCodeBase_

    static java.net.URL appCodeBase_

### currentVolumeMultiplier_

    double currentVolumeMultiplier_

### songStartTime_

    long songStartTime_

### date

    java.util.Date date

### initArgs_

    static java.lang.String[] initArgs_

### progressCount_

    int progressCount_

### applicationPlayer

    static jOggPlayer applicationPlayer

### iconJar

    static java.util.jar.JarFile iconJar

### playListDir_

    static java.lang.String playListDir_

### playListFile_

    java.lang.String playListFile_

### playList

    jOggPlayer.PlayList playList

### mainBackColour_

    static java.awt.Color mainBackColour_

### playlistBackColour_

    java.awt.Color playlistBackColour_

### buttonBackColour_

    java.awt.Color buttonBackColour_

### volumeBackColour_

    java.awt.Color volumeBackColour_

### displayBackColour_

    static java.awt.Color displayBackColour_

### displayTextColour_

    static java.awt.Color displayTextColour_

### availableTextureNames_

    java.lang.String[] availableTextureNames_

### displayFont_

    java.awt.Font displayFont_

### displayFontBold_

    java.awt.Font displayFontBold_

### maxVolScale_

    static int maxVolScale_

### currVolSetting_

    int currVolSetting_

### left_vol_scale

    static int left_vol_scale

### right_vol_scale

    static int right_vol_scale

### frameInitSize_

    static java.awt.Dimension frameInitSize_

### playlistHeight_

    int playlistHeight_

### innerLeftDisplayPanelHeight_

    int innerLeftDisplayPanelHeight_

### innerLeftDisplayPanelWidth_

    int innerLeftDisplayPanelWidth_

### innerRightDisplayPanelHeight_

    int innerRightDisplayPanelHeight_

### innerDisplayPanelHeight_

    int innerDisplayPanelHeight_

### innerDisplayPanelWidth_

    int innerDisplayPanelWidth_

### songProgressHeight_

    int songProgressHeight_

### controlHeight_

    int controlHeight_

### volumeWidth_

    int volumeWidth_

### displayHeight_

    int displayHeight_

### displayWidth_

    int displayWidth_

### aboutGraphic_

    java.awt.Image aboutGraphic_

### backgroundTexture_

    java.awt.Image backgroundTexture_

### iconDelete

    javax.swing.ImageIcon iconDelete

### iconAdd

    javax.swing.ImageIcon iconAdd

### iconAddUrl

    javax.swing.ImageIcon iconAddUrl

### iconRefresh

    javax.swing.ImageIcon iconRefresh

### iconPlay

    javax.swing.ImageIcon iconPlay

### iconPause

    javax.swing.ImageIcon iconPause

### iconStop

    javax.swing.ImageIcon iconStop

### iconForward

    javax.swing.ImageIcon iconForward

### iconBack

    javax.swing.ImageIcon iconBack

### iconLoop

    javax.swing.ImageIcon iconLoop

### iconSelectedLoop

    javax.swing.ImageIcon iconSelectedLoop

### backgroundTextureFilename_

    java.lang.String backgroundTextureFilename_

### panel

    kiwi.ui.KPanel panel

### cb

    javax.swing.JComboBox cb

### button

    kiwi.ui.KButton button

### buttonDeleteFromPlaylist

    kiwi.ui.KButton buttonDeleteFromPlaylist

### buttonAddToPlaylist

    kiwi.ui.KButton buttonAddToPlaylist

### buttonAddUrlToPlaylist

    kiwi.ui.KButton buttonAddUrlToPlaylist

### buttonRefreshPlaylist

    kiwi.ui.KButton buttonRefreshPlaylist

### buttonPause

    kiwi.ui.KButton buttonPause

### buttonLast

    kiwi.ui.KButton buttonLast

### buttonNext

    kiwi.ui.KButton buttonNext

### checkBoxLoop

    javax.swing.JCheckBox checkBoxLoop

### checkBoxRandom

    javax.swing.JCheckBox checkBoxRandom

### checkBoxPlaylist

    javax.swing.JCheckBox checkBoxPlaylist

### checkBoxRecursePlaylist

    static javax.swing.JCheckBox checkBoxRecursePlaylist

### songProgress

    javax.swing.JProgressBar songProgress

### frame

    static javax.swing.JFrame frame

### volumeSlider

    static javax.swing.JSlider volumeSlider

### artistLabel

    static ColouredLabel artistLabel

### titleLabel

    static ColouredLabel titleLabel

### timeLabel

    static ColouredLabel timeLabel

### artistLabelValue

    static ColouredLabel artistLabelValue

### titleLabelValue

    static ColouredLabel titleLabelValue

### timeLabelValue

    static ColouredLabel timeLabelValue

### headerPanel

    static kiwi.ui.KPanel headerPanel

### bodyPanel

    static kiwi.ui.KPanel bodyPanel

### footerPanel

    static kiwi.ui.KPanel footerPanel

### leftPanel

    static kiwi.ui.KPanel leftPanel

### innerPanel

    static kiwi.ui.KPanel innerPanel

### rightPanel

    static kiwi.ui.KPanel rightPanel

### innerHeaderPanel

    static kiwi.ui.KPanel innerHeaderPanel

### displayPanel

    static javax.swing.JPanel displayPanel

### controlPanel

    static kiwi.ui.KPanel controlPanel

### innerFooterPanel

    static kiwi.ui.KPanel innerFooterPanel

### innerDisplayPanel

    static javax.swing.JPanel innerDisplayPanel

### innerLeftDisplayPanel

    static javax.swing.JPanel innerLeftDisplayPanel

### innerRightDisplayPanel

    static javax.swing.JPanel innerRightDisplayPanel

### innerPlaylistPanel

    static kiwi.ui.KPanel innerPlaylistPanel

### checkPanel

    static kiwi.ui.KPanel checkPanel

### buttonPanel

    static kiwi.ui.KPanel buttonPanel

### mainMenu

    static javax.swing.JPopupMenu mainMenu

### playlistMenu

    static javax.swing.JPopupMenu playlistMenu

### displayMenu

    static javax.swing.JPopupMenu displayMenu

### popupListener

    static java.awt.event.MouseListener popupListener

### bitStream

    java.io.InputStream bitStream

### bufferSize_

    static int bufferSize_

### convsize

    static int convsize

### convbuffer

    static byte[] convbuffer

### oy

    com.jcraft.jogg.SyncState oy

### os

    com.jcraft.jogg.StreamState os

### og

    com.jcraft.jogg.Page og

### op

    com.jcraft.jogg.Packet op

### vi

    com.jcraft.jorbis.Info vi

### vc

    com.jcraft.jorbis.Comment vc

### vd

    com.jcraft.jorbis.DspState vd

### vb

    com.jcraft.jorbis.Block vb

### buffer

    byte[] buffer

### bytes

    int bytes

### format

    int format

### rate

    int rate

### channels

    int channels

### outputLine

    javax.sound.sampled.SourceDataLine outputLine

### frameSizeInBytes

    int frameSizeInBytes

### bufferLengthInBytes

    int bufferLengthInBytes

### songComments_

    java.util.Vector songComments_

### deleteSelectedSongActionListener

    java.awt.event.ActionListener deleteSelectedSongActionListener

### savePlaylistActionListener

    java.awt.event.ActionListener savePlaylistActionListener

### deleteAllActionListener

    java.awt.event.ActionListener deleteAllActionListener

### addSongActionListener

    java.awt.event.ActionListener addSongActionListener

### addFromPlaylistActionListener

    java.awt.event.ActionListener addFromPlaylistActionListener

### addURLActionListener

    java.awt.event.ActionListener addURLActionListener

### loopingRunnable_

    java.lang.Runnable loopingRunnable_

  Runs the Looping of Songs in its own thread.

### timeWatcherRunnable_

    java.lang.Runnable timeWatcherRunnable_

  Handles the Timer display in its own Thread.

  Why not use the Timer class in the JDK??? Because it is since JDK 1.3.

Constructor Detail

### jOggPlayer

    public jOggPlayer()

### jOggPlayer

    public jOggPlayer(java.lang.String[] args)

Method Detail

### init

    public void init()

  Overrides:
    `init` in class `java.applet.Applet`

### start

    public void start()

  Overrides:
    `start` in class `java.applet.Applet`

### getAbsolutePathFromClasspath

    private java.lang.String getAbsolutePathFromClasspath(java.lang.String filename)

### loadImage

    private java.awt.Image loadImage(java.lang.String imageFilename,
                                     java.lang.String jarFilename)

### loadTextureNames

    private java.lang.String[] loadTextureNames()

### loadIconImages

    private void loadIconImages()

### init_jorbis

    private void init_jorbis()

### getOutputLine

    private javax.sound.sampled.SourceDataLine getOutputLine(int channels,
                                                             int rate)

### init_audio

    private void init_audio(int channels,
                            int rate)

### run

    public void run()

  The Runnable to do the actual playing of the song. All the rest of this class is fluff to get to this point :). This code was developed by the jCraft group.
  Specified by:
    `run` in interface `java.lang.Runnable`

### stop

    public void stop()

  Overrides:
    `stop` in class `java.applet.Applet`

### readFromStream

    private int readFromStream(byte[] buffer,
                               int index,
                               int bufferSize_)

### startTimer

    private void startTimer()

### volumeMultiplier

    public double volumeMultiplier(int currSetting)

  Converts a linear mapped value to its Log equivalent. For use in the Volume Scale.
  Parameters:
    `currSetting` - is the linear value to convert. Acceptable values: 0 = mute, 10 = full, 11 is for fun.
  Returns:
    the Log value (Log currSetting)

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Handles all the Actions originating from the Control Buttons.
  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

### getFileBaseURLs

    private java.net.URL[] getFileBaseURLs(java.lang.String[] fileStrings)

  Creates a URL[] for the given Strings.

### getFileBaseURL

    private static java.net.URL getFileBaseURL(java.lang.String fileString)

  Creates a URL for the specified filename string.

### tryPlay

    private void tryPlay(java.net.URL url)

### tryPlay

    private void tryPlay(java.lang.String item)

### savePlaylist

    private void savePlaylist(java.lang.String filename)

  Saves the playlist to the file specified in the playListFile_ field.

### loadPlaylist

    private void loadPlaylist()

  Loads a playlist from the playlist file specified in the playListFile_ field. It first trys to load each line as a URL; if that fails it loads them as files. It simply adds the songs listed to the playList.

### readline

    private java.lang.String readline(java.io.InputStream is)

  Reads a single line from the InputStream.
  Returns:
    the line read as a String

### updateDisplayPopup

    private void updateDisplayPopup()

  Updates the tooltip popup text for the Display area with the latest song info.

### setColours

    private void setColours()

  Sets all the Various colours to their current variable values.

### setDisplayFont

    private void setDisplayFont(java.awt.Font newFont)

  Changes all the Labels in the Display area to the ne font. It re validates the display as well.

### initMenus

    private void initMenus()

  Gets the Menus setup

### initUI

    private void initUI()

  Gets the GUI setup

### mySleep

    private static boolean mySleep(long waitTime)

  A method to simply abstract the Try/Catch required to put the current thread to sleep for the specified time in ms.
  Parameters:
    `waitTime` - the sleep time in milli seconds (ms).
  Returns:
    boolean value specifying if the sleep completed (true) or was interupted (false).

### chooseAFilename

    private java.lang.String chooseAFilename(java.lang.String startPath)

  Encapsulates the showing of the FileChooser dialog and returns a String representing the absolute path

### chooseAFilename

    private java.lang.String chooseAFilename(java.lang.String startPath,
                                             boolean useFilter)

  Encapsulates the showing of the FileChooser dialog and returns a String representing the abvsolute path

### getPlaylistVector

    private java.util.Vector getPlaylistVector(java.lang.String fileNames)

### getPlaylistArray

    private java.lang.String[] getPlaylistArray(java.lang.String[] fileNames)

### getPlaylistVector

    private java.util.Vector getPlaylistVector(java.lang.String[] fileNames)

### main

    public static void main(java.lang.String[] arg)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD