Package me.aurous.ui.widgets

Examples of me.aurous.ui.widgets.ImporterWidget


                playListOut);
            final BufferedWriter bw = new BufferedWriter(
                new OutputStreamWriter(fos));
            final String header = "Title, Artist, Time, Date Added, User, Album, ALBUMART_INDEX, link";
            int iterations = 0;
            final ImporterWidget importWidget = UISession
                .getImporterWidget();
            final DiscoWidget discoWidget = UISession
                .getDiscoWidget();
            bw.write(header);
            bw.newLine();
            for (final Element link : links) {
              if (((importWidget != null) && importWidget
                  .isOpen())
                  || ((discoWidget != null) && discoWidget
                      .isOpen())) {
                if ((discoWidget != null)
                    && (discoWidget.getDiscoProgressBar() != null)) {

                  iterations += 1;

                  final int percent = (int) ((iterations * 100.0f) / links
                      .size());

                  discoWidget.getDiscoProgressBar().setValue(
                      percent);
                  PlayListUtils.disableDiscoInterface();
                } else if ((importWidget != null)
                    && (importWidget.getImportProgressBar() != null)) {
                  iterations += 1;

                  final int percent = (int) ((iterations * 100.0f) / links
                      .size());

                  importWidget.getImportProgressBar()
                      .setValue(percent);
                  PlayListUtils.disableImporterInterface();
                }
                if (link.attr("abs:href").contains("watch?v=")
                    && (link.text().length() > 0)
View Full Code Here


  }

  public static void disableImporterInterface() {

    final ImporterWidget widget = UISession.getImporterWidget();
    widget.getImportProgressBar().setVisible(true);

    widget.getImportPlayListButton().setEnabled(false);
    widget.getImportInstrucLabel().setText("Importing Playlist");
    widget.getEnterPlaylistLabel().setText("");

  }
View Full Code Here

    }

  }

  public static void resetImporterInterface() {
    final ImporterWidget widget = UISession.getImporterWidget();
    if (widget != null) {
      widget.getImportProgressBar().setValue(0);
      widget.getImportProgressBar().setVisible(false);
      widget.getImportInstrucLabel().setText("Import Playlist");
      widget.getEnterPlaylistLabel().setText("Enter a Playlist Name");
      widget.getImportPlayListButton().setEnabled(true);
    }

  }
View Full Code Here

TOP

Related Classes of me.aurous.ui.widgets.ImporterWidget

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.