Class TextComponentSearchResults

java.lang.Object
docking.widgets.search.SearchResults
docking.widgets.search.TextComponentSearchResults

public class TextComponentSearchResults extends SearchResults
  • Field Details

  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from class: SearchResults
      Returns the name of this set of search results. This is a short description, such as a filename or function name. This should be null for text components that do not change contents based on some external source of data, such as a file.
      Specified by:
      getName in class SearchResults
      Returns:
      the name or null
    • deactivate

      public void deactivate()
      Description copied from class: SearchResults
      Deactivates this set of search results. This will clear this results' highlights from the source of the search.
      Specified by:
      deactivate in class SearchResults
    • activate

      public void activate()
      Triggers the potentially asynchronous activation of this set of search results. When that is finished, we then restore our highlights. This is needed in the case that the implementor is using a document that does not match our search results. Some subclasses use asynchronous loading of their document.
      Specified by:
      activate in class SearchResults
    • setActiveLocation

      public void setActiveLocation(SearchLocation location)
      Description copied from class: SearchResults
      Sets the active location, which will be highlighted differently than the other search matches. This method will ensure that this search results object is active (see SearchResults.activate(). This method will also move the cursor to the given location.
      Specified by:
      setActiveLocation in class SearchResults
      Parameters:
      location - the location
    • startActivation

      protected SearchResults.ActivationJob startActivation()
      Create a job to perform activation for this class. The activation job may be a 'done' job if not activation is required.
      Returns:
      the job
    • createActivationJob

      protected SearchResults.ActivationJob createActivationJob()
      Starts the job that will activate this class. Subclasses can override this method to change the job that gets run.
      Returns:
      the job
    • createFinishedActivationJob

      protected SearchResults.ActivationJob createFinishedActivationJob()
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in class SearchResults
    • getLocations

      public List<SearchLocation> getLocations()
      Description copied from class: SearchResults
      Returns all search locations in this set of search results
      Specified by:
      getLocations in class SearchResults
      Returns:
      the location
    • isInvalid

      protected boolean isInvalid(String otherSearchText)
    • getActiveLocation

      public SearchLocation getActiveLocation()
      Description copied from class: SearchResults
      Returns the active search location or null. The active location is typically the search location that contains the user's cursor..
      Specified by:
      getActiveLocation in class SearchResults
      Returns:
      the active search location or null. The active location is typically the search location that contains the user's cursor.
    • dispose

      public void dispose()
      Specified by:
      dispose in class SearchResults
    • toString

      public String toString()
      Overrides:
      toString in class Object