protected void addChildGlyphPositionAttributes(AttributedString as, Element element, BridgeContext ctx) { // do the same for each child element for (Node child = getFirstChild(element); child != null; child = getNextSibling(child)) { if (child.getNodeType() != Node.ELEMENT_NODE) continue; Element childElement = (Element)child; if (isTextChild(childElement)) { addGlyphPositionAttributes(as, childElement, ctx); } } }
protected void addChildGlyphPositionAttributes(AttributedString as, Element element, BridgeContext ctx) { // do the same for each child element for (Node child = getFirstChild(element); child != null; child = getNextSibling(child)) { if (child.getNodeType() != Node.ELEMENT_NODE) continue; Element childElement = (Element)child; if (isTextChild(childElement)) { addGlyphPositionAttributes(as, childElement, ctx); } } }
protected void addChildGlyphPositionAttributes(AttributedString as, Element element, BridgeContext ctx) { // do the same for each child element for (Node child = getFirstChild(element); child != null; child = getNextSibling(child)) { if (child.getNodeType() != Node.ELEMENT_NODE) continue; Element childElement = (Element)child; if (isTextChild(childElement)) { addGlyphPositionAttributes(as, childElement, ctx); } } }
/** * Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. */ public void handleDOMChildNodeRemovedEvent(MutationEvent evt) { Node childNode = (Node)evt.getTarget(); //check the type of the node inserted before discard the layout //in the case of <title> or <desc> or <metadata>, the layout //is unchanged switch (childNode.getNodeType()) { case Node.TEXT_NODE: // fall-through is intended case Node.CDATA_SECTION_NODE: //the parent has to be a displayed node if (isParentDisplayed(childNode)) { laidoutText = null; } break; case Node.ELEMENT_NODE: { Element childElt = (Element) childNode; if (isTextChild(childElt)) { laidoutText = null; removeContextFromChild(ctx, childElt); } break; } default: } //if the laidoutText was set to null, //then wait for DOMSubtreeChange to recompute it. }
/** * Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. */ public void handleDOMChildNodeRemovedEvent(MutationEvent evt) { Node childNode = (Node)evt.getTarget(); //check the type of the node inserted before discard the layout //in the case of <title> or <desc> or <metadata>, the layout //is unchanged switch (childNode.getNodeType()) { case Node.TEXT_NODE: // fall-through is intended case Node.CDATA_SECTION_NODE: //the parent has to be a displayed node if (isParentDisplayed(childNode)) { laidoutText = null; } break; case Node.ELEMENT_NODE: { Element childElt = (Element) childNode; if (isTextChild(childElt)) { laidoutText = null; removeContextFromChild(ctx, childElt); } break; } default: } //if the laidoutText was set to null, //then wait for DOMSubtreeChange to recompute it. }
protected void addChildPaintAttributes(AttributedString as, Element element, TextNode node, TextPaintInfo parentPI, BridgeContext ctx) { // Add Paint attributres for children of text element for (Node child = getFirstChild(element); child != null; child = getNextSibling(child)) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } Element childElement = (Element)child; if (isTextChild(childElement)) { TextPaintInfo pi = getTextPaintInfo(childElement, node, parentPI, ctx); addPaintAttributes(as, childElement, node, pi, ctx); } } }
/** * Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. */ public void handleDOMChildNodeRemovedEvent(MutationEvent evt) { Node childNode = (Node)evt.getTarget(); //check the type of the node inserted before discard the layout //in the case of <title> or <desc> or <metadata>, the layout //is unchanged switch (childNode.getNodeType()) { case Node.TEXT_NODE: // fall-through is intended case Node.CDATA_SECTION_NODE: //the parent has to be a displayed node if (isParentDisplayed(childNode)) { laidoutText = null; } break; case Node.ELEMENT_NODE: { Element childElt = (Element) childNode; if (isTextChild(childElt)) { laidoutText = null; removeContextFromChild(ctx, childElt); } break; } default: } //if the laidoutText was set to null, //then wait for DOMSubtreeChange to recompute it. }
protected void addChildPaintAttributes(AttributedString as, Element element, TextNode node, TextPaintInfo parentPI, BridgeContext ctx) { // Add Paint attributres for children of text element for (Node child = getFirstChild(element); child != null; child = getNextSibling(child)) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } Element childElement = (Element)child; if (isTextChild(childElement)) { TextPaintInfo pi = getTextPaintInfo(childElement, node, parentPI, ctx); addPaintAttributes(as, childElement, node, pi, ctx); } } }
protected void addChildPaintAttributes(AttributedString as, Element element, TextNode node, TextPaintInfo parentPI, BridgeContext ctx) { // Add Paint attributres for children of text element for (Node child = getFirstChild(element); child != null; child = getNextSibling(child)) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } Element childElement = (Element)child; if (isTextChild(childElement)) { TextPaintInfo pi = getTextPaintInfo(childElement, node, parentPI, ctx); addPaintAttributes(as, childElement, node, pi, ctx); } } }
/** * Invoked when an MutationEvent of type 'DOMNodeInserted' is fired. */ public void handleDOMNodeInsertedEvent(MutationEvent evt) { Node childNode = (Node)evt.getTarget(); //check the type of the node inserted before discard the layout //in the case of <title> or <desc> or <metadata>, the layout //is unchanged switch(childNode.getNodeType()) { case Node.TEXT_NODE: // fall-through is intended case Node.CDATA_SECTION_NODE: laidoutText = null; break; case Node.ELEMENT_NODE: { Element childElement = (Element)childNode; if (isTextChild(childElement)) { addContextToChild(ctx, childElement); laidoutText = null; } break; } } if (laidoutText == null) { computeLaidoutText(ctx, e, getTextNode()); } }
/** * Invoked when an MutationEvent of type 'DOMNodeInserted' is fired. */ public void handleDOMNodeInsertedEvent(MutationEvent evt) { Node childNode = (Node)evt.getTarget(); //check the type of the node inserted before discard the layout //in the case of <title> or <desc> or <metadata>, the layout //is unchanged switch(childNode.getNodeType()) { case Node.TEXT_NODE: // fall-through is intended case Node.CDATA_SECTION_NODE: laidoutText = null; break; case Node.ELEMENT_NODE: { Element childElement = (Element)childNode; if (isTextChild(childElement)) { addContextToChild(ctx, childElement); laidoutText = null; } break; } } if (laidoutText == null) { computeLaidoutText(ctx, e, getTextNode()); } }
/** * Invoked when an MutationEvent of type 'DOMNodeInserted' is fired. */ public void handleDOMNodeInsertedEvent(MutationEvent evt) { Node childNode = (Node)evt.getTarget(); //check the type of the node inserted before discard the layout //in the case of <title> or <desc> or <metadata>, the layout //is unchanged switch(childNode.getNodeType()) { case Node.TEXT_NODE: // fall-through is intended case Node.CDATA_SECTION_NODE: laidoutText = null; break; case Node.ELEMENT_NODE: { Element childElement = (Element)childNode; if (isTextChild(childElement)) { addContextToChild(ctx, childElement); laidoutText = null; } break; } } if (laidoutText == null) { computeLaidoutText(ctx, e, getTextNode()); } }