Examples of JFXPanel


Examples of javafx.embed.swing.JFXPanel

    setUndecorated(true);
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

    getContentPane().setLayout(new BorderLayout(0, 0));

    panel = new JFXPanel();
    panel.addKeyListener(new KeyAdapter() {
      @Override
      public void keyReleased(final KeyEvent e) {
        final boolean isPaused = PlayerFunctions.isPaused;
        final int c = e.getKeyCode();
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

    this.aurousFrame.setSize(new Dimension(800, 600));
    this.aurousFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.aurousFrame.getContentPane().setLayout(new BorderLayout());
    this.aurousFrame.setFont(new Font("Calibri", Font.PLAIN, 12));
    // we don't actually have to add the panel
    jfxPanel = new JFXPanel();

    try {
      final ControlPanel mediaControlsPanel = new ControlPanel();
      UISession.setControlPanel(mediaControlsPanel);
      this.aurousFrame.getContentPane().add(mediaControlsPanel,
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

    private ExecutorService executor;

    @BeforeClass
    public static void setUpBeforeClass() {
        new JFXPanel();
    }
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

    private ScheduledExecutorService scheduler;

    @Before
    public void setUp() throws Exception {
        scheduler = Executors.newSingleThreadScheduledExecutor();
        new JFXPanel(); // initializes JavaFX toolkit
    }
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

    private ScheduledExecutorService scheduler;

    @Before
    public void setUp() throws Exception {
        scheduler = Executors.newSingleThreadScheduledExecutor();
        new JFXPanel(); // initializes JavaFX toolkit
    }
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

    private Media nowPlaying;
    private MediaPlayer player;

    public SoundManager() {
        if (!fxInitialized) {
            JFXPanel fxPanel = new JFXPanel();//needed only to initialize the Platform
            fxInitialized = true;
        }
    }
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

            dialog.dispose();
          }
        }
      });
     
      JFXPanel fxPanel = JuFxUtils.createJFXPanel(this.pane, new PaneInitializer() {
        @Override
        public void init(Pane pane) {
          pane.getPrefHeight();
        }
      });
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

   * running.
   */
  public static void initializeFxToolkit() {
    if (!fxInitialized) {
      JuFxUtils.initializeFxClasspath();
      new JFXPanel();
    }
    fxInitialized = true;
  }
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

   * @param initializer Callback method to inizialize the pane further in the FX application thread.
   * @return JFXPanel to be used in a Swing app
   */
  public static JFXPanel createJFXPanel(final Pane pane, final PaneInitializer initializer) {
    JuFxUtils.fxInitialized = true;
    final JFXPanel fxPanel = new JFXPanel();
   
    if (pane.getPrefWidth() > 0 && pane.getPrefHeight() > 0) {
      fxPanel.setPreferredSize(new Dimension((int)pane.getPrefWidth(), (int)pane.getPrefHeight()));
    }
   
    /**
     * Seems like we need to initialize the Scene later in the
     * JavaFX thread:
     * http://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm#CHDIEEJE
     */
    Platform.runLater(JuFxUtils.getFxWrapper(new Runnable() {
      @Override
      public void run() {
        if (initializer != null) {
          initializer.init(pane);
        }
       
        Scene scene = new Scene(pane);
        fxPanel.setScene(scene);
      }
    }));
               
    return fxPanel;
  }
View Full Code Here

Examples of javafx.embed.swing.JFXPanel

  JScrollPane j;
  public WebHelp() {
    super("LABNU-TE help");
    setSize(305, 350);
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    final JFXPanel fxPanel = new JFXPanel();
    fxPanel.setSize(getBounds().getSize());
        fxPanel.setLocation(new Point(0, 0));
    j = new JScrollPane(fxPanel);
    setResizable(false);
    add(j);
    setVisible(true);
    Platform.runLater(new Runnable() {
            @Override
            public void run() {
              Group group = new Group();
                Scene scene = new Scene(group);
                fxPanel.setScene(scene);

                WebView webView = new WebView();
                webView.setMaxSize(305, 350);
                group.getChildren().add(webView);
                WebEngine webEngine = webView.getEngine();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.