Package org.wikipediacleaner.gui.swing.action

Examples of org.wikipediacleaner.gui.swing.action.ReplaceAllLinksAction


      int fixedEndLink = 0;
      String title = LinkReplacement.getLastReplacement(page.getTitle());
      if (title != null) {
        fixedBeginLink += addItem(
            submenuLink, null, title, true,
            new ReplaceAllLinksAction(textPane, page, title, null));
        fixedBeginLink += addSeparator(submenuLink);
      }

      for (Page p : links) {
        if (p.isRedirect()) {
          JMenu submenu1 = new JMenu(p.getTitle());
         
          Iterator<Page> iter = p.getRedirectIteratorWithPage();
          while (iter.hasNext()) {
            Page pageTmp = iter.next();
            addItem(
                submenu1, pageTmp, null, true,
                new ReplaceAllLinksAction(textPane, page, pageTmp.getTitle(), null));
          }
         
          submenuLink.add(submenu1);
        } else {
          addItem(
              submenuLink, p, null, true,
              new ReplaceAllLinksAction(textPane, page, p.getTitle(), null));
        }
      }

      title = LinkReplacement.getLastReplacement(page.getTitle());
      if (title != null) {
        fixedEndLink += addSeparator(submenuLink);
        fixedEndLink += addItem(
            submenuLink, null, title, true,
            new ReplaceAllLinksAction(textPane, page, title, null));
      }

      addSubmenu(popup, submenuLink, fixedBeginLink, fixedEndLink);
    }
  }
View Full Code Here


          String text = GT._(
              "Link \"{0}\" to \"{1}\"", new Object[] { p.getTitle(), newTitle });
          JMenuItem menuItem = new JMenuItem(text);
          String warning = getConfiguration().getString(
              WPCConfigurationString.REDIRECT_WARNING_BEFORE_REPLACEMENT);
          menuItem.addActionListener(new ReplaceAllLinksAction(
              getTextContents(), p, newTitle, warning));
          menuFixRedirects.add(menuItem);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.gui.swing.action.ReplaceAllLinksAction

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.