private String readValue() { final StringBuilder builder = new StringBuilder(); for (final DomNode node : getChildren()) { if (node instanceof DomText) { builder.append(((DomText) node).getData()); } } // if content starts with new line, it is ignored (=> for the parser?) if (builder.length() != 0 && builder.charAt(0) == '\n') { builder.deleteCharAt(0); } return builder.toString(); }
private String readValueIE() { final StringBuilder builder = new StringBuilder(); for (final DomNode node : getDescendants()) { if (node instanceof DomText) { builder.append(((DomText) node).getData()); } } // if content starts with new line, it is ignored (=> for the parser?) if (builder.length() != 0 && builder.charAt(0) == '\n') { builder.deleteCharAt(0); } return builder.toString(); }
private String readValue() { final StringBuilder buffer = new StringBuilder(); for (final DomNode node : getChildren()) { if (node instanceof DomText) { buffer.append(((DomText) node).getData()); } } // if content starts with new line, it is ignored (=> for the parser?) if (buffer.length() > 0 && buffer.charAt(0) == '\n') { buffer.deleteCharAt(0); } return buffer.toString(); }
private String readValue() { final StringBuilder buffer = new StringBuilder(); for (final DomNode node : getChildren()) { if (node instanceof DomText) { buffer.append(((DomText) node).getData()); } } // if content starts with new line, it is ignored (=> for the parser?) if (buffer.length() > 0 && buffer.charAt(0) == '\n') { buffer.deleteCharAt(0); } return buffer.toString(); }
private String readValue() { final StringBuilder buffer = new StringBuilder(); for (final DomNode node : getChildren()) { if (node instanceof DomText) { buffer.append(((DomText) node).getData()); } } // if content starts with new line, it is ignored (=> for the parser?) if (buffer.length() > 0 && buffer.charAt(0) == '\n') { buffer.deleteCharAt(0); } return buffer.toString(); }
/** * Process {@link DomText}. * * @param builder the StringBuilder to add to * @param domText the target to process */ protected void appendText(final StringBuilder builder, final DomText domText) { final DomNode parent = domText.getParentNode(); if (parent == null || parent instanceof HtmlTitle || isVisible(parent)) { builder.append(domText.getData()); } }
/** * Creates a new text node split from another text node. This method allows * the derived type of the new text node to match the original node type. * * @param offset the character position at which to split the DomText node * @return the newly created Text node */ protected DomText createSplitTextNode(final int offset) { return new DomText(getPage(), getData().substring(offset)); }
/** * Creates a new text node split from another text node. This method allows * the derived type of the new text node to match the original node type. * * @param offset the character position at which to split the DomText node * @return the newly created Text node */ protected DomText createSplitTextNode(final int offset) { return new DomText(getPage(), getData().substring(offset)); }
/** * Moves the selection to the end. */ public void moveSelectionToEnd() { initDoTypeProcessor(); selectionDelegate_.setSelectionStart(getData().length()); }
/** * Creates a new text node split from another text node. This method allows * the derived type of the new text node to match the original node type. * * @param offset the character position at which to split the DomText node * @return the newly created Text node */ protected DomText createSplitTextNode(final int offset) { return new DomText(getPage(), getData().substring(offset)); }
/** * Creates a new text node split from another text node. This method allows * the derived type of the new text node to match the original node type. * * @param offset the character position at which to split the DomText node * @return the newly created Text node */ protected DomText createSplitTextNode(final int offset) { return new DomText(getPage(), getData().substring(offset)); }
/** * Process {@link DomText}. * * @param builder the StringBuilder to add to * @param domText the target to process */ protected void appendText(final StringBuilder builder, final DomText domText) { final DomNode parent = domText.getParentNode(); if (parent == null || parent instanceof HtmlTitle || isVisible(parent)) { builder.append(domText.getData()); } }
/** * Creates a new text node split from another text node. This method allows * the derived type of the new text node to match the original node type. * * @param offset the character position at which to split the DomText node * @return the newly created Text node */ protected DomText createSplitTextNode(final int offset) { return new DomText(getPage(), getData().substring(offset)); }
/** * Performs the effective type action, called after the keyPress event and before the keyUp event. * @param c the character you with to simulate typing * @param htmlElement the element in which typing occurs * @param lastType is this the last character to type */ protected void doType(final char c, final HtmlElement htmlElement, final boolean lastType) { initDoTypeProcessor(); doTypeProcessor_.doType(getData(), selectionDelegate_, c, htmlElement, lastType); }
/** * Performs the effective type action, called after the keyPress event and before the keyUp event. * * @param keyCode the key code wish to simulate typing * @param htmlElement the element in which typing occurs * @param lastType is this the last character to type */ protected void doType(final int keyCode, final HtmlElement htmlElement, final boolean lastType) { initDoTypeProcessor(); doTypeProcessor_.doType(getData(), selectionDelegate_, keyCode, htmlElement, lastType); }
protected void printText(final DomNode node) { for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { if (child instanceof DomText) { builder_.append(((DomText) child).getData()); } else { printText(child); } } }
protected void printText(final DomNode node) { for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { if (child instanceof DomText) { builder_.append(((DomText) child).getData()); } else { printText(child); } } }
private void appendText(final DomText domText) { if (isVisible(domText.getParentNode())) { append(domText.getData()); } }
private void appendText(final DomText domText) { if (isVisible(domText.getParentNode())) { append(domText.getData()); } }
private void appendText(final DomText domText) { if (isVisible(domText.getParentNode())) { append(domText.getData()); } }