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


      • #33
        So for the WWJYCFrameFX what is that frame extended to? Also for the MenuBar and TabPane are those from java fx packages javafx.scene.control, java.awt or from the NASA Worldwind pacakge?

        Comment


        • #34

          Well, a year after... Looking back at my code, I think I wanted to write "buddy classes" i-e java and javaFX ones, with the same or so components/methods in each, in order to keep the Swing version still running an not mix code. So the WWJYCFrameFX is just an holder of the created MenuBar and TabPane to be queried after... I should indeed have created a WWJYCScene...
          MenuBar and TabPane are the javafx ones of course. The TabPane is the pane that contains wwd (WorldWindGLJPanel) for Earth at the very end, on the tab 0... Other tabs are for the other planets (yep !) triggered by the MenuBar buttons... I realize you probably don't need all the stuff I wrote... I can only advise you use WorldWindGLJPanel into say a BorderPane and send it to a FX Scene and that's it.
          Btw, PM me if you want more code.
          Cheers!

          Comment


          • #35
            I private messaged you. Thanks

            Comment


            • #36
              Do you just want to disable zoom smoothing? If so, then patmurris' suggestion will work, but will also disable smoothing for all other view attributes. Charlotte Mobile Truck Repair Co.

              Comment


              • #37
                Hi folks,

                I polished a bit my "reference" app at https://github.com/sbodmer/JWorldWindEarth.
                I prepared a linux .deb package and a windows .zip file for the one interested...

                Long live WWJ.

                Comment

                Working...
                X