|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.faceless.pdf2.viewer2.feature.TextSelection
public abstract class TextSelection
This class is a transparent panel which is laid overtop of the PagePanel. It will
highlight any text in the TextSelection.RangeList returned by getRangeList().
This class is used by the TextTool and TextHighlighter classes
to manage text markup, and it's unlikely that customers would need to access this
class directly.
| Nested Class Summary | |
|---|---|
static class |
TextSelection.Range
A Range represents a selected range of PageExtractor.Text items. |
static class |
TextSelection.RangeList
A RangeList is a read-only list of Range objects |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
TYPE_BLOCK
A type of highlight which will highlight the selected text using a solid block of (usually translucent) color |
static int |
TYPE_DOUBLESTRIKEOUT
A type of highlight which will strike-out the selected text with a double line |
static int |
TYPE_DOUBLEUNDERLINE
A type of highlight which will highlight the selected text using a double underline. |
static int |
TYPE_OUTLINE
A type of highlight which will outline the selected text. |
static int |
TYPE_STRIKEOUT
A type of highlight which will strike-out the selected text. |
static int |
TYPE_UNDERLINE
A type of highlight which will highlight the selected text using a single underline. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TextSelection(int type,
Paint color,
Stroke stroke,
float margin)
|
|
| Method Summary | |
|---|---|
void |
drawHighlight(int type,
Paint color,
Stroke stroke,
Graphics2D g,
Shape shape)
Draw a highlight of a certain type onto the specified graphics. |
protected abstract TextSelection.RangeList |
getRangeList()
Return the RangeList that will be highlighted by this TextTool |
void |
paintComponent(Graphics gg)
|
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_BLOCK
public static final int TYPE_UNDERLINE
public static final int TYPE_DOUBLEUNDERLINE
public static final int TYPE_OUTLINE
public static final int TYPE_STRIKEOUT
public static final int TYPE_DOUBLESTRIKEOUT
| Constructor Detail |
|---|
public TextSelection(int type,
Paint color,
Stroke stroke,
float margin)
| Method Detail |
|---|
protected abstract TextSelection.RangeList getRangeList()
public void paintComponent(Graphics gg)
paintComponent in class JComponent
public void drawHighlight(int type,
Paint color,
Stroke stroke,
Graphics2D g,
Shape shape)
type - the shape typecolor - the Colorg - the Graphics Objectshape - for Outline or Block, any shape. For underline types,
a GeneralPath of the form (x1,y1, x1,y2, x2,y2, x2,y1)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||