Class AbstractNetworkSearchTaskFactory

    • Constructor Detail

      • AbstractNetworkSearchTaskFactory

        protected AbstractNetworkSearchTaskFactory​(String id,
                                                   String name,
                                                   Icon icon)
      • AbstractNetworkSearchTaskFactory

        protected AbstractNetworkSearchTaskFactory​(String id,
                                                   String name,
                                                   String description,
                                                   Icon icon)
      • AbstractNetworkSearchTaskFactory

        protected AbstractNetworkSearchTaskFactory​(String id,
                                                   String name,
                                                   String description,
                                                   Icon icon,
                                                   URL website)
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: NetworkSearchTaskFactory
        Returns the unique id of this network search provider. Use namespaces to make sure it is unique (e.g. "org.myCompany.mySearch").
        Specified by:
        getId in interface NetworkSearchTaskFactory
        Returns:
        A unique id for this search provider.
      • getQuery

        public String getQuery()
      • setQuery

        public void setQuery​(String query)
        This method is called by Cytoscape whenever the user changes the query text.
        Parameters:
        query -
      • getTaskObserver

        public TaskObserver getTaskObserver()
        Description copied from interface: NetworkSearchTaskFactory
        If you want to be notified when the search task is finished, you should return a TaskObserver here. For example, you may want to display a dialog with a list of multiple network results, in case the user has to select one of them before the final network is created.
        Specified by:
        getTaskObserver in interface NetworkSearchTaskFactory
        Returns:
        Optional TaskObserver to be passed to the TaskManager when running the search task(s) created by this TaskFactory.
      • getQueryComponent

        public 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.
        Specified by:
        getQueryComponent in interface NetworkSearchTaskFactory
        Returns:
        If null, Cytoscape will create a basic search field for you.
      • getOptionsComponent

        public 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.
        Specified by:
        getOptionsComponent in interface NetworkSearchTaskFactory
        Returns:
        If null, extra search options will not be available to the end user.
      • isReady

        public boolean isReady()
        A default implementation that simply checks whether or not the String returned by getQuery() is empty.
        Specified by:
        isReady in interface TaskFactory
        Overrides:
        isReady in class AbstractTaskFactory
        Returns:
        true if the TaskFactory has all necessary preconditions needed to generate a task that will execute properly, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object