Package com.tulskiy.musique.playlist

Examples of com.tulskiy.musique.playlist.PlaylistManager


    private Configuration config = app.getConfiguration();
    private PlaylistTabs tabs;
    private List<TableColumnModel> columnModels = new LinkedList<TableColumnModel>();

    public PlaylistPanel() {
        PlaylistManager playlistManager = app.getPlaylistManager();
        ArrayList<Playlist> playlists = playlistManager.getPlaylists();

        setLayout(new BorderLayout());

        tabs = new PlaylistTabs();
        add(tabs, BorderLayout.CENTER);

        List<String> bounds = PlaylistConfiguration.getTabBounds();

        for (int i = 0; i < playlists.size(); i++) {
            Playlist pl = playlists.get(i);
            PlaylistTable newTable = new PlaylistTable(pl, pl.getColumns());
            newTable.setUpDndCCP();
            columnModels.add(newTable.getColumnModel());

            //try to set last position
            try {
                String s = bounds.get(i);
                Integer y = Integer.valueOf(s);
                newTable.scrollRectToVisible(new Rectangle(0, y, 0, 0));
            } catch (Exception ignored) {
            }

            tabs.addTab(pl.getName(), newTable.getScrollPane());
        }

        final Playlist playlist = playlistManager.getActivePlaylist();

        tabs.setSelectedIndex(-1);
        tabs.setSelectedIndex(playlists.indexOf(playlist));

        PlaybackOrder order = app.getPlayer().getPlaybackOrder();
View Full Code Here


            }
        });
    }

    public void saveSettings() {
        PlaylistManager playlistManager = app.getPlaylistManager();
        ArrayList<Playlist> playlists = playlistManager.getPlaylists();

        for (int n = 0; n < columnModels.size(); n++) {
            List<PlaylistColumn> columns = playlists.get(n).getColumns();
            TableColumnModel columnModel = columnModels.get(n);
            for (int i = 0; i < columnModel.getColumnCount(); i++) {
View Full Code Here

        }
        player = new Player();
        Scrobbler scrobbler = new Scrobbler();
        scrobbler.start();

        playlistManager = new PlaylistManager();
        playlistManager.loadPlaylists();

        pluginLoader = new PluginLoader();
        pluginLoader.load();
View Full Code Here

TOP

Related Classes of com.tulskiy.musique.playlist.PlaylistManager

Copyright © 2018 www.massapicom. 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.