Announcement

Collapse
No announcement yet.

Reference Application

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Hello Frenchy -- is that JavaFX code available somewhere or were you just showing off pictures of it? I'd be interested to try it out. Looks very interesting. A little hard to follow the thread here -- is the JavaFX code in the pictures related to what sobdmer's repo? https://github.com/sbodmer/JWorldWindEarth

    Comment


    • #32
      Hello,
      Sorry for late reply, some problems in the tunnels of the forum..., I'm not showing off in anyway, just adding regularily some images in my portfolio... Sobmer and I took differents pathes to extend WWJ, he chose the plugin approach, which is perhaps better, I chose the 'all in it' approach...both are Ok. Concerning javaFX, there is already the WorldWindGLJPanel which is compatible with javaFX, you just have to build a main extending javafx Application, and a "frame" containing the Panel, something like the following (I'm not saying it is the perfect way to do) :
      Code:
      public class WWJYCFX extends Application {
          protected static final String TITLE = "WWJYC FX";
      
          @Override
          public void start(final Stage stage) {
              Platform.runLater(new Runnable() {
                  @Override
                  public void run() {
      
                      try {
                          BorderPane pane = new BorderPane();
      
                          WWJYCFrameFX frame = new WWJYCFrameFX();
      
                          MenuBar menuBar = frame.getMenuBar();
                          TabPane centerPanel = frame.getTabbedPane();
      
                          pane.setTop(menuBar);
                          pane.setCenter(centerPanel);
      
                          Scene scene = new Scene(pane, 1300, 800);
      
                          stage.setTitle(TITLE);
                          stage.setScene(scene);
                          stage.setResizable(true);
      
                          stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
                              public void handle(final WindowEvent e) {
                                  Platform.exit();
                                  System.exit(0);
                              }
                          });
      
                          stage.show();
                      } catch (Exception e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
                  }
              });
          }
      
          public static void main(String[] args) {
              Application.launch(WWJYCFX.class, args);
          }
      }

      Comment

      Working...
      X