public class jOggPlayer extends JApplet implements ActionListener, Runnable
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:
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.
Modifier and Type | Class and Description |
---|---|
(package private) class |
jOggPlayer.TimerThread
The thread that watches the trime the song has been playing.
|
JApplet.AccessibleJApplet
Applet.AccessibleApplet
Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
(package private) Image |
aboutGraphic_
Description of the Field
|
(package private) ActionListener |
addFromPlaylistActionListener
Listener For the add ALL Songs from PlaylistFile Button
|
(package private) ActionListener |
addSongActionListener
Listener For the Add a Song to the Playlist Button
|
(package private) ActionListener |
addURLActionListener
Listener For the Add a Song from a URL Button
|
private static String |
APP_NAME
The application name string
|
(package private) static URL |
appCodeBase_
The codebase dir when running as an application.
|
(package private) static JFrame |
appFrame_
Description of the Field
|
(package private) static jOggPlayer |
applicationPlayer
The instantied class.
|
private static int |
appXpos
the x position of the app window.
|
private static int |
appYpos
the y position of the app window.
|
private static boolean |
areWeUsingProxy_
Flag to control use of the proxy.
|
(package private) static ColouredLabel |
artistLabel
The artist Coloured text label.
|
(package private) static ColouredLabel |
artistLabelValue
Description of the Field
|
(package private) static boolean |
autoPlayOnStart_
Flag to specify if the playlist gets auto started on startup.
|
(package private) String[] |
availableTextureNames_
Description of the Field
|
(package private) Image |
backgroundTexture_
Description of the Field
|
(package private) String |
backgroundTextureFilename_
Description of the Field
|
(package private) static KPanel |
bodyPanel
Description of the Field
|
(package private) byte[] |
buffer
Description of the Field
|
(package private) int |
bufferLengthInBytes
Description of the Field
|
(package private) static int |
bufferMultiple_
The File Load Play Buffer.
|
(package private) static int |
bufferSize_
The File Load Play Buffer.
|
(package private) KButton |
button
Description of the Field
|
(package private) KButton |
buttonAddToPlaylist
Description of the Field
|
(package private) KButton |
buttonAddUrlToPlaylist
Description of the Field
|
(package private) Color |
buttonBackColour_
Description of the Field
|
(package private) KButton |
buttonDeleteFromPlaylist
Description of the Field
|
(package private) KButton |
buttonLast
Description of the Field
|
(package private) KButton |
buttonLoveLastfmTrack
Description of the Field
|
(package private) KButton |
buttonNext
Description of the Field
|
(package private) static KPanel |
buttonPanel
Description of the Field
|
(package private) KButton |
buttonPause
Description of the Field
|
(package private) KButton |
buttonRefreshPlaylist
Description of the Field
|
(package private) int |
bytes
Description of the Field
|
private ConfigurationManager |
cfgmgr_ |
(package private) int |
channels
Description of the Field
|
(package private) JCheckBox |
checkBoxLoop
Description of the Field
|
(package private) JCheckBox |
checkBoxMiniView
Description of the Field
|
(package private) JCheckBox |
checkBoxPlaylist
Description of the Field
|
(package private) JCheckBox |
checkBoxRandom
Description of the Field
|
(package private) static JCheckBox |
checkBoxRecursePlaylist
Description of the Field
|
(package private) static KPanel |
checkPanel
Description of the Field
|
private static String |
className_
A Class holder for its name (used in Logging).
|
(package private) static String |
CLASSPATH
Class holder for the classpath.
|
(package private) static URL |
codeBase_
The codebase dir when running as an applet.
|
private static String |
configFileName_
The jOggPlayer persistant config data file.
|
(package private) int |
controlHeight_
Description of the Field
|
(package private) static KPanel |
controlPanel
Description of the Field
|
(package private) static byte[] |
convbuffer
Description of the Field
|
(package private) static int |
convsize
Description of the Field
|
(package private) double |
currentVolumeMultiplier_
Description of the Field
|
(package private) int |
currVolSetting_
Description of the Field
|
(package private) Date |
date
Description of the Field
|
private static String[] |
DEFAULT_TEXTURE_NAMES
Description of the Field
|
(package private) ActionListener |
deleteAllActionListener
Listener For the Delete ALL Songs from the Playlist Button
|
(package private) ActionListener |
deleteSelectedSongActionListener
Listener For the Delete Selected Song Playlist Button
|
(package private) ActionListener |
deselectAllAsFavouriteSongActionListener
Listener For the select all as favourite Songs menuitem
|
(package private) static Color |
displayBackColour_
The colour used to back the display area.
|
(package private) Font |
displayFont_
Description of the Field
|
(package private) Font |
displayFontBold_
Description of the Field
|
(package private) int |
displayHeight_
Description of the Field
|
(package private) static JPopupMenu |
displayMenu
Description of the Field
|
(package private) static JPanel |
displayPanel
The panel used to hold all the display components.
|
(package private) static Color |
displayTextColour_
The display area text colour.
|
(package private) int |
displayWidth_
Description of the Field
|
(package private) static KPanel |
dragableMiniViewPanel
Description of the Field
|
(package private) MouseMotionAdapter |
dragMiniViewMotionListener
This Listener watches/listens where the mini window is being dragged to
so it can be repainted on the screen because the miniwindow does NOT
have a Java created titlebar so I have to mimic the window move.
|
(package private) int |
format
Description of the Field
|
(package private) static Dimension |
frameCurrentSize_
Description of the Field
|
(package private) static Dimension |
frameInitSize_
Description of the Field
|
(package private) int |
frameSizeInBytes
Description of the Field
|
(package private) static KPanel |
headerPanel
Description of the Field
|
(package private) static String |
helpHtmlStr_ |
(package private) static ColouredLabel |
helpLabel_
The help Text Label html String
|
(package private) ImageIcon |
iconAdd_
Description of the Field
|
(package private) ImageIcon |
iconAddUrl_
Description of the Field
|
(package private) ImageIcon |
iconBack_
Description of the Field
|
(package private) ImageIcon |
iconDelete_
Description of the Field
|
(package private) ImageIcon |
iconForward_
Description of the Field
|
(package private) static JarFile |
iconJar
Description of the Field
|
(package private) ImageIcon |
iconLoop_
Description of the Field
|
(package private) ImageIcon |
iconLoveTrack_
Description of the Field
|
(package private) ImageIcon |
iconMiniBack_
Icon For going back a song.
|
(package private) ImageIcon |
iconMiniClose_
Description of the Field
|
(package private) ImageIcon |
iconMiniForward_
Description of the Field
|
(package private) ImageIcon |
iconMiniPause_
Description of the Field
|
(package private) ImageIcon |
iconMiniPlay_
Description of the Field
|
(package private) ImageIcon |
iconMiniStop_
Description of the Field
|
(package private) ImageIcon |
iconMiniView_ |
(package private) ImageIcon |
iconPause_
Description of the Field
|
(package private) ImageIcon |
iconPlay_
Description of the Field
|
(package private) ImageIcon |
iconRefresh_
Description of the Field
|
(package private) ImageIcon |
iconSelectedLoop
Description of the Field
|
(package private) ImageIcon |
iconStop_
Description of the Field
|
(package private) ImageIcon |
iconVolOff_
Muted Icon
|
(package private) ImageIcon |
iconVolOn_
Unmuted Icon
|
(package private) static String |
IMAGE_DIR
The dir where the images are located.
|
(package private) static String[] |
initArgs_
The commandline args that get passed to the app.
|
(package private) static JPanel |
innerDisplayPanel
Description of the Field
|
(package private) int |
innerDisplayPanelHeight_
Description of the Field
|
(package private) int |
innerDisplayPanelWidth_
Description of the Field
|
(package private) static KPanel |
innerFooterPanel
This is where the small buttons and playlist lives.
|
(package private) static KPanel |
innerHeaderPanel
Description of the Field
|
(package private) static JPanel |
innerLeftDisplayPanel
Description of the Field
|
(package private) int |
innerLeftDisplayPanelHeight_
Description of the Field
|
(package private) int |
innerLeftDisplayPanelWidth_
Description of the Field
|
(package private) static KPanel |
innerPanel
Description of the Field
|
(package private) static KPanel |
innerPlaylistPanel
Description of the Field
|
(package private) static JPanel |
innerRightDisplayPanel
Description of the Field
|
(package private) int |
innerRightDisplayPanelHeight_
Description of the Field
|
private static String |
lastFM_key
Last.FM Scrobbler Object
|
private static String |
lastFM_secret |
private static Session |
lastFM_Session |
private static String |
lastFM_SessionKey |
(package private) Date |
lastFM_songStartTime_ |
private static String |
lastFM_token |
(package private) String |
lastFM_userId |
(package private) String |
lastFM_userPass |
(package private) boolean |
lastFMConnected_ |
(package private) Session |
lastFMSession_ |
(package private) static int |
left_vol_scale
Description of the Field
|
(package private) static KPanel |
leftPanel
Description of the Field
|
protected static Log |
log_
The Log that will get used.
|
private static String |
logFile_
The Log Filename.
|
(package private) boolean |
logVolumeScale_
Description of the Field
|
(package private) Thread |
looperThread_
Description of the Field
|
(package private) boolean |
looping_
Small flag when a songs are looping.
|
(package private) Runnable |
loopingRunnable_
Runs the Looping of Songs in its own thread.
|
(package private) boolean |
loopPaused_
Description of the Field
|
(package private) static Color |
mainBackColour_
The colour used for all panels except the display area.
|
(package private) static JPopupMenu |
mainMenu
Description of the Field
|
(package private) static int |
maxVolScale_
Description of the Field
|
(package private) KButton |
miniButtonClose_
Description of the Field
|
(package private) KButton |
miniButtonLast
Description of the Field
|
(package private) KButton |
miniButtonNext
Description of the Field
|
(package private) static KPanel |
miniButtonPanel
Description of the Field
|
(package private) KButton |
miniButtonPause
Description of the Field
|
(package private) KButton |
miniButtonPlay
Description of the Field
|
(package private) KButton |
miniButtonView_
Description of the Field
|
(package private) KButton |
miniDragButton
Description of the Field
|
(package private) ColouredLabel |
miniDragLabel
Description of the Field
|
(package private) static ColouredLabel |
miniTimeLabelValue
Description of the Field
|
(package private) MouseAdapter |
miniViewMouseListener
This Listener gets the first event when the mini view title bar is
pressed so it can remember the original location of mini window.
|
(package private) static KPanel |
miniViewPanel
Description of the Field
|
(package private) static boolean |
miniViewShowing_
Description of the Field
|
(package private) static KPanel |
miniViewWindowControlPanel
Description of the Field
|
(package private) static KButton |
muteButton_
The Volume Slider.
|
(package private) static int |
mutedVolume_
The last volume before mute.
|
(package private) InputStream |
oggBitStream_
Description of the Field
|
(package private) Packet |
oggPacket_
Description of the Field
|
(package private) Page |
oggPage_
Description of the Field
|
(package private) StreamState |
oggStreamState_
Description of the Field
|
(package private) SyncState |
oggSyncState_
Description of the Field
|
(package private) SourceDataLine |
outputLine
The sound output data line.
|
(package private) KPanel |
panel
This is the main panel that lives inside the content pane.
|
(package private) Thread |
playerThread_
Description of the Field
|
(package private) boolean |
playing_
flag to control the players thread.
|
(package private) PlayList |
playList
Description of the Field
|
(package private) Color |
playlistBackColour_
Description of the Field
|
(package private) JCheckDropDown |
playListComboBox
My own creation - a Dropdown box that can hold checkMarked Items.
|
(package private) static String |
playListDir_
Description of the Field
|
(package private) String |
playListFilename_
Description of the Field
|
(package private) int |
playlistHeight_
Description of the Field
|
(package private) static JPopupMenu |
playlistMenu
Description of the Field
|
(package private) boolean |
playListShowing_
Description of the Field
|
(package private) static MouseListener |
popupListener_
Popup menu Mouse Listener.
|
protected static JWindow |
popUpWin_
The JWindow for the miniView.
|
(package private) int |
progressCount_
Description of the Field
|
private static String |
proxyHost_
Host for the proxy.
|
private static String |
proxyNoProxy_
A list of sites that bypass the proxy.
|
private static String |
proxyPassword_
Password for the proxy authentication.
|
private static String |
proxyPort_
Port for the proxy .
|
private static String |
proxyUsername_
Username for the proxy authentication.
|
(package private) int |
rate
Description of the Field
|
(package private) ResponseStatus |
resp_ |
(package private) static int |
right_vol_scale
Description of the Field
|
(package private) static KPanel |
rightPanel
Description of the Field
|
(package private) static boolean |
running_as_applet
Description of the Field
|
(package private) ActionListener |
saveFavouritesActionListener
Listener For the Save Favourites to a file Button
|
(package private) ActionListener |
savePlaylistActionListener
Listener For the Save Playlist to a file Button
|
(package private) Scrobbler |
sc_ |
(package private) ScrobbleResult |
scrobbleResult_ |
(package private) ActionListener |
selectAllAsFavouriteSongActionListener
Listener For the select all as favourite Songs menuitem
|
(package private) boolean |
showButtonBorders_
Description of the Field
|
(package private) static boolean |
showMiniViewOnStart_
Flag to show the mini view on startup, It gets read from the config file.
|
(package private) static boolean |
showPlaylistOnStart_
Flag to show the playlist on startup, It gets read from the config file.
|
(package private) boolean |
showTextures_
Description of the Field
|
(package private) Vector |
songComments_
Description of the Field
|
(package private) static int |
songInfoDisplayDismissDelay_
The dismiss delay time for the song info Dispay tooltip.
|
(package private) JProgressBar |
songProgress
Description of the Field
|
(package private) int |
songProgressHeight_
Description of the Field
|
(package private) long |
songStartTime_
Description of the Field
|
(package private) ActionListener |
sortByAlbumActionListener
Listener For the sorting the playlist by filename
|
(package private) ActionListener |
sortByFilenameActionListener
Listener For the sorting the playlist by filename
|
private static String |
SYSTEM_FILE_SEPERATOR
Constant holding the users file seperator. ("/" or "\")
|
(package private) static ColouredLabel |
timeLabel
Description of the Field
|
(package private) static ColouredLabel |
timeLabelValue
Description of the Field
|
(package private) boolean |
timerRunning_
Description of the Field
|
(package private) jOggPlayer.TimerThread |
timeWatcherThread_ |
(package private) static ColouredLabel |
titleLabel
Description of the Field
|
(package private) static ColouredLabel |
titleLabelValue
Description of the Field
|
(package private) int |
uiFontSize_
The default font size for all UI controls
|
private static boolean |
USE_LASTFM_2 |
private static boolean |
useProxyAuthentication_
Flag to control use of the proxy with authentication.
|
(package private) static String |
USER_DIR
Class holder for the users dir.
|
(package private) static GraphicsEnvironment |
USER_GRAPHIC_ENV
The Java2 Graphics environment (getrs some platform local data).
|
(package private) static String |
VERSION
The version string for this release.
|
(package private) Color |
volumeBackColour_
Description of the Field
|
(package private) static JSlider |
volumeSlider_
The Volume Slider.
|
(package private) int |
volumeWidth_
Description of the Field
|
(package private) Block |
vorbisBlock
Description of the Field
|
(package private) Comment |
vorbisComment
Description of the Field
|
(package private) DspState |
vorbisDspState
Description of the Field
|
(package private) Info |
vorbisInfo
Description of the Field
|
private int |
XDifference
The X amount the current window was just dragged.
|
private static int |
xpos
the x position of the mini window.
|
private int |
YDifference
The Y amount the current window was just dragged.
|
private static int |
ypos
the y position of the mini window.
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
jOggPlayer()
Basic constructor for this Object.
|
jOggPlayer(String[] args)
Constructor for this Object to initated the playlist with the file/songname
args that are passed to it, if the passed args is empty or values are invalid
- the default playlistfile is loaded.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Handles all the Actions originating from the Control Buttons
|
private void |
autoPlay() |
private void |
createConfigs()
Creates all the storable data in to the config manager.
|
URL |
getCodeBase() |
static String |
getLastfmErrorType(int err)
A small Lookup method to translate the Last.fm ResponseStatus code into a String
|
Session |
getLastFMSession() |
Session |
getLastFMSession(String token,
String apiKey,
String secret) |
private SourceDataLine |
getOutputLine(int channels,
int rate)
Gets the OutputLine attribute of the jOggPlayer object
|
private String |
getSongCommentPopup(int songIndex)
Gets the Vorbis comment popup text for the selected song info.
|
Scrobbler |
handshakeWithLastfm(String userId)
Registers and handshakes with last.fm
|
Scrobbler |
handshakeWithLastfm(String userId,
String passWd) |
Scrobbler |
handshakeWithLastfmOLD(String userId)
Registers and handshakes with last.fm
|
private void |
init_audio(int channels,
int rate)
Initializes the jOggPlayer audio line variables.
|
private void |
init_jorbis()
Initializes all the jOrbis and jOgg vars that are used for song playback.
|
void |
init()
A helper method that initializes the required class vars.
|
private void |
initMenus()
Gets the Menus setup.
|
void |
initProxy()
Does the gruntwork to get the proxy properties set.
|
private void |
initUI()
Gets the GUI setup *
|
private void |
loadConfigs()
Loads all the storable data from the config manager.
|
private void |
loadIconImages()
Loads / initializes the class vars for all required icons and images this
app/let uses.
|
private String[] |
loadTextureNames()
Loads the names of the textures available in this classes jar file.
|
boolean |
loveLastfmCurrentTrack()
A small Lookup method to translate the Last.fm ResponseStatus code into a String
|
static void |
main(String[] arg)
The main program for the jOggPlayer class
|
private int |
readFromStream(byte[] buffer,
int index,
int bufferSize_)
Reads from the oggBitStream_ a specified number of Bytes(bufferSize_) worth
sarting at index and puts them in the specified buffer[].
|
void |
run()
The Runnable to do the actual playing of the song.
|
private void |
setColours()
Sets all the Various colours to their current variable values.
|
private void |
setDisplayFont(Font newFont)
Changes all the Labels in the Display area to the ne font.
|
private static void |
showMiniView(boolean showIt)
Switches to or from the mini view.
|
private void |
showPlaylistPanel(boolean showIt)
Switches the Playlist panel on/off.
|
void |
start()
The applet start *
|
private void |
startTimer()
Helper method to encapsulate the starting of the timeWatcherRunnable_
|
void |
stop()
Stops the current playing oggStream in the playerStream_.
|
private void |
storeConfigs()
Puts all the storable data in to the config manager in prep for saving.
|
private void |
tryPlay(String item)
Attempts to Play the Ogg File At the Specified URL String.
|
private void |
tryPlay(URL url)
Attempts to Play the Ogg File At the Specified URL.
|
private String |
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.
|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final String SYSTEM_FILE_SEPERATOR
private static final String APP_NAME
private static final boolean USE_LASTFM_2
private static String className_
private int XDifference
private int YDifference
private static int xpos
private static int ypos
private static int appXpos
private static int appYpos
private static String configFileName_
static final GraphicsEnvironment USER_GRAPHIC_ENV
static URL appCodeBase_
static jOggPlayer applicationPlayer
static String playListDir_
static Color mainBackColour_
static Color displayBackColour_
static Color displayTextColour_
static int songInfoDisplayDismissDelay_
static final int maxVolScale_
static int left_vol_scale
static int right_vol_scale
static Dimension frameInitSize_
static Dimension frameCurrentSize_
static JCheckBox checkBoxRecursePlaylist
static boolean showPlaylistOnStart_
static boolean autoPlayOnStart_
static boolean showMiniViewOnStart_
static KButton muteButton_
static int mutedVolume_
static JSlider volumeSlider_
private static boolean areWeUsingProxy_
private static boolean useProxyAuthentication_
private static String proxyUsername_
private static String proxyPassword_
private static String proxyHost_
private static String proxyPort_
private static String proxyNoProxy_
static String helpHtmlStr_
static ColouredLabel helpLabel_
static ColouredLabel artistLabel
static ColouredLabel titleLabel
static ColouredLabel timeLabel
static ColouredLabel artistLabelValue
static ColouredLabel titleLabelValue
static ColouredLabel timeLabelValue
static ColouredLabel miniTimeLabelValue
static KPanel headerPanel
static KPanel dragableMiniViewPanel
static KPanel miniViewPanel
static KPanel miniViewWindowControlPanel
static KPanel innerPanel
static KPanel rightPanel
static KPanel innerHeaderPanel
static JPanel displayPanel
static KPanel controlPanel
static KPanel innerFooterPanel
static JPanel innerDisplayPanel
static JPanel innerLeftDisplayPanel
static JPanel innerRightDisplayPanel
static KPanel innerPlaylistPanel
static KPanel checkPanel
static KPanel buttonPanel
static KPanel miniButtonPanel
static JPopupMenu mainMenu
static JPopupMenu playlistMenu
static JPopupMenu displayMenu
static MouseListener popupListener_
static int bufferMultiple_
static int bufferSize_
static int convsize
static byte[] convbuffer
static boolean running_as_applet
boolean playListShowing_
static boolean miniViewShowing_
boolean playing_
boolean loopPaused_
boolean timerRunning_
boolean logVolumeScale_
boolean showButtonBorders_
boolean showTextures_
boolean looping_
Thread playerThread_
Thread looperThread_
double currentVolumeMultiplier_
long songStartTime_
int progressCount_
String playListFilename_
Color playlistBackColour_
Color buttonBackColour_
Color volumeBackColour_
int uiFontSize_
private static final String[] DEFAULT_TEXTURE_NAMES
String[] availableTextureNames_
Font displayFont_
Font displayFontBold_
int currVolSetting_
int playlistHeight_
int innerLeftDisplayPanelHeight_
int innerLeftDisplayPanelWidth_
int innerRightDisplayPanelHeight_
int innerDisplayPanelHeight_
int innerDisplayPanelWidth_
int songProgressHeight_
int controlHeight_
int volumeWidth_
int displayHeight_
int displayWidth_
Image aboutGraphic_
Image backgroundTexture_
ImageIcon iconLoveTrack_
ImageIcon iconMiniView_
ImageIcon iconMiniClose_
ImageIcon iconDelete_
ImageIcon iconAddUrl_
ImageIcon iconRefresh_
ImageIcon iconPause_
ImageIcon iconForward_
ImageIcon iconMiniPlay_
ImageIcon iconMiniPause_
ImageIcon iconMiniStop_
ImageIcon iconMiniForward_
ImageIcon iconMiniBack_
ImageIcon iconVolOn_
ImageIcon iconVolOff_
ImageIcon iconSelectedLoop
String backgroundTextureFilename_
KPanel panel
KButton miniDragButton
ColouredLabel miniDragLabel
KButton buttonLoveLastfmTrack
KButton buttonDeleteFromPlaylist
KButton buttonAddToPlaylist
KButton buttonAddUrlToPlaylist
KButton buttonRefreshPlaylist
KButton buttonPause
KButton buttonLast
KButton buttonNext
KButton miniButtonPlay
KButton miniButtonPause
KButton miniButtonLast
KButton miniButtonNext
KButton miniButtonView_
KButton miniButtonClose_
JCheckBox checkBoxLoop
JCheckBox checkBoxRandom
JCheckBox checkBoxPlaylist
JCheckBox checkBoxMiniView
JProgressBar songProgress
InputStream oggBitStream_
byte[] buffer
int bytes
int rate
int channels
SourceDataLine outputLine
Vector songComments_
private static String lastFM_key
private static String lastFM_secret
private static String lastFM_token
private static Session lastFM_Session
private static String lastFM_SessionKey
String lastFM_userId
String lastFM_userPass
Date lastFM_songStartTime_
ScrobbleResult scrobbleResult_
ResponseStatus resp_
boolean lastFMConnected_
Session lastFMSession_
ActionListener selectAllAsFavouriteSongActionListener
ActionListener deselectAllAsFavouriteSongActionListener
MouseAdapter miniViewMouseListener
MouseMotionAdapter dragMiniViewMotionListener
ActionListener deleteSelectedSongActionListener
ActionListener saveFavouritesActionListener
ActionListener savePlaylistActionListener
ActionListener sortByFilenameActionListener
ActionListener sortByAlbumActionListener
ActionListener deleteAllActionListener
ActionListener addSongActionListener
ActionListener addFromPlaylistActionListener
ActionListener addURLActionListener
Runnable loopingRunnable_
jOggPlayer.TimerThread timeWatcherThread_
JCheckDropDown playListComboBox
SyncState oggSyncState_
StreamState oggStreamState_
Packet oggPacket_
Info vorbisInfo
Comment vorbisComment
DspState vorbisDspState
Block vorbisBlock
int format
int frameSizeInBytes
int bufferLengthInBytes
private ConfigurationManager cfgmgr_
public jOggPlayer()
public jOggPlayer(String[] args)
args
- is a set of ogg file names to initially load (it can be a directory
name)public Scrobbler handshakeWithLastfm(String userId)
public Scrobbler handshakeWithLastfm(String userId, String passWd)
public Scrobbler handshakeWithLastfmOLD(String userId)
public static String getLastfmErrorType(int err)
public boolean loveLastfmCurrentTrack()
public Session getLastFMSession()
public Session getLastFMSession(String token, String apiKey, String secret)
public URL getCodeBase()
getCodeBase
in class Applet
private void setColours()
private void setDisplayFont(Font newFont)
newFont
- The new DisplayFont valueprivate SourceDataLine getOutputLine(int channels, int rate)
channels
- Description of Parameterrate
- Description of Parameterprivate String[] loadTextureNames()
private void loadIconImages()
private void init_jorbis()
private void init_audio(int channels, int rate)
channels
- Description of Parameterrate
- Description of Parameterprivate int readFromStream(byte[] buffer, int index, int bufferSize_)
buffer
- index
- bufferSize_
- private void startTimer()
private void tryPlay(URL url)
url
- the url for the song to playprivate void tryPlay(String item)
item
- Description of Parameterprivate String getSongCommentPopup(int songIndex)
songIndex
- is the playlist index to popupprivate String updateDisplayPopup()
private void initMenus()
private void showPlaylistPanel(boolean showIt)
showIt
- specifies whether to view or not.private static void showMiniView(boolean showIt)
showIt
- specifies whether to go to mini view or not.private void initUI()
private void autoPlay()
public void initProxy()
public static void main(String[] arg)
arg
- The command line argumentspublic void init()
public void run()
public void stop()
private void loadConfigs()
private void storeConfigs()
private void createConfigs()
public double volumeMultiplier(int currSetting)
currSetting
- is the linear value to convert. Acceptable values: 0 =
mute, 10 = full, 11 is for fun.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- Description of ParameterWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses