Package com.tulskiy.musique.gui.playlist

Examples of com.tulskiy.musique.gui.playlist.PlaylistColumn


    public Playlist addPlaylist(String name) {
        Playlist playlist = new Playlist();
        playlist.setName(name);
        // default columns
        playlist.setColumns(Arrays.asList(
                new PlaylistColumn("Playing", 55, "$isPlaying()"),
                new PlaylistColumn("Name", 325, "[%artist% - ]%title%"),
                new PlaylistColumn("Length", 70, "%length%"),
                new PlaylistColumn("Album", 225, "%album%"),
                new PlaylistColumn("Date", 55, "%year%")));
        playlists.add(playlist);
        notifyListeners(playlist, Event.ADDED);
        return playlist;
    }
View Full Code Here


        setLayout(new BorderLayout());
        searchField = new JTextField();

        ArrayList<PlaylistColumn> columns = new ArrayList<PlaylistColumn>();
        columns.add(new PlaylistColumn("  ", 20, "$isPlaying()"));
        columns.add(new PlaylistColumn("Name", 400, "[%artist% - ]$if3(%title%,%fileName%)"));
        columns.add(new PlaylistColumn("Length", 60, "%length%"));
        columns.add(new PlaylistColumn("Album", 100, "%album%"));

        playlist = playlistTable.getPlaylist();
        table = new PlaylistTable(view, columns);
        table.setTrackSelection(false);
View Full Code Here

        Configuration config = Application.getInstance().getConfiguration();
        List<String> columnsRaw = (List<String>) config.getList(getColumnKey());
        ArrayList<PlaylistColumn> columns = new ArrayList<PlaylistColumn>();
        if (!CollectionUtils.isEmpty(columnsRaw)) {
            for (String columnRaw : columnsRaw) {
                columns.add(new PlaylistColumn(columnRaw));
            }
        }

        return columns;
    }
View Full Code Here

            playlist.setGroupBy(pConf.getString("groupBy"));
            playlist.setLibraryView(pConf.getBoolean("isLibraryView", false));
           
            Iterator cConfs = pConf.configurationsAt("columns.column").iterator();
            while (cConfs.hasNext()) {
                PlaylistColumn column = new PlaylistColumn();

                HierarchicalConfiguration cConf = (HierarchicalConfiguration) cConfs.next();
                column.setName(cConf.getString("name"));
                column.setExpression(cConf.getString("expression"));
                column.setSize(cConf.getInt("size"));
                column.setAllign(cConf.getInt("alignment"));

                playlist.getColumns().add(column);
            }

            playlists.add(playlist);
View Full Code Here

            config.addProperty(getPlaylistKey() + "(-1)" + ".name", playlist.getName());
            config.addProperty(getPlaylistKey() + ".groupBy", playlist.getGroupBy());
            config.addProperty(getPlaylistKey() + ".isLibraryView", playlist.isLibraryView());

            for (int j = 0; j < playlist.getColumns().size(); j++) {
                PlaylistColumn column = playlist.getColumns().get(j);

                if (i == 0 && j == 0) {
                    config.addProperty(getPlaylistKey() + ".columns(-1).column(-1).name", column.getName());
                }
                else {
                    config.addProperty(getPlaylistKey() + ".columns.column(-1).name", column.getName());
                }
                config.addProperty(getPlaylistKey() + ".columns.column.expression", column.getExpression());
                config.addProperty(getPlaylistKey() + ".columns.column.size", column.getSize());
                config.addProperty(getPlaylistKey() + ".columns.column.alignment", column.getAllign());
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.tulskiy.musique.gui.playlist.PlaylistColumn

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.