Class DatabaseServiceListener


  • public abstract class DatabaseServiceListener
    extends java.lang.Object
    Code using a DatabaseService can get notified of special events by registering this listener via addDatabaseServiceListener. Any implementation of a database service which supports the type of changes handled here should call those callbacs to insure proper handling of the service UI on Geneious side.
    • Constructor Detail

      • DatabaseServiceListener

        public DatabaseServiceListener()
    • Method Detail

      • browsableContentsChanged

        public void browsableContentsChanged()
        Gets called when the browse contents of this Database Service have been changed. (Provided this is a browasable database). This typically results in the using code retrieving the document list again from the database.
      • searchableStatusChanged

        public void searchableStatusChanged​(boolean isSearchable,
                                            java.lang.String message)
        Notify using code about a change in status of searchability. Typical usage is to disable the search interface and stop agents from attempting a search.
        Parameters:
        isSearchable - false to disable the search button/panel in the interface
        message - to display to the user if isSearchable == false. Ignored if isSearchable == true
      • documentCopyAboutToBeAdded

        public void documentCopyAboutToBeAdded​(AnnotatedPluginDocument document)
        Called when a document is about to be added to a WritableDatabaseService. Only called for changes in the service this listener was added to, not any child services. This method is only called if the listener is on a WritableDatabaseService.
        Parameters:
        document - the document that is about to be added. NOTE: This is not the actual document that will be stored in the database, a copy of this document will be added.
      • hiddenElementsChanged

        public void hiddenElementsChanged()
        Called when one or more hidden elements have been updated, added or removed from a WritableDatabaseService. Only called for changes in the service this listener was added to, not any child services. This method is only called if the listener is on a WritableDatabaseService.
      • fieldsChanged

        public void fieldsChanged()
        Notify using code about a change in search fields. Typically using code need to obtain the search fields again and update the search UI etc.
      • extendedSearchOptionsChanged

        public void extendedSearchOptionsChanged()
        Notify the code using this database that this database's extended options have changed. This would typically result in DatabaseService.getExtendedSearchOptions(boolean) being called again so the UI can be updated for example.