Package com.levigo.jadice.document
Interface Selection
public interface Selection
Provides selection information for a given
Page. The Selection contains
information about the position of the page this selection belongs to (getPage()), the
text fragment that has been selected (getSelectedText()) and a Shape providing a
visual representation of the selection (getShape()).-
Method Summary
-
Method Details
-
getBounds
Rectangle2D getBounds()returns the overall bounds of the selection. Note that there is no guarantee that the returnedRectangle2Dis the smallest bounding box that encloses theShapes (returned bygetShape(), only that theShapes lie entirely within the indicatedRectangle2D.- Returns:
- the bounds of the selection.
-
getShape
Shape getShape()Provides a graphical representation of this selection.- Returns:
- the
Shaperepresenting a graphical selection of the selected text
-
getPage
Page getPage()Provides thePagethis selection belongs to.- Returns:
- the
Pagethis Selection belongs to
-
getSelectedText
String getSelectedText()Provides the selected text.- Returns:
- the selected text
-
isValid
boolean isValid()Return whether the selection is still valid. A selection will become invalid if the page content it refers to changes.- Returns:
trueif the selection is valid
-