|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.pdf2.viewer2.ViewerFeature
org.faceless.pdf2.viewer2.SidePanelFactory
org.faceless.pdf2.viewer2.feature.SearchPanel
public class SearchPanel
Creates a SidePanel
that displays search results. This panel may be used instead
of or as well as the SearchField
- if no SearchField is found the panel will have
a field placed at the top automatically (see setCreateSearchField(boolean)
).
createSearchField | true or false for setCreateSearchField(boolean) |
---|
This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
Nested Class Summary | |
---|---|
static class |
SearchPanel.Field
A subclass of JTextField customized for searching - it has a setProgress() method to report the progress of the search, and an icon in the background |
static class |
SearchPanel.Results
This class is the SidePanel returned by the parent factory, and represents the search results panel. |
Constructor Summary | |
---|---|
SearchPanel()
Create a new SearchPanel |
Method Summary | |
---|---|
SidePanel |
createSidePanel()
Create and return a new SidePanel . |
void |
initialize(PDFViewer viewer)
Called when the feature is first added to a viewer |
void |
setCreateSearchField(boolean createfield)
Set whether to create a SearchPanel.Field at the top of the SearchPanel.Results panel. |
void |
setTextTool(TextTool selection)
Set the TextTool object that will display the selection when an item
in this panel is clicked on. |
Methods inherited from class org.faceless.pdf2.viewer2.SidePanelFactory |
---|
isSidePanelRequired, toString |
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature |
---|
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchPanel()
Method Detail |
---|
public void initialize(PDFViewer viewer)
ViewerFeature
initialize
in class ViewerFeature
public void setCreateSearchField(boolean createfield)
SearchPanel.Field
at the top of the SearchPanel.Results
panel.
By default this is the case, although if a SearchField
is included in the
feature list this is turned off.
createfield
- whether to create a Field object or notpublic void setTextTool(TextTool selection)
TextTool
object that will display the selection when an item
in this panel is clicked on. A value of null
(the default) will cause
the panel to use the first TextTool object it finds in the viewer, or if none
exists a new one will be created.
selection
- the selection object that will be used to display the selected resultspublic SidePanel createSidePanel()
SidePanelFactory
SidePanel
.
createSidePanel
in class SidePanelFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |