Package chrriis.dj.nativeswing.swtimpl.components

Examples of chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.navigate()


        super.removeNotify();
        isDisposedRef.set(true);
      }
    };
    webBrowser.setBarsVisible(false);
    webBrowser.navigate("http://www.google.com");
    webBrowser.setBounds(50, 50, 500, 400);
    contentPane.add(webBrowser);
    JLabel descriptionLabel = new JLabel("Grab and move that image over the native component: ");
    descriptionLabel.setSize(descriptionLabel.getPreferredSize());
    descriptionLabel.setLocation(5, 15);
View Full Code Here


  public static JComponent createContent() {
    JPanel contentPane = new JPanel(new BorderLayout());
    JPanel webBrowserPanel = new JPanel(new BorderLayout());
    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Web Browser component"));
    final JWebBrowser webBrowser = new JWebBrowser();
    webBrowser.navigate("http://www.google.com");
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);
    JPanel eastPanel = new JPanel(new GridBagLayout());
    GridBagConstraints cons = new GridBagConstraints();
    cons.gridx = 0;
View Full Code Here

    JInternalFrame webBrowser1InternalFrame = new JInternalFrame("Web Browser 1");
    webBrowser1InternalFrame.setBounds(10, 10, 400, 280);
    webBrowser1InternalFrame.setResizable(true);
    webBrowser1InternalFrame.setVisible(true);
    JWebBrowser webBrowser1 = new JWebBrowser(JWebBrowser.proxyComponentHierarchy());
    webBrowser1.navigate("http://djproject.sf.net");
    webBrowser1InternalFrame.add(webBrowser1, BorderLayout.CENTER);
    desktopPane.add(webBrowser1InternalFrame);
    // Flash Player internal frame
    JInternalFrame flashPlayerInternalFrame = new JInternalFrame("Flash Player");
    flashPlayerInternalFrame.setBounds(100, 100, 400, 280);
View Full Code Here

        return false;
      }
    };
    // When a frame is iconified, components are destroyed. To avoid this, we use the option to destroy on finalization.
    final JWebBrowser webBrowser2 = new JWebBrowser(JWebBrowser.proxyComponentHierarchy(), JWebBrowser.destroyOnFinalization());
    webBrowser2.navigate("http://www.google.com");
    cons.weightx = 1;
    cons.weighty = 1;
    gridBag.setConstraints(webBrowser2, cons);
    webBrowser2ContentPane.add(webBrowser2);
    JButton webBrowser2Button = new JButton("A Swing button");
View Full Code Here

          popupMenu.add(new JMenuItem("Yet another one!"));
          popupMenu.show(e.getComponent(), e.getX(), e.getY());
        }
      }
    });
    webBrowser.navigate("http://www.google.com");
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);
    // Create an area that shows the various input events the web browser can send.
    JPanel southPanel = new JPanel(new BorderLayout());
    southPanel.setBorder(BorderFactory.createTitledBorder("Key and mouse events from the web browser"));
View Full Code Here

  public static JComponent createContent() {
    JPanel contentPane = new JPanel(new BorderLayout());
    JPanel webBrowserPanel = new JPanel(new BorderLayout());
    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
    final JWebBrowser webBrowser = new JWebBrowser(JWebBrowser.useXULRunnerRuntime());
    webBrowser.navigate("http://www.eclipse.org/downloads");
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);
    // Create an additional area to see the downloads in progress.
    final JPanel downloadsPanel = new JPanel(new GridLayout(0, 1));
    downloadsPanel.setBorder(BorderFactory.createTitledBorder("Download manager (on-going downloads are automatically added to this area)"));
View Full Code Here

  public static JComponent createContent() {
    JPanel contentPane = new JPanel(new BorderLayout());
    JPanel webBrowserPanel = new JPanel(new BorderLayout());
    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
    final JWebBrowser webBrowser = new JWebBrowser(JWebBrowser.useXULRunnerRuntime());
    webBrowser.navigate("http://www.google.com");
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);
    // Create an additional bar allowing to toggle the edition mode of the web browser.
    JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 4, 4));
    JCheckBox designModeCheckBox = new JCheckBox("Edition Mode (allows to type text or resize elements directly in the page)");
View Full Code Here

    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
    final JWebBrowser webBrowser = new JWebBrowser();
    webBrowser.setBarsVisible(false);
    webBrowser.setStatusBarVisible(true);
    final String url = WebServer.getDefaultWebServer().getDynamicContentURL(Cookies.class.getName(), "index.html");
    webBrowser.navigate(url);
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);
    JPanel cookiesPanel = new JPanel(new BorderLayout());
    cookiesPanel.setBorder(BorderFactory.createTitledBorder("Get/Set Cookies"));
    JPanel getSetNorthPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 2));
View Full Code Here

    final Dimension THUMBNAIL_SIZE = new Dimension(400, 300);
    JPanel contentPane = new JPanel(new BorderLayout());
    JPanel webBrowserPanel = new JPanel(new BorderLayout());
    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
    final JWebBrowser webBrowser = new JWebBrowser();
    webBrowser.navigate("http://www.google.com");
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);
    // Create an panel with a screen capture button.
    JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 4, 4));
    JButton captureButton = new JButton("Full-page capture");
View Full Code Here

*/
public class ClasspathPages {

  public static JComponent createContent() {
    JWebBrowser webBrowser = new JWebBrowser();
    webBrowser.navigate(WebServer.getDefaultWebServer().getClassPathResourceURL(ClasspathPages.class.getName(), "resource/page1.html"));
    webBrowser.setBarsVisible(false);
    return webBrowser;
  }

  /* Standard main method to try that test as a standalone application. */
 
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.