Package org.wikipediacleaner.gui.swing.worker

Examples of org.wikipediacleaner.gui.swing.worker.SendWorker


      }
    }

    // Send page
    final Configuration configuration = Configuration.getConfiguration();
    SendWorker sendWorker = new SendWorker(
        getWiki(), window,
        page, textPage.getText(), textComment.getText(),
        configuration.getBoolean(
            null,
            ConfigurationValueBoolean.FORCE_WATCH),
        false, false, updateISBNWarning, createISBNWarning,
        contributions, errorsFixed);
    sendWorker.setListener(new DefaultBasicWorkerListener() {
      @Override
      public void afterFinished(
          @SuppressWarnings("unused") BasicWorker worker,
          boolean ok) {
        afterSendingFinished(errorsFixed, ok);
      }
    });
    sendWorker.start();
  }
View Full Code Here


    }
    if (hideWindow) {
      getParentComponent().setExtendedState(Frame.ICONIFIED);
    }
    getParentComponent().setTitle(GT._("Sending {0}", page.getTitle()));
    SendWorker sendWorker = new SendWorker(
        getWikipedia(), this, page, getTextContents().getText(),
        (textComment != null) ?
            textComment.getText() :
            getWikipedia().getConfiguration().getUpdatePageMessage(),
        forceWatch,
        updateDabWarning, createDabWarning,
        updateISBNWarning, createISBNWarning,
        getContributions(), errorsFixed);
    sendWorker.setListener(new DefaultBasicWorkerListener() {
      @Override
      public void afterFinished(
          BasicWorker worker,
          boolean ok) {
        if (!worker.shouldContinue()) {
          return;
        }
        if (ok) {
          if ((chkCloseAfterSend != null) && chkCloseAfterSend.isSelected()) {
            dispose();
          } else {
            worker.getWindow().setWindowTitle(getTitle());
            worker.getWindow().setExtendedState(oldState);
            actionReload();
          }
        } else {
          worker.getWindow().setWindowTitle(getTitle());
          worker.getWindow().setExtendedState(oldState);
        }
      }
    });
    sendWorker.start();
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.gui.swing.worker.SendWorker

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.