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, wait
createTaskIterator
protected AbstractNetworkSearchTaskFactory(String id, String name, Icon icon)
protected AbstractNetworkSearchTaskFactory(String id, String name, String description, Icon icon)
public String getId()
NetworkSearchTaskFactory
getId
in interface NetworkSearchTaskFactory
public String getName()
NetworkSearchTaskFactory
getName
in interface NetworkSearchTaskFactory
public String getDescription()
NetworkSearchTaskFactory
getDescription
in interface NetworkSearchTaskFactory
public Icon getIcon()
NetworkSearchTaskFactory
getIcon
in interface NetworkSearchTaskFactory
public URL getWebsite()
NetworkSearchTaskFactory
getWebsite
in interface NetworkSearchTaskFactory
public String getQuery()
public void setQuery(String query)
query
- public TaskObserver getTaskObserver()
NetworkSearchTaskFactory
getTaskObserver
in interface NetworkSearchTaskFactory
TaskObserver
to be passed to the TaskManager
when running the search task(s)
created by this TaskFactory.public JComponent getQueryComponent()
getQueryComponent
in interface NetworkSearchTaskFactory
public JComponent getOptionsComponent()
getOptionsComponent
in interface NetworkSearchTaskFactory
public boolean isReady()
getQuery()
is empty.isReady
in interface TaskFactory
isReady
in class AbstractTaskFactory
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.