public class JavaFXSearchWindow extends javafx.stage.Stage implements GUISearchWindow
We extend from Stage to add search into the left side-tab or to pop open a search window when either style==SEARCH_EXTERNAL_WINDOW || style==SEARCH_TABBED_PANE search style can be controlled from Viewer preferences.
| Modifier and Type | Field and Description |
|---|---|
boolean |
hasSearched |
boolean |
isSearch |
boolean |
requestInterupt |
SEARCH_EXTERNAL_WINDOW, SEARCH_MENU_BAR, SEARCH_TABBED_PANE| Constructor and Description |
|---|
JavaFXSearchWindow(GUIFactory currentGUI) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose of the search window
|
void |
find(PdfDecoderInt dec,
Values values)
Find text in PDF using the search window.
|
void |
findWithoutWindow(PdfDecoderInt dec,
Values values,
int searchType,
boolean listOfTerms,
boolean singlePageOnly,
String searchValue)
Find text in PDF without using the search window.
|
javafx.scene.layout.VBox |
getContentVB()
Get the Vertical box that holds the search window contents
|
int |
getFirstPageWithResults()
Get the first page with results
|
GUISearchList |
getResults()
Get the search result list
|
GUISearchList |
getResults(int page)
Perform a search on a single page and return the results
|
Map |
getTextRectangles()
Get the search result areas for the current results
|
int |
getViewStyle()
Get the view style being used by the search interface
|
void |
grabFocusInInput()
Have search text input grab focus
|
void |
init(PdfDecoderInt dec,
Values values)
Not part of API - used internally
|
boolean |
isSearchVisible()
Gets the visibility of the search interface (external window style only)
|
void |
removeSearchWindow(boolean justHide)
Remove the search window from view and clear the results if required.
|
void |
resetSearchWindow() |
void |
selectSearchOptions(int options)
Set search options using bit flags from an int value.
|
void |
setCaseSensitive(boolean caseSensitive)
Set if search should use the case sensitive search rule
|
void |
setMultiLine(boolean multiLine)
Set if the search should use the find multi line results rule
|
void |
setSearchText(String s)
Set the value of the search input
|
void |
setUpdateListDuringSearch(boolean updateListDuringSearch)
Set if the search result list should be updated as the search continues
|
void |
setViewStyle(int i)
Set the view style for the search interface using a flag to control the style
|
void |
setWholeWords(boolean wholeWords)
Set if search should use the search whole words only rule
|
alwaysOnTopProperty, close, fullScreenExitHintProperty, fullScreenExitKeyProperty, fullScreenProperty, getFullScreenExitHint, getFullScreenExitKeyCombination, getIcons, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getModality, getOwner, getStyle, getTitle, iconifiedProperty, impl_getMXWindowType, impl_setImportant, impl_setPrimary, impl_visibleChanged, impl_visibleChanging, initModality, initOwner, initStyle, isAlwaysOnTop, isFullScreen, isIconified, isMaximized, isResizable, maxHeightProperty, maximizedProperty, maxWidthProperty, minHeightProperty, minWidthProperty, resizableProperty, setAlwaysOnTop, setFullScreen, setFullScreenExitHint, setFullScreenExitKeyCombination, setIconified, setMaxHeight, setMaximized, setMaxWidth, setMinHeight, setMinWidth, setResizable, setScene, setTitle, show, showAndWait, titleProperty, toBack, toFrontaddEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getProperties, getScene, getUserData, getWidth, getX, getY, hasProperties, heightProperty, hide, impl_getPeer, impl_getWindows, isFocused, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, removeEventFilter, removeEventHandler, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setFocused, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setUserData, setWidth, setX, setY, showingProperty, sizeToScene, widthProperty, xProperty, yPropertypublic boolean hasSearched
public boolean isSearch
public boolean requestInterupt
public JavaFXSearchWindow(GUIFactory currentGUI)
public void find(PdfDecoderInt dec, Values values)
find in interface GUISearchWindowdec - PdfDecoderInt object used for the PDF to be searchedvalues - Values object used by the user interfacepublic void findWithoutWindow(PdfDecoderInt dec, Values values, int searchType, boolean listOfTerms, boolean singlePageOnly, String searchValue)
findWithoutWindow in interface GUISearchWindowdec - PdfDecoderInt object used for the PDF to be searchedvalues - Values object used by the user interfacesearchType - int value using bit flags to control search optionslistOfTerms - true to treat search value as a space separated list, false to treat as a single search termsinglePageOnly - true to search just the current page, false to search the entire documentsearchValue - String value to be searched, this can be either a single search term or a space separated list of terms controlled by listOfTermspublic void grabFocusInInput()
grabFocusInInput in interface GUISearchWindowpublic boolean isSearchVisible()
isSearchVisible in interface GUISearchWindowpublic void init(PdfDecoderInt dec, Values values)
Used to initialise the search interface ready for use.
init in interface GUISearchWindowdec - PdfDecoderInt object used for the current PDFvalues - Values object used by the user interfacepublic javafx.scene.layout.VBox getContentVB()
public void removeSearchWindow(boolean justHide)
removeSearchWindow in interface GUISearchWindowjustHide - true to keep the results, false to clear resultspublic void resetSearchWindow()
resetSearchWindow in interface GUISearchWindowpublic GUISearchList getResults()
getResults in interface GUISearchWindowpublic GUISearchList getResults(int page)
getResults in interface GUISearchWindowpage - int value for the page to be searchedpublic Map getTextRectangles()
getTextRectangles in interface GUISearchWindowpublic int getViewStyle()
getViewStyle in interface GUISearchWindowpublic void setViewStyle(int i)
For instance the search interface can be displayed as follows. setViewStyle(GUISearchWindow.SEARCH_EXTERNAL_WINDOW); // Show search interface as external window setViewStyle(GUISearchWindow.SEARCH_TABBED_PANE); // Show search interface on side tab bar setViewStyle(GUISearchWindow.SEARCH_MENU_BAR); // Show search interface on button tool bar
setViewStyle in interface GUISearchWindowi - int value representing the search stylepublic int getFirstPageWithResults()
getFirstPageWithResults in interface GUISearchWindowpublic void setWholeWords(boolean wholeWords)
setWholeWords in interface GUISearchWindowwholeWords - true to enable whole words only rule, false to disablepublic void setCaseSensitive(boolean caseSensitive)
setCaseSensitive in interface GUISearchWindowcaseSensitive - true to enable case sensitive search rule, false to disablepublic void setMultiLine(boolean multiLine)
setMultiLine in interface GUISearchWindowmultiLine - true to enable find multi line results rule, false to disablepublic void setSearchText(String s)
setSearchText in interface GUISearchWindows - String value to be used as search inputpublic void setUpdateListDuringSearch(boolean updateListDuringSearch)
setUpdateListDuringSearch in interface GUISearchWindowupdateListDuringSearch - true to enable live list updating, false to disablepublic void dispose()
dispose in interface GUISearchWindowpublic void selectSearchOptions(int options)
selectSearchOptions in interface GUISearchWindowoptions - itn value presenting search options to be setCopyright © 2017. All rights reserved.