Module tvbrowser
Package util.ui

Class SearchFormSettings


  • public class SearchFormSettings
    extends java.lang.Object
    Settings for the SearchForm
    Author:
    Til Schneider, www.murfman.de
    See Also:
    SearchForm
    • Constructor Detail

      • SearchFormSettings

        public SearchFormSettings​(java.lang.String searchText)
        Creates a new SearchFormSettings instance.
        Parameters:
        searchText - The search text
      • SearchFormSettings

        public SearchFormSettings​(java.io.ObjectInputStream in)
                           throws java.io.IOException,
                                  java.lang.ClassNotFoundException
        Loads a SearchFormSettings instance from a stream.
        Parameters:
        in - The stream to read from
        Throws:
        java.io.IOException - If reading failed
        java.lang.ClassNotFoundException - If the read data has the wrong format
        See Also:
        writeData(ObjectOutputStream)
    • Method Detail

      • writeData

        public void writeData​(java.io.ObjectOutputStream out)
                       throws java.io.IOException
        Writes the settings into a stream
        Parameters:
        out - The stream to write to
        Throws:
        java.io.IOException - If writing failed
        See Also:
        SearchFormSettings(ObjectInputStream)
      • toString

        public java.lang.String toString()
        Gets the search text.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The search text
      • getSearchText

        public java.lang.String getSearchText()
        Gets the search text.
        Returns:
        The search text
      • setSearchText

        public void setSearchText​(java.lang.String searchText)
        Sets the search text.
        Parameters:
        searchText - The search text
      • createSearcher

        public ProgramSearcher createSearcher​(java.lang.String text)
                                       throws TvBrowserException
        Creates a searcher from this settings
        Parameters:
        text - Search for this Text
        Returns:
        A searcher that satisfies these settings.
        Throws:
        TvBrowserException - If creating the searcher failed.
      • getFieldTypes

        public ProgramFieldType[] getFieldTypes()
        Gets the field types to search for.
        Returns:
        The field types to search for.
      • getUserDefaultFieldTypes

        public ProgramFieldType[] getUserDefaultFieldTypes()
        Gets the default field types for initially selection.

        Returns:
        The default field types for initially selection.
        Since:
        3.2.1
      • getUserDefinedFieldTypes

        public ProgramFieldType[] getUserDefinedFieldTypes()
        Gets the field types defined by the user.
        Returns:
        The field types defined by the user.
      • setUserDefinedFieldTypes

        public void setUserDefinedFieldTypes​(ProgramFieldType[] typeArr)
        Sets the user-defined field types to search for.
        Parameters:
        typeArr - The field types to search for
      • setUserDefaultFieldTypes

        public void setUserDefaultFieldTypes​(ProgramFieldType[] typeArr)
        Sets the default selection field types. ATTENTION: The default selection is not stored in this settings, if you want to keep it you have to save it otherwise.

        Parameters:
        typeArr - The default selection field types.
        Since:
        3.2.1
      • getCaseSensitive

        public boolean getCaseSensitive()
        Gets whether to search case sensitive.
        Returns:
        Whether to search case sensitive
      • setCaseSensitive

        public void setCaseSensitive​(boolean caseSensitive)
        Sets whether to search case sensitive.
        Parameters:
        caseSensitive - Whether to search case sensitive
      • getNrDays

        public int getNrDays()
        Gets the number of days If this value is negative, it searches all data (including yesterday)
        Returns:
        number of days to search
      • setNrDays

        public void setNrDays​(int nr)
        Sets the number of days If this value is negative, it searches all data (including yesterday)
        Parameters:
        nr - number of days to search
      • getChannels

        public Channel[] getChannels()
        Get the Channels to search on This returns null when all channels should be searched
        Returns:
        channels to search on
      • setChannels

        public void setChannels​(Channel[] channel)