Class IDAREImageNodeApp

  • All Implemented Interfaces:
    org.cytoscape.event.CyListener, org.cytoscape.session.events.SessionAboutToBeSavedListener

    public class IDAREImageNodeApp
    extends Object
    implements org.cytoscape.session.events.SessionAboutToBeSavedListener
    The core class of the app, generates necessary objects for the class and provides them to external requests.
    Author:
    Thomas Pfau
    • Constructor Detail

      • IDAREImageNodeApp

        public IDAREImageNodeApp​(org.cytoscape.service.util.CyServiceRegistrar reg,
                                 IDARESettingsManager ism)
        Basic constructor that gets the IDareSettingsManager along with a CyServiceRegistrar to obtain all necessary services.
        Parameters:
        reg - The CyServiceRegistrar for the current bundle
        ism - The IDARESettingsManager used in this app
    • Method Detail

      • getStyleManager

        public idare.imagenode.internal.VisualStyle.StyleManager getStyleManager()
        Obtain the StyleManager generated by this instance of IDARE.
        Returns:
        The StyleManager used by this instance
      • getDataSetPanel

        public idare.imagenode.internal.GUI.DataSetController.DataSetControlPanel getDataSetPanel()
        Obtain the DataSetControlPanel generated by this instance of IDARE.
        Returns:
        The DataSetControlPanel used by this instance
      • getLegend

        public idare.imagenode.internal.GUI.Legend.IDARELegend getLegend()
        Get the IDARELegend generated by this instance of IDARE.
        Returns:
        The IDARELegend used by this instance
      • getVisualStyle

        public idare.imagenode.internal.VisualStyle.IDAREVisualStyle getVisualStyle()
        Get the IDAREVisualStyle created by this App
        Returns:
        The IDAREVisualStyle used by this instance
      • getImageStorage

        public idare.imagenode.internal.ImageManagement.ImageStorage getImageStorage()
        Get the ImageStorage created by this App
        Returns:
        The ImageStorage used by this instance
      • getNodeManager

        public idare.imagenode.internal.DataManagement.NodeManager getNodeManager()
        Get the NodeManager created by this App
        Returns:
        The NodeManager used by this instance
      • getDatasetManager

        public idare.imagenode.internal.DataManagement.DataSetManager getDatasetManager()
        Get the DataSetManager created by this App
        Returns:
        The DataSetManager used by this instance
      • getActiveNodeManager

        public idare.imagenode.internal.ImageManagement.ActiveNodeManager getActiveNodeManager()
        Get the ActiveNodeManager created by this App
        Returns:
        The ActiveNodeManager used by this instance
      • registerDataSetType

        public void registerDataSetType​(DataSet ds)
                                 throws DuplicateIDException
        Register a the type of a dataset provided to the set of avilable DataSet classes
        Parameters:
        ds - An instance of a DataSet which is of the class to register.
        Throws:
        DuplicateIDException - if there are two datasets with the same type name
      • deregisterDataSetType

        public void deregisterDataSetType​(DataSet ds)
        Deregister a the an available DataSet class based on an instance of the class.
        Parameters:
        ds - An instance of a DataSet object that belongs t the class that is supposed to be registered
      • registerDataSetProperties

        public boolean registerDataSetProperties​(Class<? extends DataSet> dataSetClass,
                                                 DataSetLayoutProperties props)
        Register DataSetProperties for a DataSet of the given Type.
        Parameters:
        dataSetClass - the classname of the DataSet, for which to add the properties
        props - The DataSetproperties to make available.
        Returns:
        whether the dataset type could be added
      • registerDataSetProperties

        public Collection<DataSetLayoutProperties> registerDataSetProperties​(Class<? extends DataSet> dataSetClass,
                                                                             Collection<DataSetLayoutProperties> props)
        Register DataSetProperties for a DataSet of the given Type.
        Parameters:
        dataSetClass - the classname of the DataSet, for which to add the properties
        props - The collection of DataSetproperties to make available to this type of dataset.
        Returns:
        A set of Properties that could not be registered
      • deRegisterDataSetProperties

        public void deRegisterDataSetProperties​(Class<? extends DataSet> dataSetClass,
                                                DataSetLayoutProperties props)
        Deregister DataSetProperties from a DataSet of the given Type.
        Parameters:
        dataSetClass - the classname of the DataSet to deregister the properties from
        props - The properties to deregister.
      • unregisterAll

        public void unregisterAll()
        Unregister all Types of DataSet, that were before registered. This will reset the NodeManager, as all Sets have been disabled and will also reset the ImageStorage.
      • handleSessionLoadedEvent

        public void handleSessionLoadedEvent​(org.cytoscape.session.events.SessionLoadedEvent arg0)
        Handle a session load event. This class does not implement the SessionLoadedListener itself, as the order of loading is relevant.
        Parameters:
        arg0 - The SessionLoadedEvent that provides information on the state of the app in the loaded session.
      • handleEvent

        public void handleEvent​(org.cytoscape.session.events.SessionAboutToBeSavedEvent arg0)
        Specified by:
        handleEvent in interface org.cytoscape.session.events.SessionAboutToBeSavedListener
      • getFactories

        public HashMap<org.cytoscape.work.AbstractTaskFactory,​Vector<Properties>> getFactories()
        Get the Task Factories used in the App.
        Returns:
        the TaskFactories produced by the IDARE App matched to all properties for which they should eb registered
      • getLayoutIOManager

        public idare.imagenode.internal.Layout.io.LayoutIOManager getLayoutIOManager()
        Get The LayoutIOManager
        Returns:
        The Layoutmanager of this app
      • getActions

        public Vector<org.cytoscape.application.swing.AbstractCyAction> getActions()
        Get the actions used in this app
        Returns:
        The Vector of AbstractCyActions generated by this App.
      • registerPlugin

        public void registerPlugin​(IDAREPlugin plugin)
        Register a plugin.
        Parameters:
        plugin - the plugin to register
      • deRegisterPlugin

        public void deRegisterPlugin​(IDAREPlugin plugin)
        UnRegister a plugin.
        Parameters:
        plugin - the plugin to unregister.