Search in sources :

Example 1 with GCModelLoader

use of com.tagtraum.perf.gcviewer.ctrl.GCModelLoader in project GCViewer by chewiebug.

the class GCDocumentController method propertyChange.

@Override
public void propertyChange(PropertyChangeEvent evt) {
    if ("state".equals(evt.getPropertyName()) && SwingWorker.StateValue.DONE == evt.getNewValue()) {
        // for every model that has finished loading, the document must be laid out again
        gcDocument.relayout();
        GCModelLoader modelLoader = (GCModelLoader) evt.getSource();
        modelLoader.removePropertyChangeListener(this);
        removeTextAreaLogHandler(modelLoader);
    }
}
Also used : GCModelLoader(com.tagtraum.perf.gcviewer.ctrl.GCModelLoader)

Example 2 with GCModelLoader

use of com.tagtraum.perf.gcviewer.ctrl.GCModelLoader in project GCViewer by chewiebug.

the class GCModelLoaderControllerImpl method reload.

@Override
public GCModelLoaderGroupTracker reload(GCDocument gcDocument) {
    GCModelLoaderGroupTracker tracker = new GCModelLoaderGroupTrackerImpl();
    for (GCResource gcResource : gcDocument.getGCResources()) {
        if (gcResource.hasUnderlyingResourceChanged()) {
            gcResource.reset();
            gcResource.setIsReload(true);
            GCModelLoader loader = GCModelLoaderFactory.createFor(gcResource);
            GCDocumentController docController = getDocumentController(gcDocument);
            docController.reloadGCResource(loader);
            tracker.addGcModelLoader(loader);
        }
    }
    tracker.execute();
    return tracker;
}
Also used : GCModelLoader(com.tagtraum.perf.gcviewer.ctrl.GCModelLoader) GCResource(com.tagtraum.perf.gcviewer.model.GCResource) GCModelLoaderGroupTracker(com.tagtraum.perf.gcviewer.ctrl.GCModelLoaderGroupTracker)

Example 3 with GCModelLoader

use of com.tagtraum.perf.gcviewer.ctrl.GCModelLoader in project GCViewer by chewiebug.

the class GCModelLoaderControllerImpl method openGCResource.

private void openGCResource(GCResource gcResource) {
    GCModelLoader loader = GCModelLoaderFactory.createFor(gcResource);
    openGCResource(gcResource, loader);
}
Also used : GCModelLoader(com.tagtraum.perf.gcviewer.ctrl.GCModelLoader)

Example 4 with GCModelLoader

use of com.tagtraum.perf.gcviewer.ctrl.GCModelLoader in project GCViewer by chewiebug.

the class GCModelLoaderControllerImpl method openAsSeries.

@Override
public void openAsSeries(List<GCResource> gcResourceList) {
    GcResourceSeries resourceSeries = new GcResourceSeries(gcResourceList);
    GCModelLoader loader = GCModelLoaderFactory.createFor(resourceSeries);
    openGCResource(loader.getGcResource(), loader);
    getRecentGCResourcesModel().add(Collections.singletonList(resourceSeries));
}
Also used : GCModelLoader(com.tagtraum.perf.gcviewer.ctrl.GCModelLoader) GcResourceSeries(com.tagtraum.perf.gcviewer.model.GcResourceSeries)

Example 5 with GCModelLoader

use of com.tagtraum.perf.gcviewer.ctrl.GCModelLoader in project GCViewer by chewiebug.

the class GCModelLoaderControllerImpl method addGCResource.

private void addGCResource(GCResource gcResource) {
    GCModelLoader loader = GCModelLoaderFactory.createFor(gcResource);
    GCDocumentController docController = getDocumentController(gcViewerGui.getSelectedGCDocument());
    docController.addGCResource(loader, getViewMenuController());
    loader.execute();
}
Also used : GCModelLoader(com.tagtraum.perf.gcviewer.ctrl.GCModelLoader)

Aggregations

GCModelLoader (com.tagtraum.perf.gcviewer.ctrl.GCModelLoader)6 GCResource (com.tagtraum.perf.gcviewer.model.GCResource)2 GcResourceSeries (com.tagtraum.perf.gcviewer.model.GcResourceSeries)2 GCModelLoaderGroupTracker (com.tagtraum.perf.gcviewer.ctrl.GCModelLoaderGroupTracker)1 GcResourceFile (com.tagtraum.perf.gcviewer.model.GcResourceFile)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1