![]() Instruments or displays ihnerit from Widget, you can move they on the StackPane and use transparency. SetTranslateY((int) (initY + me.getSceneY() - dragAnchor.getY())) Set the cycle method to with three enums: NOCYCLE, REFLECT, or REPEAT. Set the proportional property to specify whether to use standard screen coordinates or unit square coordinates. Set the starting point to begin the first stop color. SetTranslateX((int) (initX + me.getSceneX() - dragAnchor.getX())) To create a gradient color in JavaFX we need to set five properties. In the center of root we place a SwingNode, in the SwingNode a JPanel and WorldWindowGLJPanel (wwd) in this JPanel.ĭragAnchor = new Point2D(me.getSceneX(), me.getSceneY()) In the Scene we place a StackPane : root for example. All the GUI is create with SceneBuider, the design is the designer's job not developperįirst we have a Stage, this Stage have a Scene. Public void registerPanel( String title, WorldWindow wwd )Īll components of GUI are JavaFX, menus, dock, widgets, the background is a StackPane, in center we place a SwingNode and the WorldWindowGLJPanel of WWJ. It may be usefull to add a window from outside ("Translucency is not supported") įrame.addWindowListener(new WindowAdapter() GraphicsDevice gd = ge.getDefaultScreenDevice() īoolean transp_capable = gd.isWindowTranslucencySupported(TRANSLUCENT) įtDefaultLookAndFeelDecorated(true) GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment() The frame (containing the panel) is already raised, so don't raise another one. If ( f_title.equals( title ) & wwd.equals( ww ) ) ![]() String f_title = (String) e.nextElement() Public void raisePanel( WorldWindow wwd, JPanel panel, final String title, boolean resizable, Point p )įor ( Enumeration e = raised_.keys() e.hasMoreElements() ) Private static PanelRaiser instance_ = null Of course, i would like to avoid to reprogram my Swings into AWTs. I ran the demos locally, they don't make it.Īny idea, workaround, or at least knowledge of why it's not supported ? OpenGL, Nvidia, whatever ? It looks like it is "officially" possible to do it :īut "of course", not on my Linux. ![]() I tried an "invokeLater()" on the whole "raisPanel()" method, with no luck.ĭo you see a problem in this method that would not allow the decoration on first try ?Ģ/ I tried to set the background TRANSPARENT on the newly created JFrame. It looks like this L&F needs time to be loaded ?. The first (GIS) has still the "regular-old" swing look. The Gazetteer window is the second one opened. So, in fact i have two precise problems :ġ/ tDefaultLookAndFeelDecorated(tr ue) This one does not work THE FIRST TIME it is called !!? > And you can see I have a problem : these windows all look different ! :( There is also the pretty transparent layer panel. They are all launched the same way (see code below).īasically, I keep a reference on each panel, to avoid to launch it twice and to keep non-modal windows. That's basic Swing stuff I grabbed from place to place in the forum, or in previous WWJ versions, or that i wrote myself. These panels are JFrames, with a JPanel in it. Probably not a WWJ problem, but maybe one of you has came into this, so let me ask.Īs you can see (attached), I have a toolbar of icons where i launch panels to interact with WWJ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |