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
Announcement
Collapse
No announcement yet.
Reference Application
Collapse
This is a sticky topic.
X
X
-
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
-
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
-
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
-
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
Comment