Package com.playlist

Examples of com.playlist.PlaylistI


     * @param tipoListaCriar
     * @return
     */
    public static PlaylistI getPlaylist(String nome, boolean criar, Class<? extends PlaylistI> tipoListaCriar) {
        nome = MusicaGerencia.removeCaracteresEsp(nome);
        PlaylistI playlist = Busca.buscar(playlists, nome);
        if (criar && playlist == null) {
            try {
                playlist = tipoListaCriar.newInstance();
                playlist.setNome(nome);
                playlists.add(playlist);
            } catch (InstantiationException ex) {
                ex.printStackTrace(System.err);
            } catch (IllegalAccessException ex) {
                ex.printStackTrace(System.err);
View Full Code Here


    private void salvar() {
        try {
            if (jTextField_Nome.getText().isEmpty()) {
                throw new IllegalStateException("Informa um nome para sua nova lista.");
            }
            PlaylistI plI = PortaCDs.getPlaylist(jTextField_Nome.getText(), true, PlaylistC.class);
            if (!(plI instanceof PlaylistC)) {
                throw new IllegalStateException("Já existe uma lista com esse nome.\nEscolha outro.");
            }
            playlist = (PlaylistC) plI;
            playlist.getCondicoes().clear();
View Full Code Here

TOP

Related Classes of com.playlist.PlaylistI

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.