Examples of TextNode


Examples of cambridge.model.TextNode

               matchedNodes.removeAll(sub);
               tag.setCloseText(token.getActualValue());
               tag.setEndLine(peek(1).getLineNo());
               tag.setEndColumn(peek(1).getColumn());
            } else {
               node = new TextNode();
               TextNode text = (TextNode) node;
               text.setContents(currentToken.getValue());
               text.setBeginLine(currentToken.getLineNo());
               text.setBeginColumn(currentToken.getColumn());
               text.setEndLine(peek(1).getLineNo());
               text.setEndColumn(peek(1).getColumn());
               matchedNodes.add(node);
            }

            break;
         default:
View Full Code Here

Examples of com.adobe.internal.fxg.dom.TextNode

     */
    private PlaceObject flexText(GraphicContentNode node)
    {
        if (node instanceof TextNode)
        {
            TextNode textNode = ((TextNode)node);

            // Create a new SymbolClass to map to this TextGraphic's
            // DefineSprite (see below) 
            String className = createUniqueName(graphicClass.getClassName() + "_Text");

View Full Code Here

Examples of com.dotmarketing.util.diff.html.dom.TextNode

                    handler.endElement("", "span", "span");
                    remStarted = false;
                }
                generateOutput(((TagNode) child));
            } else if (child instanceof TextNode) {
                TextNode textChild = (TextNode) child;
                Modification mod = textChild.getModification();

                if (newStarted
                        && (mod.getType() != ModificationType.ADDED || mod
                                .isFirstOfID())) {
                    handler.endElement("", "span", "span");
                    newStarted = false;
                } else if (changeStarted
                        && (mod.getType() != ModificationType.CHANGED
                                || !mod.getChanges().equals(changeTXT) || mod
                                .isFirstOfID())) {
                    handler.endElement("", "span", "span");
                    changeStarted = false;
                } else if (remStarted
                        && (mod.getType() != ModificationType.REMOVED || mod
                                .isFirstOfID())) {
                    handler.endElement("", "span", "span");
                    remStarted = false;
                }

                // no else because a removed part can just be closed and a new
                // part can start
                if (!newStarted && mod.getType() == ModificationType.ADDED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-added");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
                    }

                    addAttributes(mod, attrs);

                    handler.startElement("", "span", "span", attrs);
                    newStarted = true;
                } else if (!changeStarted
                        && mod.getType() == ModificationType.CHANGED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-changed");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
                    }

                    addAttributes(mod, attrs);
                    handler.startElement("", "span", "span", attrs);

                    changeStarted = true;
                    changeTXT = mod.getChanges();
                } else if (!remStarted
                        && mod.getType() == ModificationType.REMOVED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-removed");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
                    }
                    addAttributes(mod, attrs);

                    handler.startElement("", "span", "span", attrs);
                    remStarted = true;
                }

                char[] chars = textChild.getText().toCharArray();

                if (textChild instanceof ImageNode) {
                    writeImage((ImageNode)textChild);
                } else {
                    handler.characters(chars, 0, chars.length);
View Full Code Here

Examples of com.fasterxml.jackson.databind.node.TextNode

            return toJsonArray(obj).size();
        } else if (isMap(obj)) {
            return toJsonObject(obj).size();
        } else {
            if (obj instanceof TextNode) {
                TextNode element = (TextNode) obj;
                return element.size();
            }
        }
        throw new JsonPathException("length operation can not applied to " + obj != null ? obj.getClass().getName() : "null");
    }
View Full Code Here

Examples of com.github.gwtbootstrap.client.ui.base.TextNode

    }

    @WorkbenchPartView
    public Widget getView() {
        return new FlowPanel() {{
            add( new TextNode( "Cool!!" ) );
        }};
    }
View Full Code Here

