Examples of TextNode


Examples of org.apache.myfaces.trinidadinternal.ui.TextNode

  private UINode _getEmptyRangeNode()
  {
    if (_sEmptyRangeNode == null)
    {
      _sEmptyRangeNode = new TextNode(NBSP_STRING);
    }

    return _sEmptyRangeNode;
  }
View Full Code Here

Examples of org.apache.pivot.wtk.text.TextNode

            Node descendant = document.getDescendantAt(selectionStart);
            int offset = selectionStart - descendant.getDocumentOffset();

            if (descendant instanceof TextNode) {
                // The caret is positioned within an existing text node
                TextNode textNode = (TextNode)descendant;
                textNode.insertText(text, offset);
            } else if (descendant instanceof Paragraph) {
                // The caret is positioned on the paragraph terminator
                // so get to the bottom rightmost descendant and add there
                Paragraph paragraph = (Paragraph)descendant;

                Node node = getRightmostDescendant(paragraph);
                if (node instanceof TextNode) {
                    // Insert the text into the existing node
                    TextNode textNode = (TextNode)node;
                    textNode.insertText(text, selectionStart - textNode.getDocumentOffset());
                } else if (node instanceof Element) {
                    // Append a new text node
                    Element element = (Element)node;
                    element.add(new TextNode(text));
                } else {
                    // The paragraph is currently empty
                    paragraph.add(new TextNode(text));
                }
            } else {
                // The caret is positioned on a non-text character node; insert
                // the text into the descendant's parent
                Element parent = descendant.getParent();
                int index = parent.indexOf(descendant);
                parent.insert(new TextNode(text), index);
            }
        }

        // Set the selection start to the character following the insertion
        setSelection(selectionStart + text.length(), 0);
View Full Code Here

Examples of org.apache.pivot.xml.TextNode

            String categories = "Categories:";
            List<Element> categoryElements = itemElement.getElements("category");
            for (int i = 0, n = categoryElements.getLength(); i < n; i++) {
                Element categoryElement = categoryElements.get(i);
                TextNode categoryTextNode = (TextNode)categoryElement.get(0);
                String category = categoryTextNode.getText();

                if (i > 0) {
                    categories += ", ";
                }
View Full Code Here

Examples of org.apache.xmlbeans.impl.newstore2.DomImpl.TextNode

        }
    }

    TextNode createTextNode ( )
    {
        return _saaj == null ? new TextNode( this ) : new SaajTextNode( this );
    }
View Full Code Here

Examples of org.apache.xmlbeans.impl.store.DomImpl.TextNode

        }
    }

    TextNode createTextNode()
    {
        return _saaj == null ? new TextNode(this) : new SaajTextNode(this);
    }
View Full Code Here

Examples of org.codehaus.jackson.node.TextNode

    case LONG:
      return new LongNode(in.readLong());
    case DOUBLE:
      return new DoubleNode(in.readDouble());
    case STRING:
      return new TextNode(in.readString());
    case BOOLEAN:
      return in.readBoolean() ? BooleanNode.TRUE : BooleanNode.FALSE;
    case NULL:
      in.readNull();
      return NullNode.getInstance();
View Full Code Here

Examples of org.htmlparser.nodes.TextNode

      nodes = parser.extractAllNodesThatMatch(nfilter);
    } catch (ParserException e) {
      return html;
    }
    for(int i=0;i<nodes.size();i++){
      TextNode node = (TextNode)nodes.elementAt(i);
      text.append(node.getText());
    }
    return StringUtils.remove(text.toString(),"&nbsp;");
  }
View Full Code Here

Examples of org.htmlparser.nodes.TextNode

          //System.out.println("TAG: " + '<'+tag.getText()+'>');
        }
        else if(node instanceof TextNode){
          int space = max_count - prvContent.length();
          if(space > 10){
            TextNode text = (TextNode)node;
            if(text.getText().length() < 10)
              prvContent.append(text.getText());
            else
              prvContent.append(StringUtils.abbreviate(text.getText(), max_count - prvContent.length()));
            //System.out.println("TEXT: " + text.getText());
          }
        }
      }
      return prvContent.toString();
View Full Code Here

Examples of org.jsoup.nodes.TextNode

                continue;
            }
            for (Element child : element.children().select(tag)) {
                cleanNodes(child, tag);
            }
            element.replaceWith(new TextNode(element.text() + "<br/>", ""));
        }
    }
View Full Code Here

Examples of org.jsoup.nodes.TextNode

    }

    @Override
    public void head(Node node, int depth) {
      if (node instanceof TextNode) {
        TextNode textNode = (TextNode) node;
        String text = textNode.text().replace('\u00A0', ' ').trim(); // non breaking space
        if (!text.isEmpty()) {
          buffer.append(text);
          if (!text.endsWith(" ")) {
            buffer.append(" ");
          }
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.