Class Findable.FindOptions

  • Enclosing class:
    Findable

    public static final class Findable.FindOptions
    extends java.lang.Object
    User options for a search.
    • Constructor Summary

      Constructors 
      Constructor Description
      FindOptions​(java.lang.String text, boolean caseSensitive, boolean isFromStart, boolean isForwards, Options additionalOptions)
      This constructor must only be called by Geneious; do not call it from a plugin!
    • Constructor Detail

      • FindOptions

        public FindOptions​(java.lang.String text,
                           boolean caseSensitive,
                           boolean isFromStart,
                           boolean isForwards,
                           Options additionalOptions)
        This constructor must only be called by Geneious; do not call it from a plugin!
        Parameters:
        text - getText()
        caseSensitive - isCaseSensitive()
        isFromStart - isFromStart()
        isForwards - isForwards()
        additionalOptions - Custom options to replace the case sensitive option, or null to use the default case sensitive option.
    • Method Detail

      • setFindAll

        public void setFindAll​(boolean findAll)
        Sets the search to do a "find all" (i.e. find all occurrences of the given text). Normally core Geneious sets this to true if the user clicked the "Find All" button, which is only visible if Findable.canFindAll() returned true
        Parameters:
        findAll - true if we should do a "find all" rather than just finding a single occurrence.
        Since:
        API 4.40 (Geneious 5.4.0)
      • getText

        public java.lang.String getText()
        Get text to be searched for.
        Returns:
        the text
      • isCaseSensitive

        public boolean isCaseSensitive()
        Should the search be case sensitive?
        Returns:
        true if the search should be case sensitive
        Throws:
        java.lang.IllegalStateException - if the additionalOptions passed to the constructor are != null
      • isForwards

        public boolean isForwards()
        Get search direction. True if the search is to be performed and a forward direction rather than backwards
        Returns:
        search direction
      • isFromStart

        public boolean isFromStart()
        Get search start location. True if the search should be performed from the start. When the user clicks "Find Next", this will be false.
        Returns:
        start location
      • isFindAll

        public boolean isFindAll()
        Returns true if this search should find all occurrences rather than just a single occurrence.
        Returns:
        true if this search should find all occurrences rather than just a single occurrence.
        Since:
        API 4.40 (Geneious 5.4.0)