Examples of dk.brics.xmlgraph.TextNode

          return n;
       
       
        @Override
        public void visit(Text n) {
          dk.brics.xmlgraph.Node tn = new TextNode(Automaton.makeString(n.getString()), n.getOrigin());
          xg.addNode(tn);
          if (wrapchoices)
            tn = wrapChoice(tn);
          m.parent.addContent(tn.getIndex());
          push(n.getNextSibling(), m.parent);
        }
       
        @Override
        public void visit(Element n) {
          List<Integer> cs = new ArrayList<Integer>();
          contents.put(n, cs); // contents added later
          SequenceNode content = new SequenceNode(cs, n.getOrigin());
          xg.addNode(content);
          dk.brics.xmlgraph.Node sn = content;
          if (wrapchoices)
            sn = wrapChoice(sn);
          dk.brics.xmlgraph.Node en = new ElementNode(Automaton.makeString(n.getExpandedName()),
              sn.getIndex(), false, n.getOrigin());
          xg.addNode(en);
          if (wrapchoices)
            en = wrapChoice(en);
          m.parent.addContent(en.getIndex());
          push(n.getNextSibling(), m.parent);
          push(n.getFirstAttr(), content);
          push(n.getFirstChild(), content);
        }

        @Override
        public void visit(TemplateGap n) {
          if (gaps != GapConversion.IGNORE) {
            dk.brics.xmlgraph.Node cn = new ChoiceNode(n.getGap(), gaps == GapConversion.OPEN, false, Collections.<Integer>emptyList(), n.getOrigin());
            xg.addNode(cn);
            m.parent.addContent(cn.getIndex());
            tgaps.add(n.getGap());
            addGapType(n.getGap(), n.getType(), n.getOrigin());
          }
          push(n.getNextSibling(), m.parent);
        }
       
        @Override
        public void visit(Attribute n) {
          dk.brics.xmlgraph.Node vn = new TextNode(Automaton.makeString(n.getValue()), n.getOrigin());
          xg.addNode(vn);
          if (wrapchoices)
            vn = wrapChoice(vn);
          dk.brics.xmlgraph.Node an = new AttributeNode(Automaton.makeString(n.getExpandedName()),
              vn.getIndex(), n.getOrigin());
          xg.addNode(an);
          if (wrapchoices)
            an = wrapChoice(an);
          m.parent.addContent(an.getIndex());
          push(n.getNextAttr(), m.parent);
View Full Code Here

Examples of org.apache.batik.gvt.TextNode

            Element target = context.getElement(node);
            // Lookup inside the text element children to see if the target
            // is a tspan or textPath

            if (target != null && node instanceof TextNode) {
    TextNode textNode = (TextNode)node;
    List list = textNode.getTextRuns();
                // place coords in text node coordinate system
                try {
                    node.getGlobalTransform().createInverse().transform(coords, coords);
                } catch (NoninvertibleTransformException ex) {
                }
View Full Code Here

Examples of org.apache.batik.gvt.TextNode

        } catch (ClassCastException cce) {
            throw new
            Error("This Mark was not instantiated by this TextPainter class!");
        }

        TextNode textNode = start.getTextNode();
        if (textNode != finish.getTextNode())
            throw new Error("Markers are from different TextNodes!");

        AttributedCharacterIterator aci;
        aci = textNode.getAttributedCharacterIterator();
                            
        int[] result = new int[2];
        result[0] = start.getHit().getCharIndex();
        result[1] = finish.getHit().getCharIndex();
View Full Code Here

Examples of org.apache.batik.gvt.TextNode

        } catch (ClassCastException cce) {
            throw new Error
                ("This Mark was not instantiated by this TextPainter class!");
        }

        TextNode textNode = begin.getTextNode();
        if (textNode != end.getTextNode())
            throw new Error("Markers are from different TextNodes!");
        if (textNode == null)
            return null;

        int beginIndex = begin.getHit().getCharIndex();
        int endIndex   = end.getHit().getCharIndex();
        if (beginIndex > endIndex) {
            // Swap them...
            BasicTextPainter.BasicMark tmpMark = begin;
            begin = end; end = tmpMark;

            int tmpIndex = beginIndex;
            beginIndex = endIndex; endIndex = tmpIndex;
        }

        // get the list of text runs
        List textRuns = getTextRuns
            (textNode, textNode.getAttributedCharacterIterator());

        GeneralPath highlightedShape = new GeneralPath();

        // for each text run, append any highlight it may contain for
        // the current selection
View Full Code Here

Examples of org.apache.batik.gvt.TextNode

        } catch (ClassCastException cce) {
            throw new
            Error("This Mark was not instantiated by this TextPainter class!");
        }

        TextNode textNode = start.getTextNode();
        if (textNode != finish.getTextNode())
            throw new Error("Markers are from different TextNodes!");

        AttributedCharacterIterator aci;
        aci = textNode.getAttributedCharacterIterator();
                            
        int[] result = new int[2];
        result[0] = start.getHit().getCharIndex();
        result[1] = finish.getHit().getCharIndex();
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.