Package org.wikipediacleaner.gui.swing.menu

Examples of org.wikipediacleaner.gui.swing.menu.BasicMenuCreator


      PageElementISBN isbn = (PageElementISBN) element;
      return createDefaultPopupISBN(pageAnalysis, position, isbn);
    }

    // Default menu
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Page: {0}",
        limitTextLength(pageAnalysis.getPage().getTitle(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    menu.addSeparator(popup);
    menu.addView(wikipedia, popup, pageAnalysis.getPage(), false);
    return popup;
  }
View Full Code Here


    // Initialization
    Page page = DataManager.getPage(wikipedia, link.getLink(), null, null, null);

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Page: {0}",
        limitTextLength(page.getTitle(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    menu.addSeparator(popup);
    menu.addView(wikipedia, popup, page, false);
    menu.addAnalyze(wikipedia, popup, page);
    menu.addDisambiguation(wikipedia, popup, page);
    menu.addSeparator(popup);
    menu.addItemRemoveLink(
        popup, link.getDisplayedText(),
        textPane, link.getBeginIndex(), link.getEndIndex());

    return popup;
  }
View Full Code Here

    if (link == null) {
      return null;
    }

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Interwiki: {0}",
        limitTextLength(link.getInterwikiText() + ":" + link.getLink(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);

    return popup;
  }
View Full Code Here

    if (otherWikipedia != null) {
      otherPage = DataManager.getPage(otherWikipedia, link.getLink(), null, null, null);
    }

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(
        link.getLanguage() + ":" +
        limitTextLength(link.getLink(), 50));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    if (otherWikipedia != null) {
      menu.addSeparator(popup);
      menu.addView(otherWikipedia, popup, otherPage, false);
    }

    return popup;
  }
View Full Code Here

        Namespace.IMAGE,
        image.getImage());
    Page page = DataManager.getPage(wikipedia, fullName, null, null, null);

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Image: {0}",
        limitTextLength(image.getImage(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    menu.addSeparator(popup);
    menu.addView(wikipedia, popup, page, false);
    menu.addAnalyze(wikipedia, popup, page);

    return popup;
  }
View Full Code Here

        Namespace.CATEGORY,
        category.getName());
    Page page = DataManager.getPage(wikipedia, fullName, null, null, null);

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Category: {0}",
        limitTextLength(category.getName(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    menu.addSeparator(popup);
    menu.addView(wikipedia, popup, page, false);
    menu.addAnalyze(wikipedia, popup, page);

    return popup;
  }
View Full Code Here

    if (link == null) {
      return null;
    }

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "External link: {0}",
        limitTextLength(link.getLink(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    menu.addSeparator(popup);
    menu.addItemView(null, popup, link.getLink());

    return popup;
  }
View Full Code Here

        Namespace.TEMPLATE,
        template.getTemplateName());
    Page page = DataManager.getPage(wikipedia, fullName, null, null, null);

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Template: {0}",
        limitTextLength(template.getTemplateName(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);
    menu.addSeparator(popup);
    menu.addView(wikipedia, popup, page, false);
    menu.addAnalyze(wikipedia, popup, page);

    return popup;
  }
View Full Code Here

    if (parameter == null) {
      return null;
    }

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Parameter: {0}",
        limitTextLength(parameter.getParameterName(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);

    return popup;
  }
View Full Code Here

    if (function == null) {
      return null;
    }

    // Menu creation
    BasicMenuCreator menu = new BasicMenuCreator();
    JPopupMenu popup = menu.createPopupMenu(GT._(
        "Function: {0}",
        limitTextLength(function.getFunctionName(), 50)));
    menu.addCurrentChapter(popup, position, pageAnalysis);

    return popup;
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.gui.swing.menu.BasicMenuCreator

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.