public interface NetworkSearchTaskFactory extends TaskFactory
Modifier and Type | Field and Description |
---|---|
static String |
QUERY_PROPERTY
Name of the property that indicates that the provided query or options component changed the
query parameters.
|
static String |
SEARCH_REQUESTED_PROPERTY
Name of the property that indicates that a search action has been requested by the custom query component.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
An optional short text describing what this search provider does.
|
Icon |
getIcon()
An icon that represents this search provider.
|
String |
getId()
Returns the unique id of this network search provider.
|
String |
getName()
A short name to be displayed to the user.
|
JComponent |
getOptionsComponent()
You can use this method to return a component that contains extra search parameters.
|
JComponent |
getQueryComponent()
Use this method to return a component that contains the main or mandatory search fields.
If this task factory provides its own query component, make sure the returned JComponent fires a
PropertyChangeEvent for the property QUERY_PROPERTY whenever its fields change
in a way that affects the return of the TaskFactory.isReady() method. |
TaskObserver |
getTaskObserver()
If you want to be notified when the search task is finished, you should return a TaskObserver here.
|
URL |
getWebsite()
An optional URL the user can use to find more information about this search provider.
|
createTaskIterator, isReady
static final String QUERY_PROPERTY
JComponent
s should fire a PropertyChangeEvent
for this property if it wants Cytoscape to check this TaskFactory's TaskFactory.isReady()
method again.static final String SEARCH_REQUESTED_PROPERTY
PropertyChangeEvent
for this property whenever it wants Cytoscape to execute the search (i.e. run the tasks created by this factory's
implementation).
Note that the TaskFactory.isReady()
method must also return true when the event is fired).String getId()
String getName()
String getDescription()
Icon getIcon()
URL getWebsite()
TaskObserver getTaskObserver()
TaskObserver
to be passed to the TaskManager
when running the search task(s)
created by this TaskFactory.JComponent getQueryComponent()
JComponent
fires a
PropertyChangeEvent
for the property QUERY_PROPERTY
whenever its fields change
in a way that affects the return of the TaskFactory.isReady()
method. That way, Cytoscape can listen to
this property change event and call TaskFactory.isReady()
again to update the Network Search widget accordingly
(e.g. by enabling or disabling the search button). All the query component needs to do is call
firePropertyChange(NetworkSearchTaskFactory.QUERY_PROPERTY, null, null);
PropertyChangeEvent
for the property
SEARCH_REQUESTED_PROPERTY
in order to ask Cytoscape to run the search as soon as possible--for instance,
you can do this when the user presses the ENTER key on your custom query fields.JComponent getOptionsComponent()
getQueryComponent()
.JComponent
fires a
PropertyChangeEvent
for the property QUERY_PROPERTY
whenever its fields change
in a way that affects the return of the TaskFactory.isReady()
method. That way, Cytoscape can listen to
this property change event and call TaskFactory.isReady()
again to update the Network Search widget accordingly
(e.g. by enabling or disabling the search button). All the options component needs to do is call
firePropertyChange(NetworkSearchTaskFactory.QUERY_PROPERTY, null, null);
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.