Examples of PlaylistItem


Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

                String name = playlistName;
                if (!Config.startWithProtocol(playlistName))
                {
                    int indn = playlistName.lastIndexOf(java.io.File.separatorChar);
                    if (indn != -1) name = playlistName.substring(indn + 1);
                    PlaylistItem pli = new PlaylistItem(name, playlistName, -1, true);
                    playlist.appendItem(pli);
                    loaded = true;
                }
                else
                {
                    PlaylistItem pli = new PlaylistItem(name, playlistName, -1, false);
                    playlist.appendItem(pli);
                    loaded = true;
                }
            }
        }
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

                if (playlist != null)
                {
                    playlist.shuffle();
                    playlistUI.initPlayList();
                    // Play from the top
                    PlaylistItem pli = playlist.getCursor();
                    setCurrentSong(pli);
                }
            }
            else
            {
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

            }
            playerState = STOP;
        }
        if ((playerState == INIT) || (playerState == STOP) || (playerState == OPEN))
        {
            PlaylistItem pli = null;
            // Local File.
            if (modifiers == MouseEvent.BUTTON1_MASK)
            {
                File[] file = FileSelector.selectFile(loader, FileSelector.OPEN, false, config.getExtensions(), ui.getResource("button.eject.filedialog.filtername"), new File(config.getLastDir()));
                if (FileSelector.getInstance().getDirectory() != null) config.setLastDir(FileSelector.getInstance().getDirectory().getPath());
                if (file != null)
                {
                    String fsFile = file[0].getName();
                    if (fsFile != null)
                    {
                        // Loads a new playlist.
                        if ((fsFile.toLowerCase().endsWith(ui.getResource("playlist.extension.m3u"))) || (fsFile.toLowerCase().endsWith(ui.getResource("playlist.extension.pls"))))
                        {
                            if (loadPlaylist(config.getLastDir() + fsFile))
                            {
                                config.setPlaylistFilename(config.getLastDir() + fsFile);
                                playlist.begin();
                                playlistUI.initPlayList();
                                setCurrentSong(playlist.getCursor());
                                playlistUI.repaint();
                            }
                        }
                        else if (fsFile.toLowerCase().endsWith(ui.getResource("skin.extension")))
                        {
                            ui.setPath(config.getLastDir() + fsFile);
                            loadSkin();
                            config.setDefaultSkin(ui.getPath());
                        }
                        else pli = new PlaylistItem(fsFile, config.getLastDir() + fsFile, -1, true);
                    }
                }
            }
            // Remote File.
            else if (modifiers == MouseEvent.BUTTON3_MASK)
            {
                UrlDialog UD = new UrlDialog(config.getTopParent(), ui.getResource("button.eject.urldialog.title"), loader.getLocation().x, loader.getLocation().y + 10, config.getLastURL());
                UD.show();
                if (UD.getFile() != null)
                {
                    showTitle(ui.getResource("title.loading"));
                    // Remote playlist ?
                    if ((UD.getURL().toLowerCase().endsWith(ui.getResource("playlist.extension.m3u"))) || (UD.getURL().toLowerCase().endsWith(ui.getResource("playlist.extension.pls"))))
                    {
                        if (loadPlaylist(UD.getURL()))
                        {
                            config.setPlaylistFilename(UD.getURL());
                            playlist.begin();
                            playlistUI.initPlayList();
                            setCurrentSong(playlist.getCursor());
                            playlistUI.repaint();
                        }
                    }
                    // Remote file or stream.
                    else
                    {
                        pli = new PlaylistItem(UD.getFile(), UD.getURL(), -1, false);
                    }
                    config.setLastURL(UD.getURL());
                }
            }
            if ((pli != null) && (playlist != null))
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

     */
    protected void processPlay(int modifiers)
    {
        if (playlist.isModified()) // playlist has been modified since we were last there, must update our cursor pos etc.
        {
            PlaylistItem pli = playlist.getCursor();
            if (pli == null)
            {
                playlist.begin();
                pli = playlist.getCursor();
            }
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

    public void processNext(int modifiers)
    {
        // Try to get next song from the playlist
        playlist.nextCursor();
        playlistUI.nextCursor();
        PlaylistItem pli = playlist.getCursor();
        setCurrentSong(pli);
    }
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

    public void processPrevious(int modifiers)
    {
        // Try to get previous song from the playlist
        playlist.previousCursor();
        playlistUI.nextCursor();
        PlaylistItem pli = playlist.getCursor();
        setCurrentSong(pli);
    }
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

        {
            if ((playerState == PAUSE) || (playerState == PLAY))
            {
                playlist.nextCursor();
                playlistUI.nextCursor();
                PlaylistItem pli = playlist.getCursor();
                setCurrentSong(pli);
            }
        }
        else if (state == BasicPlayerEvent.PLAYING)
        {
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

            // Add all dropped files to playlist.
            ListIterator li = files.listIterator();
            while (li.hasNext())
            {
                File file = (File) li.next();
                PlaylistItem pli = null;
                if (file != null)
                {
                    pli = new PlaylistItem(file.getName(), file.getAbsolutePath(), -1, true);
                    if (pli != null) playlist.appendItem(pli);
                }
            }
            // Start the playlist from the top.
            playlist.nextCursor();
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

                {
                    // PlaylistItems available ?
                    if (playlist.getPlaylistSize() > 0)
                    {
                        playlist.begin();
                        PlaylistItem rpli = playlist.getCursor();
                        if (rpli != null)
                        {
                            // OK, Repeat the playlist.
                            rpli.getTagInfo();
                            currentSongName = rpli.getFormattedName();
                            currentFileOrURL = rpli.getLocation();
                            currentIsFile = rpli.isFile();
                            currentPlaylistItem = rpli;
                        }
                    }
                    // No, so display Title.
                    else
View Full Code Here

Examples of plugins.audioPlayer.javazoom.jlgui.player.amp.playlist.PlaylistItem

            for (int i = 0; i < n; i++)
            {
                if (i < parent.getTopIndex()) continue;
                int k = i - parent.getTopIndex();
                if (listarea[1] + 12 + k * 12 > listarea[3]) break;
                PlaylistItem pli = parent.getPlaylist().getItemAt(i);
                String name = pli.getFormattedName();
                if (pli.isSelected())
                {
                    g.setColor(selectedBackgroundColor);
                    g.fillRect(listarea[0] + 4, listarea[1] + 12 - 10 + k * 12, listarea[2] - listarea[0] - 4, 14);
                }
                if (i == currentSelection) g.setColor(currentColor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.