/** * Gets the value of "selectionStart" attribute. * @return the selection start */ public int jsxGet_selectionStart() { return ((HtmlTextArea) getDomNodeOrDie()).getSelectionStart(); }
/** * Gets the value of "selectionStart" attribute. * @return the selection start */ public int jsxGet_selectionStart() { return ((HtmlTextArea) getDomNodeOrDie()).getSelectionStart(); }
/** * Gets the value of "selectionStart" attribute. * @return the selection start */ public int jsxGet_selectionStart() { return ((HtmlTextArea) getDomNodeOrDie()).getSelectionStart(); }
/** * Gets the value of {@code selectionStart} attribute. * @return the selection start */ @JsxGetter public int getSelectionStart() { return ((HtmlTextArea) getDomNodeOrDie()).getSelectionStart(); }
/** * Gets the value of {@code selectionStart} attribute. * @return the selection start */ @JsxGetter public int getSelectionStart() { return ((HtmlTextArea) getDomNodeOrDie()).getSelectionStart(); }
/** * {@inheritDoc} */ @Override protected void doType(final char c, final boolean shiftKey, final boolean ctrlKey, final boolean altKey) { doTypeProcessor_.doType(getText(), getSelectionStart(), getSelectionEnd(), c, shiftKey, ctrlKey, altKey); }
/** * {@inheritDoc} */ @Override protected void doType(final char c, final boolean shiftKey, final boolean ctrlKey, final boolean altKey) { doTypeProcessor_.doType(getText(), getSelectionStart(), getSelectionEnd(), c, shiftKey, ctrlKey, altKey); }
/** * {@inheritDoc} */ @Override protected void doType(final char c, final boolean shiftKey, final boolean ctrlKey, final boolean altKey) { doTypeProcessor_.doType(getText(), getSelectionStart(), getSelectionEnd(), c, shiftKey, ctrlKey, altKey); }
/** * Sets the text contained within the range. * @param text the text contained within the range */ public void jsxSet_text(final String text) { collapsed_ = false; final HtmlPage page = (HtmlPage) getWindow().getDomNodeOrDie(); final Range selection = page.getSelection(); // currently only working for text input and textarea if (selection.getStartContainer() == selection.getEndContainer()) { if (selection.getStartContainer() instanceof HtmlTextInput) { final HtmlTextInput input = (HtmlTextInput) selection.getStartContainer(); final String oldValue = input.getValueAttribute(); input.setValueAttribute(oldValue.substring(0, input.getSelectionStart()) + text + oldValue.substring(input.getSelectionEnd())); } else if (selection.getStartContainer() instanceof HtmlTextArea) { final HtmlTextArea input = (HtmlTextArea) selection.getStartContainer(); final String oldValue = input.getText(); input.setText(oldValue.substring(0, input.getSelectionStart()) + text + oldValue.substring(input.getSelectionEnd())); } } }
/** * Sets the text contained within the range. * @param text the text contained within the range */ public void jsxSet_text(final String text) { collapsed_ = false; final HtmlPage page = (HtmlPage) getWindow().getDomNodeOrDie(); final Range selection = page.getSelection(); // currently only working for text input and textarea if (selection.getStartContainer() == selection.getEndContainer()) { if (selection.getStartContainer() instanceof HtmlTextInput) { final HtmlTextInput input = (HtmlTextInput) selection.getStartContainer(); final String oldValue = input.getValueAttribute(); input.setValueAttribute(oldValue.substring(0, input.getSelectionStart()) + text + oldValue.substring(input.getSelectionEnd())); } else if (selection.getStartContainer() instanceof HtmlTextArea) { final HtmlTextArea input = (HtmlTextArea) selection.getStartContainer(); final String oldValue = input.getText(); input.setText(oldValue.substring(0, input.getSelectionStart()) + text + oldValue.substring(input.getSelectionEnd())); } } }
/** * Sets the text contained within the range. * @param text the text contained within the range */ public void jsxSet_text(final String text) { collapsed_ = false; final HtmlPage page = (HtmlPage) getWindow().getDomNodeOrDie(); final Range selection = page.getSelection(); // currently only working for text input and textarea if (selection.getStartContainer() == selection.getEndContainer()) { if (selection.getStartContainer() instanceof HtmlTextInput) { final HtmlTextInput input = (HtmlTextInput) selection.getStartContainer(); final String oldValue = input.getValueAttribute(); input.setValueAttribute(oldValue.substring(0, input.getSelectionStart()) + text + oldValue.substring(input.getSelectionEnd())); } else if (selection.getStartContainer() instanceof HtmlTextArea) { final HtmlTextArea input = (HtmlTextArea) selection.getStartContainer(); final String oldValue = input.getText(); input.setText(oldValue.substring(0, input.getSelectionStart()) + text + oldValue.substring(input.getSelectionEnd())); } } }
/** * Retrieves the text contained within the range. * @return the text contained within the range */ public Object jsxGet_text() { if (collapsed_) { return ""; } final HtmlPage page = (HtmlPage) getWindow().getDomNodeOrDie(); final Range selection = page.getSelection(); // currently only working for text input and textarea if (selection.getStartContainer() == selection.getEndContainer()) { if (selection.getStartContainer() instanceof HtmlTextInput) { final HtmlTextInput input = (HtmlTextInput) selection.getStartContainer(); return input.getValueAttribute().substring(input.getSelectionStart(), input.getSelectionEnd()); } else if (selection.getStartContainer() instanceof HtmlTextArea) { final HtmlTextArea input = (HtmlTextArea) selection.getStartContainer(); return input.getText().substring(input.getSelectionStart(), input.getSelectionEnd()); } } return ""; }
/** * Retrieves the text contained within the range. * @return the text contained within the range */ public Object jsxGet_text() { if (collapsed_) { return ""; } final HtmlPage page = (HtmlPage) getWindow().getDomNodeOrDie(); final Range selection = page.getSelection(); // currently only working for text input and textarea if (selection.getStartContainer() == selection.getEndContainer()) { if (selection.getStartContainer() instanceof HtmlTextInput) { final HtmlTextInput input = (HtmlTextInput) selection.getStartContainer(); return input.getValueAttribute().substring(input.getSelectionStart(), input.getSelectionEnd()); } else if (selection.getStartContainer() instanceof HtmlTextArea) { final HtmlTextArea input = (HtmlTextArea) selection.getStartContainer(); return input.getText().substring(input.getSelectionStart(), input.getSelectionEnd()); } } return ""; }
/** * Retrieves the text contained within the range. * @return the text contained within the range */ public Object jsxGet_text() { if (collapsed_) { return ""; } final HtmlPage page = (HtmlPage) getWindow().getDomNodeOrDie(); final Range selection = page.getSelection(); // currently only working for text input and textarea if (selection.getStartContainer() == selection.getEndContainer()) { if (selection.getStartContainer() instanceof HtmlTextInput) { final HtmlTextInput input = (HtmlTextInput) selection.getStartContainer(); return input.getValueAttribute().substring(input.getSelectionStart(), input.getSelectionEnd()); } else if (selection.getStartContainer() instanceof HtmlTextArea) { final HtmlTextArea input = (HtmlTextArea) selection.getStartContainer(); return input.getText().substring(input.getSelectionStart(), input.getSelectionEnd()); } } return ""; }