com.levigo.jadice.document.text
Class TextContentService

java.lang.Object
  extended by com.levigo.jadice.document.text.TextContentService

public abstract class TextContentService
extends Object

Provides access to the page text content.


Nested Class Summary
 class TextContentService.TextContentResult
           
 
Constructor Summary
TextContentService()
           
 
Method Summary
static TextContentService getInstance()
          Provides a TextContentService instance.
static TextContentService getInstance(TaskExecutor<TextContentService.TextContentResult> taskExecutor)
          Provides a TextContentService instance.
abstract  Selection getSelection(Page page)
          Return the Selection for the whole page.
abstract  Selection getSelectionBetween(Page p, Point2D start, Point2D end)
          Return the Selection between two points on the page.
abstract  Selection getSelectionBetween(Page p, Point2D start, Point2D end, Granularity granularity)
          Provides line based selection support.
abstract  Selection getSelectionInArea(Page page, Rectangle selectedArea)
          Return the Selection within a rectangular area.
abstract  boolean isSelectableAt(Page page, Point2D documentPoint)
          Return whether there is something selectable at the given point.
abstract  void purgeTextContent(Page page)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextContentService

public TextContentService()
Method Detail

getInstance

public static TextContentService getInstance()
Provides a TextContentService instance. To start working with the TextContentService, this method should be used to obtain a instance.

Returns:
a instance of the TextContentService

getInstance

public static TextContentService getInstance(TaskExecutor<TextContentService.TextContentResult> taskExecutor)
Provides a TextContentService instance. To start working with the TextContentService, this method should be used to obtain a instance.

Returns:
a instance of the TextContentService

getSelectionInArea

public abstract Selection getSelectionInArea(Page page,
                                             Rectangle selectedArea)
Return the Selection within a rectangular area. The area must be specified in document units.


getSelectionBetween

public abstract Selection getSelectionBetween(Page p,
                                              Point2D start,
                                              Point2D end)
Return the Selection between two points on the page. The points must be specified in document units.


getSelectionBetween

public abstract Selection getSelectionBetween(Page p,
                                              Point2D start,
                                              Point2D end,
                                              Granularity granularity)
Provides line based selection support. This method extracts a List of Selection s in a line based manner. Think about it like the way selecting text inside a word processor works. (Dragging the mouse cursor)

Parameters:
p - the Page to perform the selection on
start - the starting point
end - the ending point
granularity - the granularity with which to select elements
Returns:
a list of Selection elements

isSelectableAt

public abstract boolean isSelectableAt(Page page,
                                       Point2D documentPoint)
Return whether there is something selectable at the given point. The point must be specified in document units.


getSelection

public abstract Selection getSelection(Page page)
Return the Selection for the whole page.


purgeTextContent

public abstract void purgeTextContent(Page page)


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.