ice.ri.common.search
Class SearchStatusEventAdapter

java.lang.Object
  extended byice.ri.common.search.SearchStatusEventAdapter
All Implemented Interfaces:
EventListener, SearchStatusEventListener

public abstract class SearchStatusEventAdapter
extends Object
implements SearchStatusEventListener

An abstract adapter class for receiving search result or status. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a listener and override the methods in which you are interested.

Since:
6.1
See Also:
SearchStatusEventListener, SearchHelper

Constructor Summary
SearchStatusEventAdapter()
           
 
Method Summary
 void reset(int signal)
          Invoked when the document of top level Viewport or child Viewport is changed.
 void setSearchEnabled(boolean b)
          Invoked when executing search is currently allowed or disallowed.
 void setSearchStatusMessage(int status, int number_of_matches)
          Invoked when search result message needs to be set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchStatusEventAdapter

public SearchStatusEventAdapter()
Method Detail

setSearchStatusMessage

public void setSearchStatusMessage(int status,
                                   int number_of_matches)
Invoked when search result message needs to be set.

Specified by:
setSearchStatusMessage in interface SearchStatusEventListener
Parameters:
status -
  • SearchHelper.MATCH_FOUND if search found match.
  • SearchHelper.NO_MATCH_FOUND if search did not find match.
  • SearchHelper.END_OF_SEARCH if search has reached the end of the page
number_of_matches - The number of matches found. It is meaningful only if status equals SearchHelper.MATCH_FOUND and number_of_matches > 0.

setSearchEnabled

public void setSearchEnabled(boolean b)
Invoked when executing search is currently allowed or disallowed. This method can be used to enable or disable search buttons. This is useful when you use it in a non-modal form because search operation should be disabled when browser is in the process of loading new document.

Specified by:
setSearchEnabled in interface SearchStatusEventListener
Parameters:
b - true if executing search is allowed, false otherwise.

reset

public void reset(int signal)
Invoked when the document of top level Viewport or child Viewport is changed. This is useful when you use it in a non-modal form.

Specified by:
reset in interface SearchStatusEventListener
Parameters:
signal -
  • SearchHelper.RESET_ALL, document of top level Viewport is changed and HIGHLIGHT button, WHOLE-WORD and MATCH-CASE check boxes need to be reset.
  • SearchHelper.RESET_HIGHLIGHT, document of a child Viewport is changed and for example HIGHLIGHT button needs to be reset.