Skip to content

Commit

Permalink
v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaz committed Aug 30, 2016
1 parent 1b787dc commit 411c1e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ jar {
manifest {
attributes(
"Plugin-Date": new Date().format("yyyy-MM-dd HH:mm"),
"Plugin-Version": "v0.7.0",
"Plugin-Mainversion": 10600,
"Plugin-Version": "v0.7.1",
"Plugin-Mainversion": 10786,
"10340_Plugin-Url": "v0.6.0;https://github.com/matsim-org/josm-matsim-plugin/releases/download/v0.6.0/matsim.jar",
"9278_Plugin-Url": "v0.5.9;https://github.com/matsim-org/josm-matsim-plugin/releases/download/v0.5.9/matsim.jar",
"Created-By": System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
Expand Down
18 changes: 7 additions & 11 deletions src/main/java/org/matsim/contrib/josm/gui/OTFDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.matsim.contrib.otfvis.OTFVis;
import org.matsim.core.api.experimental.events.EventsManager;
import org.matsim.core.mobsim.qsim.QSim;
import org.matsim.vis.otfvis.OTFClient;
import org.matsim.vis.otfvis.OTFClientControl;
import org.matsim.vis.otfvis.OTFVisConfigGroup;
import org.matsim.vis.otfvis.OnTheFlyServer;
Expand Down Expand Up @@ -71,24 +72,19 @@ public OTFDialog(Scenario scenario, EventsManager eventsManager, QSim qSim) {
connectionManager.connectReceiverToLayer(FacilityDrawer.DataDrawer.class, SimpleSceneLayer.class);
}

Component canvas = OTFOGLDrawer.createGLCanvas(visconf);
OTFHostControl hostControl = new OTFHostControl(server, canvas);
OTFClientControl.getInstance().setOTFVisConfig(visconf); // has to be set before OTFClientQuadTree.getConstData() is invoked!
OTFServerQuadTree serverQuadTree = server.getQuad(connectionManager);
OTFClientQuadTree clientQuadTree = serverQuadTree.convertToClient(server, connectionManager);
clientQuadTree.getConstData();

Component canvas = OTFOGLDrawer.createGLCanvas(visconf);
OTFHostControl otfHostControl = new OTFHostControl(server, canvas);
OTFOGLDrawer drawer = new OTFOGLDrawer(clientQuadTree, visconf, canvas, otfHostControl);
OTFClientControl.getInstance().setMainOTFDrawer(drawer);

OTFControlBar controlBar = new OTFControlBar(server, otfHostControl, drawer);
OTFOGLDrawer mainDrawer = new OTFOGLDrawer(clientQuadTree, visconf, canvas, hostControl);
OTFControlBar hostControlBar = new OTFControlBar(server, hostControl, mainDrawer);

OTFQueryControl queryControl = new OTFQueryControl(server, visconf);
OTFQueryControlToolBar queryControlBar = new OTFQueryControlToolBar(queryControl, visconf);
queryControl.setQueryTextField(queryControlBar.getTextField());


drawer.setQueryHandler(queryControl);
mainDrawer.setQueryHandler(queryControl);

JPanel compositePanel = new JPanel();
compositePanel.setBackground(Color.white);
Expand All @@ -99,7 +95,7 @@ public OTFDialog(Scenario scenario, EventsManager eventsManager, QSim qSim) {
compositePanel.setPreferredSize(new Dimension(screenSize.width/2,screenSize.height/2));

getContentPane().add(compositePanel, BorderLayout.CENTER);
getContentPane().add(controlBar, BorderLayout.NORTH);
getContentPane().add(hostControlBar, BorderLayout.NORTH);
getContentPane().add(queryControlBar, BorderLayout.SOUTH);
pack();
}
Expand Down

0 comments on commit 411c1e9

Please sign in to comment.