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 void
deRegisterDataSetProperties(Class<? extends DataSet> dataSetClass, DataSetLayoutProperties props)
Deregister DataSetProperties from a DataSet of the given Type.void
deRegisterDataSetReader(IDAREDatasetReader reader)
Deregister anIDAREDatasetReader
from being available in the app.void
deregisterDataSetType(DataSet ds)
Deregister a the an availableDataSet
class based on an instance of the class.void
deRegisterPlugin(IDAREPlugin plugin)
UnRegister a plugin.Vector<org.cytoscape.application.swing.AbstractCyAction>
getActions()
Get the actions used in this appidare.imagenode.internal.ImageManagement.ActiveNodeManager
getActiveNodeManager()
Get theActiveNodeManager
created by this Appidare.imagenode.internal.DataManagement.DataSetManager
getDatasetManager()
Get theDataSetManager
created by this Appidare.imagenode.internal.GUI.DataSetController.DataSetControlPanel
getDataSetPanel()
Obtain theDataSetControlPanel
generated 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.ImageStorage
getImageStorage()
Get theImageStorage
created by this Appidare.imagenode.internal.Layout.io.LayoutIOManager
getLayoutIOManager()
Get The LayoutIOManageridare.imagenode.internal.GUI.Legend.IDARELegend
getLegend()
Get theIDARELegend
generated by this instance of IDARE.idare.imagenode.internal.DataManagement.NodeManager
getNodeManager()
Get theNodeManager
created by this AppIDARESettingsManager
getSettingsManager()
Get theIDARESettingsManager
created by this Appidare.imagenode.internal.VisualStyle.StyleManager
getStyleManager()
Obtain theStyleManager
generated by this instance of IDARE.idare.imagenode.internal.VisualStyle.IDAREVisualStyle
getVisualStyle()
Get theIDAREVisualStyle
created by this Appvoid
handleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent arg0)
void
handleSessionLoadedEvent(org.cytoscape.session.events.SessionLoadedEvent arg0)
Handle a session load event.boolean
registerDataSetProperties(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.void
registerDataSetReader(IDAREDatasetReader reader)
Register anIDAREDatasetReader
to be available in the app.void
registerDataSetType(DataSet ds)
Register a the type of a dataset provided to the set of avilableDataSet
classesvoid
registerPlugin(IDAREPlugin plugin)
Register a plugin.void
unregisterAll()
Unregister all Types ofDataSet
, that were before registered.protected void
updateServices(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
- TheCyServiceRegistrar
for the current bundleism
- TheIDARESettingsManager
used in this app
-
-
Method Detail
-
getStyleManager
public idare.imagenode.internal.VisualStyle.StyleManager getStyleManager()
Obtain theStyleManager
generated by this instance of IDARE.- Returns:
- The
StyleManager
used by this instance
-
getDataSetPanel
public idare.imagenode.internal.GUI.DataSetController.DataSetControlPanel getDataSetPanel()
Obtain theDataSetControlPanel
generated by this instance of IDARE.- Returns:
- The
DataSetControlPanel
used by this instance
-
getLegend
public idare.imagenode.internal.GUI.Legend.IDARELegend getLegend()
Get theIDARELegend
generated by this instance of IDARE.- Returns:
- The
IDARELegend
used by this instance
-
getVisualStyle
public idare.imagenode.internal.VisualStyle.IDAREVisualStyle getVisualStyle()
Get theIDAREVisualStyle
created by this App- Returns:
- The
IDAREVisualStyle
used by this instance
-
getImageStorage
public idare.imagenode.internal.ImageManagement.ImageStorage getImageStorage()
Get theImageStorage
created by this App- Returns:
- The
ImageStorage
used by this instance
-
getNodeManager
public idare.imagenode.internal.DataManagement.NodeManager getNodeManager()
Get theNodeManager
created by this App- Returns:
- The
NodeManager
used by this instance
-
getDatasetManager
public idare.imagenode.internal.DataManagement.DataSetManager getDatasetManager()
Get theDataSetManager
created by this App- Returns:
- The
DataSetManager
used by this instance
-
getActiveNodeManager
public idare.imagenode.internal.ImageManagement.ActiveNodeManager getActiveNodeManager()
Get theActiveNodeManager
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 avilableDataSet
classes- Parameters:
ds
- An instance of aDataSet
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 availableDataSet
class based on an instance of the class.- Parameters:
ds
- An instance of aDataSet
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 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 theDataSet
to deregister the properties fromprops
- The properties to deregister.
-
deRegisterDataSetReader
public void deRegisterDataSetReader(IDAREDatasetReader reader)
Deregister anIDAREDatasetReader
from being available in the app.- Parameters:
reader
- theIDAREDatasetReader
to deregister.
-
registerDataSetReader
public void registerDataSetReader(IDAREDatasetReader reader)
Register anIDAREDatasetReader
to be available in the app.- Parameters:
reader
- theIDAREDatasetReader
to 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 theIDARESettingsManager
created by this App- Returns:
- The
IDARESettingsManager
used by this instance
-
handleSessionLoadedEvent
public void handleSessionLoadedEvent(org.cytoscape.session.events.SessionLoadedEvent arg0)
Handle a session load event. This class does not implement theSessionLoadedListener
itself, as the order of loading is relevant.- Parameters:
arg0
- TheSessionLoadedEvent
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 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
-
-