Package idare.imagenode.internal
Class IDAREImageNodeApp
- java.lang.Object
-
- idare.imagenode.internal.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 Summary
Constructors Constructor Description IDAREImageNodeApp(org.cytoscape.service.util.CyServiceRegistrar reg, IDARESettingsManager ism)Basic constructor that gets the IDareSettingsManager along with a CyServiceRegistrar to obtain all necessary services.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeRegisterDataSetProperties(Class<? extends DataSet> dataSetClass, DataSetLayoutProperties props)Deregister DataSetProperties from a DataSet of the given Type.voiddeRegisterDataSetReader(IDAREDatasetReader reader)Deregister anIDAREDatasetReaderfrom being available in the app.voidderegisterDataSetType(DataSet ds)Deregister a the an availableDataSetclass based on an instance of the class.voiddeRegisterPlugin(IDAREPlugin plugin)UnRegister a plugin.Vector<org.cytoscape.application.swing.AbstractCyAction>getActions()Get the actions used in this appidare.imagenode.internal.ImageManagement.ActiveNodeManagergetActiveNodeManager()Get theActiveNodeManagercreated by this Appidare.imagenode.internal.DataManagement.DataSetManagergetDatasetManager()Get theDataSetManagercreated by this Appidare.imagenode.internal.GUI.DataSetController.DataSetControlPanelgetDataSetPanel()Obtain theDataSetControlPanelgenerated by this instance of IDARE.HashMap<org.cytoscape.work.AbstractTaskFactory,Vector<Properties>>getFactories()Get the Task Factories used in the App.idare.imagenode.internal.ImageManagement.ImageStoragegetImageStorage()Get theImageStoragecreated by this Appidare.imagenode.internal.Layout.io.LayoutIOManagergetLayoutIOManager()Get The LayoutIOManageridare.imagenode.internal.GUI.Legend.IDARELegendgetLegend()Get theIDARELegendgenerated by this instance of IDARE.idare.imagenode.internal.DataManagement.NodeManagergetNodeManager()Get theNodeManagercreated by this AppIDARESettingsManagergetSettingsManager()Get theIDARESettingsManagercreated by this Appidare.imagenode.internal.VisualStyle.StyleManagergetStyleManager()Obtain theStyleManagergenerated by this instance of IDARE.idare.imagenode.internal.VisualStyle.IDAREVisualStylegetVisualStyle()Get theIDAREVisualStylecreated by this AppvoidhandleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent arg0)voidhandleSessionLoadedEvent(org.cytoscape.session.events.SessionLoadedEvent arg0)Handle a session load event.booleanregisterDataSetProperties(Class<? extends DataSet> dataSetClass, DataSetLayoutProperties props)Register DataSetProperties for a DataSet of the given Type.Collection<DataSetLayoutProperties>registerDataSetProperties(Class<? extends DataSet> dataSetClass, Collection<DataSetLayoutProperties> props)Register DataSetProperties for a DataSet of the given Type.voidregisterDataSetReader(IDAREDatasetReader reader)Register anIDAREDatasetReaderto be available in the app.voidregisterDataSetType(DataSet ds)Register a the type of a dataset provided to the set of avilableDataSetclassesvoidregisterPlugin(IDAREPlugin plugin)Register a plugin.voidunregisterAll()Unregister all Types ofDataSet, that were before registered.protected voidupdateServices(IDAREPlugin plugin, Vector<IDAREService> services, boolean registered, org.cytoscape.work.TaskMonitor monitor)
-
-
-
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- TheCyServiceRegistrarfor the current bundleism- TheIDARESettingsManagerused in this app
-
-
Method Detail
-
getStyleManager
public idare.imagenode.internal.VisualStyle.StyleManager getStyleManager()
Obtain theStyleManagergenerated by this instance of IDARE.- Returns:
- The
StyleManagerused by this instance
-
getDataSetPanel
public idare.imagenode.internal.GUI.DataSetController.DataSetControlPanel getDataSetPanel()
Obtain theDataSetControlPanelgenerated by this instance of IDARE.- Returns:
- The
DataSetControlPanelused by this instance
-
getLegend
public idare.imagenode.internal.GUI.Legend.IDARELegend getLegend()
Get theIDARELegendgenerated by this instance of IDARE.- Returns:
- The
IDARELegendused by this instance
-
getVisualStyle
public idare.imagenode.internal.VisualStyle.IDAREVisualStyle getVisualStyle()
Get theIDAREVisualStylecreated by this App- Returns:
- The
IDAREVisualStyleused by this instance
-
getImageStorage
public idare.imagenode.internal.ImageManagement.ImageStorage getImageStorage()
Get theImageStoragecreated by this App- Returns:
- The
ImageStorageused by this instance
-
getNodeManager
public idare.imagenode.internal.DataManagement.NodeManager getNodeManager()
Get theNodeManagercreated by this App- Returns:
- The
NodeManagerused by this instance
-
getDatasetManager
public idare.imagenode.internal.DataManagement.DataSetManager getDatasetManager()
Get theDataSetManagercreated by this App- Returns:
- The
DataSetManagerused by this instance
-
getActiveNodeManager
public idare.imagenode.internal.ImageManagement.ActiveNodeManager getActiveNodeManager()
Get theActiveNodeManagercreated by this App- Returns:
- The
ActiveNodeManagerused by this instance
-
registerDataSetType
public void registerDataSetType(DataSet ds) throws DuplicateIDException
Register a the type of a dataset provided to the set of avilableDataSetclasses- Parameters:
ds- An instance of aDataSetwhich 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 availableDataSetclass based on an instance of the class.- Parameters:
ds- An instance of aDataSetobject 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 theDataSet, for which to add the propertiesprops- 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 theDataSet, for which to add the propertiesprops- 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 theDataSetto deregister the properties fromprops- The properties to deregister.
-
deRegisterDataSetReader
public void deRegisterDataSetReader(IDAREDatasetReader reader)
Deregister anIDAREDatasetReaderfrom being available in the app.- Parameters:
reader- theIDAREDatasetReaderto deregister.
-
registerDataSetReader
public void registerDataSetReader(IDAREDatasetReader reader)
Register anIDAREDatasetReaderto be available in the app.- Parameters:
reader- theIDAREDatasetReaderto register.
-
unregisterAll
public void unregisterAll()
Unregister all Types ofDataSet, that were before registered. This will reset theNodeManager, as all Sets have been disabled and will also reset theImageStorage.
-
getSettingsManager
public IDARESettingsManager getSettingsManager()
Get theIDARESettingsManagercreated by this App- Returns:
- The
IDARESettingsManagerused by this instance
-
handleSessionLoadedEvent
public void handleSessionLoadedEvent(org.cytoscape.session.events.SessionLoadedEvent arg0)
Handle a session load event. This class does not implement theSessionLoadedListeneritself, as the order of loading is relevant.- Parameters:
arg0- TheSessionLoadedEventthat provides information on the state of the app in the loaded session.
-
handleEvent
public void handleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent arg0)
- Specified by:
handleEventin interfaceorg.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.
-
updateServices
protected void updateServices(IDAREPlugin plugin, Vector<IDAREService> services, boolean registered, org.cytoscape.work.TaskMonitor monitor) throws IllegalAccessException, InstantiationException
-
-