org.xnap.search
Class SearchContainer

java.lang.Object
  extended by org.xnap.search.SearchContainer
All Implemented Interfaces:
Search, SearchHandler

public class SearchContainer
extends java.lang.Object
implements Search, SearchHandler


Constructor Summary
SearchContainer(SearchFilter filter)
           
 
Method Summary
 void add(Search search)
           
 javax.swing.Action[] getActions()
          Returns null.
 SearchFilter getFilter()
          Returns the search filter that was used to find the results.
 java.lang.String getName()
          Returns a string that should be shown to the user.
 java.lang.String getStatus()
          Returns a string that describes the current status.
 boolean isDone()
          Returns true, if this search is finished and can not be started again.
 void resultReceived(SearchResult result)
          Invoked when result is received.
 boolean showTree()
          Returns true, if a tree should be shown next to search results.
 void start(SearchHandler handler)
          Starts this search.
 void stateChanged(Search search)
          Invoked when the state of search changes.
 void stop()
          Cancels this search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchContainer

public SearchContainer(SearchFilter filter)
Method Detail

add

public void add(Search search)

getActions

public javax.swing.Action[] getActions()
Returns null.

Specified by:
getActions in interface Search

getFilter

public SearchFilter getFilter()
Description copied from interface: Search
Returns the search filter that was used to find the results. This is also used for double fitering.

Specified by:
getFilter in interface Search
Returns:
null, if no filter was used; the filter, otherwise

getName

public java.lang.String getName()
Description copied from interface: Search
Returns a string that should be shown to the user.

Specified by:
getName in interface Search

getStatus

public java.lang.String getStatus()
Description copied from interface: Search
Returns a string that describes the current status.

Specified by:
getStatus in interface Search

isDone

public boolean isDone()
Description copied from interface: Search
Returns true, if this search is finished and can not be started again.

Specified by:
isDone in interface Search

resultReceived

public void resultReceived(SearchResult result)
Invoked when result is received.

Specified by:
resultReceived in interface SearchHandler

stateChanged

public void stateChanged(Search search)
Invoked when the state of search changes.

Specified by:
stateChanged in interface SearchHandler

showTree

public boolean showTree()
Description copied from interface: Search
Returns true, if a tree should be shown next to search results.

Specified by:
showTree in interface Search

start

public void start(SearchHandler handler)
Description copied from interface: Search
Starts this search.

Specified by:
start in interface Search
Parameters:
handler - the object that handles the results

stop

public void stop()
Description copied from interface: Search
Cancels this search.

Specified by:
stop in interface Search


Copyright © 2001-2005 XNap Team. All Rights Reserved.