Search in sources :

Example 1 with AbstractPanelController

use of org.cytoscape.filter.internal.view.AbstractPanelController in project cytoscape-impl by cytoscape.

the class FilterIO method readTransformers.

@SuppressWarnings({ "unchecked", "rawtypes" })
public void readTransformers(File file, AbstractPanel panel) throws IOException {
    try (BufferedInputStream stream = new BufferedInputStream(new FileInputStream(file))) {
        CyTransformerReader reader = serviceRegistrar.getService(CyTransformerReader.class);
        NamedTransformer<CyNetwork, CyIdentifiable>[] transformers = (NamedTransformer<CyNetwork, CyIdentifiable>[]) reader.read(stream);
        AbstractPanelController controller = panel.getController();
        controller.addNamedTransformers(panel, transformers);
    }
}
Also used : AbstractPanelController(org.cytoscape.filter.internal.view.AbstractPanelController) NamedTransformer(org.cytoscape.filter.model.NamedTransformer) BufferedInputStream(java.io.BufferedInputStream) CyNetwork(org.cytoscape.model.CyNetwork) FileInputStream(java.io.FileInputStream) CyTransformerReader(org.cytoscape.io.read.CyTransformerReader) CyIdentifiable(org.cytoscape.model.CyIdentifiable)

Aggregations

BufferedInputStream (java.io.BufferedInputStream)1 FileInputStream (java.io.FileInputStream)1 AbstractPanelController (org.cytoscape.filter.internal.view.AbstractPanelController)1 NamedTransformer (org.cytoscape.filter.model.NamedTransformer)1 CyTransformerReader (org.cytoscape.io.read.CyTransformerReader)1 CyIdentifiable (org.cytoscape.model.CyIdentifiable)1 CyNetwork (org.cytoscape.model.CyNetwork)1