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

    Fields
    Modifier and Type
    Field
    Description
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
    The Find button.
    protected org.eclipse.swt.widgets.Combo
    The input field for the search phrase.
    protected org.eclipse.swt.events.ModifyListener
    The ModifyListener to be attached on the input field.
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
     
    protected org.eclipse.swt.widgets.Label
    The label to show the search status.
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     
    protected org.eclipse.swt.widgets.Button
     
    protected boolean
     

    Fields 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, ELLIPSIS

    Fields inherited from class org.eclipse.jface.window.Window

    CANCEL, OK, resizeHasOccurred
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchDialog(org.eclipse.swt.widgets.Shell shell, Comparator<?> comparator, int style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
     
    protected org.eclipse.swt.widgets.Composite
    createButtonSection(org.eclipse.swt.widgets.Composite composite)
    Create the section with the action buttons.
    protected org.eclipse.swt.widgets.Control
    createContents(org.eclipse.swt.widgets.Composite parent)
     
    protected org.eclipse.swt.widgets.Composite
    createInputPanel(org.eclipse.swt.widgets.Composite composite)
    Create the input panel.
    protected org.eclipse.swt.widgets.Composite
    createOptionsPanel(org.eclipse.swt.widgets.Composite composite)
    Create the search options panel.
    protected org.eclipse.swt.widgets.Composite
    createStatusPanel(org.eclipse.swt.widgets.Composite composite)
    Create the panel to show the status.
    protected void
    Trigger the search.
    protected void
     
    static int
    getButtonWidthHint(org.eclipse.swt.widgets.Button button)
     
    protected org.eclipse.jface.dialogs.IDialogSettings
     
    protected int
     
    protected org.eclipse.swt.events.ModifyListener
     
    protected org.eclipse.swt.widgets.Label
     
     
    protected String
     
    org.eclipse.jface.dialogs.IDialogSettings
     
    protected String
     
    boolean
     
    protected boolean
     
    protected void
    Reset the selections.
    void
    setInput(NatTable natTable, org.eclipse.jface.dialogs.IDialogSettings settings)
     
    protected void
    setNotFoundStatusString(String notFoundStatusString)
     
    protected void
    setWrappedStatusString(String wrappedStatusString)
     
    protected void
    Update 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, shortenText

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • findCombo

      protected org.eclipse.swt.widgets.Combo findCombo
      The 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 statusLabel
      The label to show the search status.
      Since:
      2.3
    • findButton

      protected org.eclipse.swt.widgets.Button findButton
      The Find button.
      Since:
      2.3
    • findComboModifyListener

      protected org.eclipse.swt.events.ModifyListener findComboModifyListener
      The ModifyListener to be attached on the input field.
      Since:
      2.3
  • Constructor Details

    • SearchDialog

      public SearchDialog(org.eclipse.swt.widgets.Shell shell, Comparator<?> comparator, int style)
  • Method Details

    • setInput

      public void setInput(NatTable natTable, org.eclipse.jface.dialogs.IDialogSettings settings)
    • isResizable

      protected boolean isResizable()
      Overrides:
      isResizable in class org.eclipse.jface.dialogs.Dialog
    • isModal

      public boolean isModal()
      Since:
      1.5
    • getNatTable

      public NatTable getNatTable()
      Since:
      1.5
    • getOriginalDialogSettings

      public org.eclipse.jface.dialogs.IDialogSettings getOriginalDialogSettings()
      Since:
      1.5
    • create

      public void create()
      Overrides:
      create in class org.eclipse.jface.dialogs.Dialog
    • close

      public boolean close()
      Overrides:
      close in class org.eclipse.jface.dialogs.Dialog
    • createContents

      protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
      Overrides:
      createContents in class org.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 ModifyListener attached 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:
      getDialogBoundsSettings in class org.eclipse.jface.dialogs.Dialog
    • getDialogBoundsStrategy

      protected int getDialogBoundsStrategy()
      Overrides:
      getDialogBoundsStrategy in class org.eclipse.jface.dialogs.Dialog
    • getNotFoundStatusString

      protected String getNotFoundStatusString()
      Returns:
      The string to be shown if the search did not find anything.
      Since:
      2.3
    • setNotFoundStatusString

      protected void setNotFoundStatusString(String notFoundStatusString)
      Parameters:
      notFoundStatusString - The string to be shown if the search did not find anything.
      Since:
      2.3
    • getWrappedStatusString

      protected String getWrappedStatusString()
      Returns:
      The string to be shown if the search is wrapped.
      Since:
      2.3
    • setWrappedStatusString

      protected void setWrappedStatusString(String wrappedStatusString)
      Parameters:
      wrappedStatusString - The string to be shown if the search is wrapped.
      Since:
      2.3