Search in sources :

Example 1 with ExportListener

use of cbit.rmi.event.ExportListener in project vcell by virtualcell.

the class TopLevelWindowManager method fireExportMessage.

/**
 * Method to support listener events.
 */
protected void fireExportMessage(ExportEvent event) {
    if (aExportListener == null) {
        return;
    }
    ;
    int currentSize = aExportListener.size();
    ExportListener tempListener = null;
    for (int index = 0; index < currentSize; index++) {
        tempListener = aExportListener.elementAt(index);
        if (tempListener != null) {
            tempListener.exportMessage(event);
        }
        ;
    }
    ;
}
Also used : ExportListener(cbit.rmi.event.ExportListener)

Example 2 with ExportListener

use of cbit.rmi.event.ExportListener in project vcell by virtualcell.

the class VirtualFrapWindowManager method startExport.

public void startExport(Component requester, OutputContext outContext, ExportSpecs exportSpecs) {
    try {
        ExportServiceImpl exportServiceImpl = new ExportServiceImpl();
        DataServerImpl dataServerImpl = new DataServerImpl(localWorkSpace.getDataSetControllerImpl(), exportServiceImpl);
        exportServiceImpl.addExportListener(new ExportListener() {

            public void exportMessage(ExportEvent event) {
                System.out.println(event.toString());
            }
        });
        exportServiceImpl.makeRemoteFile(null, LocalWorkspace.getDefaultOwner(), dataServerImpl, exportSpecs);
    } catch (DataAccessException e) {
        e.printStackTrace(System.out);
    } catch (FileNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
Also used : DataServerImpl(cbit.vcell.simdata.DataServerImpl) ExportEvent(cbit.rmi.event.ExportEvent) FileNotFoundException(java.io.FileNotFoundException) ExportListener(cbit.rmi.event.ExportListener) ExportServiceImpl(cbit.vcell.export.server.ExportServiceImpl) DataAccessException(org.vcell.util.DataAccessException)

Example 3 with ExportListener

use of cbit.rmi.event.ExportListener in project vcell by virtualcell.

the class VirtualFrapWindowManager method fireExportMessage.

/**
 * Method to support listener events.
 */
protected void fireExportMessage(ExportEvent event) {
    if (aExportListener == null) {
        return;
    }
    ;
    int currentSize = aExportListener.size();
    ExportListener tempListener = null;
    for (int index = 0; index < currentSize; index++) {
        tempListener = (ExportListener) aExportListener.elementAt(index);
        if (tempListener != null) {
            tempListener.exportMessage(event);
        }
        ;
    }
    ;
}
Also used : ExportListener(cbit.rmi.event.ExportListener)

Example 4 with ExportListener

use of cbit.rmi.event.ExportListener in project vcell by virtualcell.

the class VirtualFrapWindowManager method startExportMovie.

public ExportEvent startExportMovie(ExportSpecs exportSpecs, OutputContext outputContext, ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    ExportEvent exportEvt = null;
    ExportServiceImpl exportServiceImpl = new ExportServiceImpl();
    DataServerImpl dataServerImpl = new DataServerImpl(localWorkSpace.getDataSetControllerImpl(), exportServiceImpl);
    exportServiceImpl.addExportListener(new ExportListener() {

        public void exportMessage(ExportEvent event) {
            System.out.println(event.toString());
        }
    });
    // the last parameter denotes whether the saved file is comporessed or not.
    exportEvt = exportServiceImpl.makeRemoteFile(outputContext, LocalWorkspace.getDefaultOwner(), dataServerImpl, exportSpecs, false, clientTaskStatusSupport);
    return exportEvt;
}
Also used : DataServerImpl(cbit.vcell.simdata.DataServerImpl) ExportEvent(cbit.rmi.event.ExportEvent) ExportListener(cbit.rmi.event.ExportListener) ExportServiceImpl(cbit.vcell.export.server.ExportServiceImpl)

Aggregations

ExportListener (cbit.rmi.event.ExportListener)4 ExportEvent (cbit.rmi.event.ExportEvent)2 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)2 DataServerImpl (cbit.vcell.simdata.DataServerImpl)2 FileNotFoundException (java.io.FileNotFoundException)1 DataAccessException (org.vcell.util.DataAccessException)1