Revision: 5841 http://sourceforge.net/p/jump-pilot/code/5841 Author: michaudm Date: 2018-06-05 22:20:50 +0000 (Tue, 05 Jun 2018) Log Message: ----------- EnsureAllLayersHaveSRIDStyle was style created for each internal frame
Modified Paths: -------------- core/trunk/src/org/openjump/core/ccordsys/srid/EnsureAllLayersHaveSRIDStylePlugIn.java Modified: core/trunk/src/org/openjump/core/ccordsys/srid/EnsureAllLayersHaveSRIDStylePlugIn.java =================================================================== --- core/trunk/src/org/openjump/core/ccordsys/srid/EnsureAllLayersHaveSRIDStylePlugIn.java 2018-06-05 19:42:43 UTC (rev 5840) +++ core/trunk/src/org/openjump/core/ccordsys/srid/EnsureAllLayersHaveSRIDStylePlugIn.java 2018-06-05 22:20:50 UTC (rev 5841) @@ -13,6 +13,8 @@ import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn; import com.vividsolutions.jump.workbench.plugin.PlugInContext; import com.vividsolutions.jump.workbench.ui.WorkbenchFrame; +import org.openjump.core.model.TaskEvent; +import org.openjump.core.model.TaskListener; /** * Adds the SRIDStyle to every layer that JUMP encounters. @@ -91,16 +93,27 @@ private void initializeCurrentAndFutureInternalFrames( WorkbenchFrame workbenchFrame, final Block block) { - workbenchFrame.getDesktopPane().addContainerListener( - new ContainerAdapter() { - public void componentAdded(ContainerEvent e) { - if (!(e.getChild() instanceof JInternalFrame)) { - return; - } - block.yield(e.getChild()); - } - }); + workbenchFrame.addTaskListener(new TaskListener() { + @Override + public void taskAdded(TaskEvent taskEvent) { + initialize(taskEvent.getTask().getLayerManager()); + } + @Override + public void taskLoaded(TaskEvent taskEvent) { + + } + }); + //workbenchFrame.getDesktopPane().addContainerListener( + // new ContainerAdapter() { + // public void componentAdded(ContainerEvent e) { + // if (!(e.getChild() instanceof JInternalFrame)) { + // return; + // } + // block.yield(e.getChild()); + // } + // }); +// for (JInternalFrame internalFrame : workbenchFrame.getInternalFrames()) { block.yield(internalFrame); } ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel