Package org.wikipediacleaner.api.data

Examples of org.wikipediacleaner.api.data.PageElement


    int maxRefs = refs.size();
    while (refIndex < maxRefs) {

      // Group references separated only by punctuation characters
      int firstRefIndex = refIndex;
      PageElement firstRef = refs.get(firstRefIndex);
      int lastRefIndex = PageElement.groupElements(refs, firstRefIndex, contents, ",;.\'", separator);
      PageElement lastRef = refs.get(lastRefIndex);
      refIndex = lastRefIndex + 1;

      // Remove possible whitespace characters after last reference
      int tmpIndex = lastRef.getEndIndex();
      boolean finished = false;
      while (!finished) {
        if (tmpIndex >= contents.length()) {
          finished = true;
        } else if (contents.charAt(tmpIndex) == '\n') {
View Full Code Here


  private void formatElementsDirectly(
      StyledDocument doc,
      List<PageElement> elements,
      int begin, int end) {
    for (int i = begin; i < end; i++) {
      PageElement element = elements.get(i);
      int beginIndex = element.getBeginIndex();
      int endIndex = element.getEndIndex();
      Style style = null;
      if (element instanceof PageElementCategory) {
        style = doc.getStyle(ConfigurationValueStyle.CATEGORY.getName());
      } else if (element instanceof PageElementComment) {
        style = doc.getStyle(ConfigurationValueStyle.COMMENTS.getName());
View Full Code Here

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

    // Find where the user has clicked
    PageElement element = pageAnalysis.isInElement(position);

    // Comment
    if (element instanceof PageElementComment) {
      return null;
    }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.data.PageElement

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.