Examples of PageElement


Examples of org.apache.tapestry5.internal.structure.PageElement

        replay();

        PageElementFactory factory = new PageElementFactoryImpl(source, resolver, null, null, null);
        AttributeToken token = new AttributeToken(null, "name", "value", l);

        PageElement element = factory.newAttributeElement(null, token);

        writer.element("root");

        element.render(writer, queue);

        verify();

        assertEquals(writer.toString(), "<?xml version=\"1.0\"?>\n<root name=\"value\"/>");
    }
View Full Code Here

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

Examples of org.wikipediacleaner.api.data.PageElement

  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

Examples of org.wikipediacleaner.api.data.PageElement

    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
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.