public abstract class AbstractNetworkSearchTaskFactory extends AbstractTaskFactory implements NetworkSearchTaskFactory
NetworkSearchTaskFactory makes the method getQueryComponent()
optional. If your Network Search provider extends this class and doesn't overwrite the getQueryComponent()
method, Cytoscape will use a default text field instead. It will also pass the new query text to the
setQuery(String) method every time the content of the default text field changes.QUERY_PROPERTY, SEARCH_REQUESTED_PROPERTY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNetworkSearchTaskFactory(String id,
String name,
Icon icon) |
protected |
AbstractNetworkSearchTaskFactory(String id,
String name,
String description,
Icon icon) |
protected |
AbstractNetworkSearchTaskFactory(String id,
String name,
String description,
Icon icon,
URL website) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
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()
This implementation simply returns null, which means that no options component will be displayed,
unless the subclass overwrites this method to return a custom component.
|
String |
getQuery() |
JComponent |
getQueryComponent()
This implementation simply returns null, which means Cytoscape will provide a default query component,
unless the subclass overwrites this method to return a custom component.
|
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.
|
int |
hashCode() |
boolean |
isReady()
A default implementation that simply checks whether or not the String returned by
getQuery() is empty. |
void |
setQuery(String query)
This method is called by Cytoscape whenever the user changes the query text.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateTaskIteratorprotected AbstractNetworkSearchTaskFactory(String id, String name, Icon icon)
protected AbstractNetworkSearchTaskFactory(String id, String name, String description, Icon icon)
public String getId()
NetworkSearchTaskFactorygetId in interface NetworkSearchTaskFactorypublic String getName()
NetworkSearchTaskFactorygetName in interface NetworkSearchTaskFactorypublic String getDescription()
NetworkSearchTaskFactorygetDescription in interface NetworkSearchTaskFactorypublic Icon getIcon()
NetworkSearchTaskFactorygetIcon in interface NetworkSearchTaskFactorypublic URL getWebsite()
NetworkSearchTaskFactorygetWebsite in interface NetworkSearchTaskFactorypublic String getQuery()
public void setQuery(String query)
query - public TaskObserver getTaskObserver()
NetworkSearchTaskFactorygetTaskObserver in interface NetworkSearchTaskFactoryTaskObserver to be passed to the TaskManager when running the search task(s)
created by this TaskFactory.public JComponent getQueryComponent()
getQueryComponent in interface NetworkSearchTaskFactorypublic JComponent getOptionsComponent()
getOptionsComponent in interface NetworkSearchTaskFactorypublic boolean isReady()
getQuery() is empty.isReady in interface TaskFactoryisReady in class AbstractTaskFactoryCopyright 2011-2015 Cytoscape Consortium. All rights reserved.