Package org.odftoolkit.odfdom.changes
Class TextHyperlinkSelection
- java.lang.Object
-
- org.odftoolkit.odfdom.changes.TextSelection
-
- org.odftoolkit.odfdom.changes.TextHyperlinkSelection
-
- All Implemented Interfaces:
Comparable
public class TextHyperlinkSelection extends TextSelection implements Comparable
- Author:
- svante.schubertATgmail.com
-
-
Field Summary
-
Fields inherited from class org.odftoolkit.odfdom.changes.TextSelection
mEndPosition, mSelectionElement, mStartPosition, mUrl
-
-
Constructor Summary
Constructors Constructor Description TextHyperlinkSelection(TextAElement anchorElement, List<Integer> startPosition)
Constructor.TextHyperlinkSelection(TextAElement anchorElement, List<Integer> startPosition, List<Integer> endPosition)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextAElement
getAElement()
Returns the AnchorElement of the Anchor element.TextHyperlinkSelection
getOverLappingHyperlinkSelection(TreeSet<TextSelection> set)
String
toString()
-
Methods inherited from class org.odftoolkit.odfdom.changes.TextSelection
compareTo, getEndPosition, getSelectionElement, getStartPosition, getURL, hasUrl, overLapping, setEndPosition, setURL
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Constructor Detail
-
TextHyperlinkSelection
public TextHyperlinkSelection(TextAElement anchorElement, List<Integer> startPosition)
Constructor.- Parameters:
anchorElement
- the AnchorElement of the Anchor element.startPosition
- the startPosition of the Anchor element.
-
TextHyperlinkSelection
public TextHyperlinkSelection(TextAElement anchorElement, List<Integer> startPosition, List<Integer> endPosition)
Constructor.- Parameters:
anchorElement
- the AnchorElement of the Anchor element.startPosition
- the startPosition of the Anchor element.
-
-
Method Detail
-
getAElement
public TextAElement getAElement()
Returns the AnchorElement of the Anchor element.- Returns:
- the AnchorElement of the Anchor element.
-
getOverLappingHyperlinkSelection
public TextHyperlinkSelection getOverLappingHyperlinkSelection(TreeSet<TextSelection> set)
- Parameters:
set
- of TextSelections, it is assumed there is only one anchor in such set.- Returns:
- the first overlapping text Element in the given set (ascending searched).
-
-