< prev index next >
src/java.desktop/share/classes/javax/swing/text/Element.java
Print this page
*** 39,49 ****
*/
public Document getDocument();
/**
* Fetches the parent element. If the element is a root level
! * element returns <code>null</code>.
*
* @return the parent element
*/
public Element getParentElement();
--- 39,49 ----
*/
public Document getDocument();
/**
* Fetches the parent element. If the element is a root level
! * element returns {@code null}.
*
* @return the parent element
*/
public Element getParentElement();
*** 79,91 ****
* Fetches the offset from the beginning of the document
* that this element ends at. If this element has
* children, this will be the end offset of the last child.
* As a document position, there is an implied backward bias.
* <p>
! * All the default <code>Document</code> implementations
! * descend from <code>AbstractDocument</code>.
! * <code>AbstractDocument</code> models an implied break at the end of
* the document. As a result of this, it is possible for this to
* return a value greater than the length of the document.
*
* @return the ending offset > getStartOffset() and
* <= getDocument().getLength() + 1
--- 79,91 ----
* Fetches the offset from the beginning of the document
* that this element ends at. If this element has
* children, this will be the end offset of the last child.
* As a document position, there is an implied backward bias.
* <p>
! * All the default {@code Document} implementations
! * descend from {@code AbstractDocument}.
! * {@code AbstractDocument} models an implied break at the end of
* the document. As a result of this, it is possible for this to
* return a value greater than the length of the document.
*
* @return the ending offset > getStartOffset() and
* <= getDocument().getLength() + 1
*** 95,110 ****
public int getEndOffset();
/**
* Gets the child element index closest to the given offset.
* The offset is specified relative to the beginning of the
! * document. Returns <code>-1</code> if the
! * <code>Element</code> is a leaf, otherwise returns
! * the index of the <code>Element</code> that best represents
! * the given location. Returns <code>0</code> if the location
* is less than the start offset. Returns
! * <code>getElementCount() - 1</code> if the location is
* greater than or equal to the end offset.
*
* @param offset the specified offset >= 0
* @return the element index >= 0
*/
--- 95,110 ----
public int getEndOffset();
/**
* Gets the child element index closest to the given offset.
* The offset is specified relative to the beginning of the
! * document. Returns {@code -1} if the
! * {@code Element} is a leaf, otherwise returns
! * the index of the {@code Element} that best represents
! * the given location. Returns {@code 0} if the location
* is less than the start offset. Returns
! * {@code getElementCount() - 1} if the location is
* greater than or equal to the end offset.
*
* @param offset the specified offset >= 0
* @return the element index >= 0
*/
*** 127,137 ****
public Element getElement(int index);
/**
* Is this element a leaf element? An element that
* <i>may</i> have children, even if it currently
! * has no children, would return <code>false</code>.
*
* @return true if a leaf element else false
*/
public boolean isLeaf();
--- 127,137 ----
public Element getElement(int index);
/**
* Is this element a leaf element? An element that
* <i>may</i> have children, even if it currently
! * has no children, would return {@code false}.
*
* @return true if a leaf element else false
*/
public boolean isLeaf();
< prev index next >