Class SearchDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.nebula.widgets.nattable.search.gui.SearchDialog
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider
public class SearchDialog
extends org.eclipse.jface.dialogs.Dialog
Find Dialog. Borrows from
org.eclipse.ui.texteditor.FindReplaceDialog. Used internally by
SearchAction.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.ButtonThe Find button.protected org.eclipse.swt.widgets.ComboThe input field for the search phrase.protected org.eclipse.swt.events.ModifyListenerTheModifyListenerto be attached on the input field.protected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.Buttonprotected org.eclipse.swt.widgets.LabelThe label to show the search status.protected org.eclipse.swt.widgets.Buttonprotected booleanprotected org.eclipse.swt.widgets.Buttonprotected booleanFields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred -
Constructor Summary
ConstructorsConstructorDescriptionSearchDialog(org.eclipse.swt.widgets.Shell shell, Comparator<?> comparator, int style) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclose()voidcreate()protected org.eclipse.swt.widgets.CompositecreateButtonSection(org.eclipse.swt.widgets.Composite composite) Create the section with the action buttons.protected org.eclipse.swt.widgets.ControlcreateContents(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.CompositecreateInputPanel(org.eclipse.swt.widgets.Composite composite) Create the input panel.protected org.eclipse.swt.widgets.CompositecreateOptionsPanel(org.eclipse.swt.widgets.Composite composite) Create the search options panel.protected org.eclipse.swt.widgets.CompositecreateStatusPanel(org.eclipse.swt.widgets.Composite composite) Create the panel to show the status.protected voiddoFind()Trigger the search.protected voidstatic intgetButtonWidthHint(org.eclipse.swt.widgets.Button button) protected org.eclipse.jface.dialogs.IDialogSettingsprotected intprotected org.eclipse.swt.events.ModifyListenerprotected org.eclipse.swt.widgets.Labelprotected Stringorg.eclipse.jface.dialogs.IDialogSettingsprotected StringbooleanisModal()protected booleanprotected voidReset the selections.voidprotected voidsetNotFoundStatusString(String notFoundStatusString) protected voidsetWrappedStatusString(String wrappedStatusString) protected voidUpdate the whole word and the incremental button according to the selection of the regex and the all button.Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonBar, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Field Details
-
findCombo
protected org.eclipse.swt.widgets.Combo findComboThe input field for the search phrase.- Since:
- 2.3
-
forwardButton
protected org.eclipse.swt.widgets.Button forwardButton- Since:
- 2.3
-
forwardValue
protected boolean forwardValue- Since:
- 2.3
-
allButton
protected org.eclipse.swt.widgets.Button allButton- Since:
- 2.3
-
allValue
protected boolean allValue- Since:
- 2.3
-
selectionButton
protected org.eclipse.swt.widgets.Button selectionButton- Since:
- 2.3
-
caseSensitiveButton
protected org.eclipse.swt.widgets.Button caseSensitiveButton- Since:
- 2.3
-
caseSensitiveValue
protected boolean caseSensitiveValue- Since:
- 2.3
-
wrapSearchButton
protected org.eclipse.swt.widgets.Button wrapSearchButton- Since:
- 2.3
-
wrapSearchValue
protected boolean wrapSearchValue- Since:
- 2.3
-
wholeWordButton
protected org.eclipse.swt.widgets.Button wholeWordButton- Since:
- 2.3
-
wholeWordValue
protected boolean wholeWordValue- Since:
- 2.3
-
incrementalButton
protected org.eclipse.swt.widgets.Button incrementalButton- Since:
- 2.3
-
incrementalValue
protected boolean incrementalValue- Since:
- 2.3
-
columnFirstButton
protected org.eclipse.swt.widgets.Button columnFirstButton- Since:
- 2.3
-
columnFirstValue
protected boolean columnFirstValue- Since:
- 2.3
-
regexButton
protected org.eclipse.swt.widgets.Button regexButton- Since:
- 2.3
-
regexValue
protected boolean regexValue- Since:
- 2.3
-
statusLabel
protected org.eclipse.swt.widgets.Label statusLabelThe label to show the search status.- Since:
- 2.3
-
findButton
protected org.eclipse.swt.widgets.Button findButtonThe Find button.- Since:
- 2.3
-
findComboModifyListener
protected org.eclipse.swt.events.ModifyListener findComboModifyListenerTheModifyListenerto be attached on the input field.- Since:
- 2.3
-
-
Constructor Details
-
SearchDialog
-
-
Method Details
-
setInput
-
isResizable
protected boolean isResizable()- Overrides:
isResizablein classorg.eclipse.jface.dialogs.Dialog
-
isModal
public boolean isModal()- Since:
- 1.5
-
getNatTable
- Since:
- 1.5
-
getOriginalDialogSettings
public org.eclipse.jface.dialogs.IDialogSettings getOriginalDialogSettings()- Since:
- 1.5
-
create
public void create()- Overrides:
createin classorg.eclipse.jface.dialogs.Dialog
-
close
public boolean close()- Overrides:
closein classorg.eclipse.jface.dialogs.Dialog
-
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent) - Overrides:
createContentsin classorg.eclipse.jface.dialogs.Dialog
-
createStatusPanel
protected org.eclipse.swt.widgets.Composite createStatusPanel(org.eclipse.swt.widgets.Composite composite) Create the panel to show the status.- Parameters:
composite- The parent composite.- Returns:
- The status panel.
- Since:
- 2.3
-
createButtonSection
protected org.eclipse.swt.widgets.Composite createButtonSection(org.eclipse.swt.widgets.Composite composite) Create the section with the action buttons.- Parameters:
composite- The parent composite.- Returns:
- The button panel.
- Since:
- 2.3
-
getButtonWidthHint
public static int getButtonWidthHint(org.eclipse.swt.widgets.Button button) -
createInputPanel
protected org.eclipse.swt.widgets.Composite createInputPanel(org.eclipse.swt.widgets.Composite composite) Create the input panel.- Parameters:
composite- The parent composite.- Returns:
- The input panel.
- Since:
- 2.3
-
getFindLabel
protected org.eclipse.swt.widgets.Label getFindLabel()- Returns:
- The label for the find combo.
- Since:
- 2.3
-
getFindComboModifyListener
protected org.eclipse.swt.events.ModifyListener getFindComboModifyListener()- Returns:
- The
ModifyListenerattached to the find combo. - Since:
- 2.3
-
createOptionsPanel
protected org.eclipse.swt.widgets.Composite createOptionsPanel(org.eclipse.swt.widgets.Composite composite) Create the search options panel.- Parameters:
composite- The parent composite.- Returns:
- The panel containing the search options.
- Since:
- 2.3
-
doFind
protected void doFind()Trigger the search.- Since:
- 2.3
-
doIncrementalFind
protected void doIncrementalFind() -
resetIncrementalSelections
protected void resetIncrementalSelections()Reset the selections.- Since:
- 2.3
-
updateButtons
protected void updateButtons()Update the whole word and the incremental button according to the selection of the regex and the all button.- Since:
- 2.3
-
getDialogBoundsSettings
protected org.eclipse.jface.dialogs.IDialogSettings getDialogBoundsSettings()- Overrides:
getDialogBoundsSettingsin classorg.eclipse.jface.dialogs.Dialog
-
getDialogBoundsStrategy
protected int getDialogBoundsStrategy()- Overrides:
getDialogBoundsStrategyin classorg.eclipse.jface.dialogs.Dialog
-
getNotFoundStatusString
- Returns:
- The string to be shown if the search did not find anything.
- Since:
- 2.3
-
setNotFoundStatusString
- Parameters:
notFoundStatusString- The string to be shown if the search did not find anything.- Since:
- 2.3
-
getWrappedStatusString
- Returns:
- The string to be shown if the search is wrapped.
- Since:
- 2.3
-
setWrappedStatusString
- Parameters:
wrappedStatusString- The string to be shown if the search is wrapped.- Since:
- 2.3
-