|
||||||||||
| 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.SearchPanel.Results
public static class SearchPanel.Results
This class is the SidePanel returned by the parent factory, and represents the search results panel. It may be created by the parent factory, or may be instantiated on it's own.
| Nested Class Summary |
|---|
| 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 |
|---|
| 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 | |
|---|---|
SearchPanel.Results()
Create a new Results object. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener listener)
Add a ChangeListener to this panel. |
void |
addResult(PageExtractor.Text text)
Add the specified PageExtractor.Text to the list of results |
void |
cancel()
Cancel any currently running search |
void |
clearResults()
Clear the list of results |
String |
getName()
Return the name of this tab - "Find" |
float |
getSearchProgress()
Return the progress of the current search. |
protected void |
indexPage(int pagenumber,
PageExtractor extractor)
Index the page. |
protected boolean |
mayContain(int pagenumber,
String value)
Return whether the specified text may be found on the specified pagenumber. |
void |
panelHidden()
Called when the panel is made hidden |
void |
panelVisible()
Called when the panel is made visible |
void |
redraw(Object o)
Called when the DocumentPanel.redraw(java.lang.Object) method is called, this
method should rebuild the specified object if appropriate for this
panel. |
void |
removeChangeListener(ChangeListener listener)
Remove a ChangeListener from this panel. |
void |
search(String text)
Search for an item of text in the PDF currently displayed in this DocumentPanel. |
void |
setDocumentPanel(DocumentPanel docpanel)
Set the DocumentPanel this SidePanel is a member of. |
void |
setTextTool(TextTool selection)
Set the TextTool object this object will highlight its results
on. |
| 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 |
| Constructor Detail |
|---|
public SearchPanel.Results()
| Method Detail |
|---|
public String getName()
getName in interface SidePanelgetName in class Componentpublic void setTextTool(TextTool selection)
TextTool object this object will highlight its results
on.
public void addResult(PageExtractor.Text text)
PageExtractor.Text to the list of results
public void clearResults()
public void addChangeListener(ChangeListener listener)
ChangeListener to this panel. A ChangeEvent
will be raised when the status of the search is updated.
public void removeChangeListener(ChangeListener listener)
ChangeListener from this panel.
public void search(String text)
DocumentPanel.
If a search is currently running it is interrupted, and any previously found results
are cleared.
text - the text to search forpublic void cancel()
public float getSearchProgress()
protected void indexPage(int pagenumber,
PageExtractor extractor)
mayContain(int, java.lang.String)
pagenumber - the page numberextractor - the extractor for that page
protected boolean mayContain(int pagenumber,
String value)
PageExtractor.getMatchingText(java.lang.String)
run on it to find and (possibly) return matching values. Although this method
could theoretically use some sort of index created in indexPage(int, org.faceless.pdf2.PageExtractor) to narrow down
which pages to search, but the default implementation always returns true.
pagenumber - the pagenumber to searchvalue - the text to search forpublic void setDocumentPanel(DocumentPanel docpanel)
SidePanelDocumentPanel this SidePanel is a member of. This method
is called every time the DocumentPanel has it's document changed - the
SidePanel should be reinitialized in this call. If the SidePanel
is removed, this method will be called with null as it's
argument.
setDocumentPanel in interface SidePanelpublic void panelVisible()
SidePanel
panelVisible in interface SidePanelpublic void panelHidden()
SidePanel
panelHidden in interface SidePanelpublic void redraw(Object o)
SidePanelDocumentPanel.redraw(java.lang.Object) method is called, this
method should rebuild the specified object if appropriate for this
panel.
redraw in interface SidePanel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||