|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.search.SearchMediator
This class acts as a mediator between the various search components -- the hub that all traffic passes through. This allows the decoupling of the various search packages and simplfies the responsibilities of the underlying classes.
Field Summary | |
static java.lang.Object |
REPEAT_SEARCH_LOCK
This object is used to synchronize the code that causes a repeat search to be initiated, and the code that adds lines to the resultPanel. |
Constructor Summary | |
SearchMediator()
Constructs the UI components of the search result display area of the search tab. |
Method Summary | |
static void |
browseHostFailed(com.limegroup.gnutella.GUID guid)
Call this when a Browse Host fails. |
static void |
doBrowseHost(com.limegroup.gnutella.RemoteFileDesc rfd)
Allows for browsing of a host from outside of the search package. |
static void |
doBrowseHost(java.lang.String host,
int port,
com.limegroup.gnutella.GUID guid)
Allows for browsing of a host from outside of the search package without an rfd. |
static javax.swing.JComponent |
getComponent()
Returns the JComponent instance containing all of the search result UI components. |
static InputPanel |
getCurrentInputPanel()
Returns the currently selected InputPanel instance. |
static javax.swing.JComponent |
getSearchBoxPanel()
Returns the search input panel component. |
static void |
handleQueryResult(com.limegroup.gnutella.RemoteFileDesc rfd,
com.limegroup.gnutella.search.HostData data,
java.util.Set alts)
If i rp is no longer the i'th panel of this, returns silently. |
static void |
setConnected(boolean connected)
Notifies the search window of the current connection status, making any necessary changes as a result, such as the enabled/disabled status of the search button. |
static byte[] |
triggerSearch(java.lang.String stext)
Triggers a search for the given text. |
void |
updateTheme()
Update any required theme settings, such as colors or images. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Object REPEAT_SEARCH_LOCK
If the code in these two blocks are interleaved, the code that initiates a repeatSearch - could clear the grouper, and not the model yet, before another line is added to the grouper.
Therefore the code in ResultPanel.repeatSearch() and the code in SearchView.handleQueryReplyInternal, have to be atomic with respect to each other. They are both synchronized on this object.
Constructor Detail |
public SearchMediator()
Method Detail |
public static void doBrowseHost(com.limegroup.gnutella.RemoteFileDesc rfd)
public static void doBrowseHost(java.lang.String host, int port, com.limegroup.gnutella.GUID guid)
public static void browseHostFailed(com.limegroup.gnutella.GUID guid)
guid
- The guid associated with this Browse.public static byte[] triggerSearch(java.lang.String stext)
public static void handleQueryResult(com.limegroup.gnutella.RemoteFileDesc rfd, com.limegroup.gnutella.search.HostData data, java.util.Set alts)
public static void setConnected(boolean connected)
connected
- the connected status of the clientpublic static javax.swing.JComponent getSearchBoxPanel()
public static InputPanel getCurrentInputPanel()
public static javax.swing.JComponent getComponent()
public void updateTheme()
ThemeObserver
updateTheme
in interface ThemeObserver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |