Examples of MWPaneFormatter


Examples of org.wikipediacleaner.gui.swing.component.MWPaneFormatter

    CheckErrorPage errorSelected = getSelectedError();
    if (errorSelected == null) {
      textPage.setFormatter(new MWPaneBasicFormatter());
    } else {
      CheckErrorAlgorithm algorithm = errorSelected.getAlgorithm();
      MWPaneFormatter formatter = textPage.getFormatter();
      if (formatter instanceof MWPaneCheckWikiFormatter) {
        MWPaneCheckWikiFormatter cwFormatter =
          (MWPaneCheckWikiFormatter) formatter;
        if (!cwFormatter.isSameAlgorithm(algorithm)) {
          formatter = new MWPaneCheckWikiFormatter(algorithm);
View Full Code Here

Examples of org.wikipediacleaner.gui.swing.component.MWPaneFormatter

        for (int i = 0; i < selection.length; i++) {
          if (selection[i] instanceof Page) {
            pages.add((Page) selection[i]);
          }
        }
        MWPaneFormatter formatter = getTextContents().getFormatter();
        if (formatter instanceof MWPaneDisambiguationFormatter) {
          MWPaneDisambiguationFormatter dabFormatter =
            (MWPaneDisambiguationFormatter) formatter;
          if (!dabFormatter.isSameList(pages)) {
            formatter = new MWPaneDisambiguationFormatter(getWikipedia(), pages);
            getTextContents().setFormatter(formatter);
          }
        } else {
          formatter = new MWPaneDisambiguationFormatter(getWikipedia(), pages);
          getTextContents().setFormatter(formatter);
        }
        MWPanePopupListener listener = new MWPaneDisambiguationPopupListener(
            getWikipedia(), OnePageAnalysisWindow.this);
        getTextContents().setPopupListener(listener);
      }
    } else if (list == listErrors) {
      // List of errors
      Object selection = listErrors.getSelectedValue();
      if ((selection != null) && (selection instanceof CheckErrorPage)) {
        listLinks.clearSelection();
        CheckErrorPage errorSelected = (CheckErrorPage) selection;
        MWPaneFormatter formatter = getTextContents().getFormatter();
        if (formatter instanceof MWPaneCheckWikiFormatter) {
          MWPaneCheckWikiFormatter cwFormatter =
            (MWPaneCheckWikiFormatter) formatter;
          if (!cwFormatter.isSameAlgorithm(errorSelected.getAlgorithm())) {
            formatter = new MWPaneCheckWikiFormatter(errorSelected.getAlgorithm());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.