Search in sources :

Example 1 with Scaler

use of org.gephi.io.processor.spi.Scaler in project gephi by gephi.

the class ImportControllerImpl method process.

@Override
public void process(Container container, Processor processor, Workspace workspace) {
    container.closeLoader();
    if (container.getUnloader().isAutoScale()) {
        Scaler scaler = Lookup.getDefault().lookup(Scaler.class);
        if (scaler != null) {
            scaler.doScale(container);
        }
    }
    processor.setContainers(new ContainerUnloader[] { container.getUnloader() });
    processor.setWorkspace(workspace);
    processor.process();
}
Also used : Scaler(org.gephi.io.processor.spi.Scaler)

Example 2 with Scaler

use of org.gephi.io.processor.spi.Scaler in project gephi by gephi.

the class ImportControllerImpl method process.

@Override
public void process(Container[] containers, Processor processor, Workspace workspace) {
    ContainerUnloader[] unloaders = new ContainerUnloader[containers.length];
    int i = 0;
    for (Container container : containers) {
        container.closeLoader();
        if (container.getUnloader().isAutoScale()) {
            Scaler scaler = Lookup.getDefault().lookup(Scaler.class);
            if (scaler != null) {
                scaler.doScale(container);
            }
        }
        unloaders[i++] = container.getUnloader();
    }
    processor.setContainers(unloaders);
    processor.setWorkspace(workspace);
    processor.process();
}
Also used : ContainerUnloader(org.gephi.io.importer.api.ContainerUnloader) Container(org.gephi.io.importer.api.Container) Scaler(org.gephi.io.processor.spi.Scaler)

Aggregations

Scaler (org.gephi.io.processor.spi.Scaler)2 Container (org.gephi.io.importer.api.Container)1 ContainerUnloader (org.gephi.io.importer.api.ContainerUnloader)1