com.gargoylesoftware.htmlunit.html.impl
Interface SelectableTextInput

All Superinterfaces:
Node
All Known Implementing Classes:
HtmlPasswordInput, HtmlTextArea, HtmlTextInput

public interface SelectableTextInput
extends Node

Internal interface which defines an input element which contains selectable text. This interface just keeps the various implementations in sync as to selection functionality, and provides a definition of the functionality required by the SelectionDelegate so that it can do its job. This interface is not public because it is an internal contract.

Version:
$Revision: 5302 $
Author:
Daniel Gredler

Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Method Summary
 void focus()
          Focuses this element.
 Page getPage()
          Returns the page which contains this element.
 String getSelectedText()
          Returns the selected text in this element, or null if there is no selected text in this element.
 int getSelectionEnd()
          Returns the end position of the selected text in this element.
 int getSelectionStart()
          Returns the start position of the selected text in this element.
 String getText()
          Returns all of the text in this element.
 void select()
          Focuses this element and selects all of its text.
 void setSelectionEnd(int selectionEnd)
          Sets the end position of the selected text in this element.
 void setSelectionStart(int selectionStart)
          Sets the start position of the selected text in this element.
 void setText(String text)
          Sets the text in this element.
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Method Detail

getPage

Page getPage()
Returns the page which contains this element.

Returns:
the page which contains this element

focus

void focus()
Focuses this element.


select

void select()
Focuses this element and selects all of its text.


getText

String getText()
Returns all of the text in this element.

Returns:
all of the text in this element

setText

void setText(String text)
Sets the text in this element.

Parameters:
text - the text to put in this element

getSelectedText

String getSelectedText()
Returns the selected text in this element, or null if there is no selected text in this element.

Returns:
the selected text in this element, or null if there is no selected text in this element

getSelectionStart

int getSelectionStart()
Returns the start position of the selected text in this element.

Returns:
the start position of the selected text in this element

setSelectionStart

void setSelectionStart(int selectionStart)
Sets the start position of the selected text in this element.

Parameters:
selectionStart - the start position of the selected text in this element

getSelectionEnd

int getSelectionEnd()
Returns the end position of the selected text in this element.

Returns:
the end position of the selected text in this element

setSelectionEnd

void setSelectionEnd(int selectionEnd)
Sets the end position of the selected text in this element.

Parameters:
selectionEnd - the end position of the selected text in this element


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.