Permalink
Browse files

MainPanelController has been updated

Signed-off-by: Victor Hertel <victor.hertel@web.de>
  • Loading branch information...
vhertel committed Aug 20, 2017
1 parent 5a2c308 commit 936352fef6af89d49da454baf3a19f43ad35e403
@@ -340,14 +340,15 @@ public static void mainPanelControlBuilder(String filePath, String configPath) t
if (GNSS3dView) {
writer.println(" @FXML private Pane pane;\n"
+ " @FXML private SwingNode swingNode;\n\n"
+ " public void createJavaFXContent(final SwingNode swingNode) {\n"
+ " public SwingNode buildWW() {\n"
+ " final SwingNode node = new SwingNode();\n"
+ " SwingUtilities.invokeLater(new Runnable() {\n"
+ " @Override\n"
+ " public void run() {\n"
+ " swingNode.setContent(new GNSSPanel());\n"
+ " node.setContent(new GNSSPanel());\n"
+ " }\n"
+ " });\n"
+ " return node;\n"
+ " }\n");
}
@@ -357,9 +358,7 @@ public static void mainPanelControlBuilder(String filePath, String configPath) t
+ " MainController.getInstance().addDataUpdateListener(new UpdateListener());\n"
+ " //setData();\n");
if (GNSS3dView) {
writer.println(" swingNode = new SwingNode();\n"
+ " createJavaFXContent(swingNode);\n"
+ " pane.getChildren().add(swingNode);\n");
writer.println(" pane.getChildren().add(buildWW());\n");
}
writer.println(" }\n"
+ "}");
@@ -78,15 +78,15 @@ public void updateData(MessageController msgController, USOCEvent e) {
}
@FXML private Pane pane;
@FXML private SwingNode swingNode;
public void createJavaFXContent(final SwingNode swingNode) {
public SwingNode buildWW() {
final SwingNode node = new SwingNode();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
swingNode.setContent(new GNSSPanel());
node.setContent(new GNSSPanel());
}
});
return node;
}
@Override
@@ -95,9 +95,7 @@ public void initialize(URL url, ResourceBundle rb) {
MainController.getInstance().addDataUpdateListener(new UpdateListener());
//setData();
swingNode = new SwingNode();
createJavaFXContent(swingNode);
pane.getChildren().add(swingNode);
pane.getChildren().add(buildWW());
}
}

0 comments on commit 936352f

Please sign in to comment.