Package java.awt

Examples of java.awt.Desktop.browse()


  private void browse() {
    if (Desktop.isDesktopSupported()) {
      Desktop desktop = Desktop.getDesktop();
      if (desktop.isSupported(Action.BROWSE)) {
        try {
          desktop.browse(new java.net.URI(url));
          return;
        } catch (IOException e) {
          LOG.debug("Open url error", e);
        } catch (URISyntaxException e) {
          LOG.debug("Open url error", e);
View Full Code Here


    if (Desktop.isDesktopSupported())
    {
      Desktop desktop = Desktop.getDesktop();
      try
      {
        desktop.browse(url.toURI());
      }
      catch (IOException e)
      {
        Activator
            .getPluginContext()
View Full Code Here

        this.transferResourceToTmp( "legendOptional", "png",tempDir,false );




        desktop.browse(this.transferResourceToTmp( "clashInspector", "html",tempDir,false ));
      }
      else
      {
        super.getLog().warn( "Couldn't open File with default-browser. Please open file manually under: " + System.getProperty("java.io.tmpdir")+"clashInspector.html" );
      }
View Full Code Here





        desktop.browse(this.transferResourceToTmp( "clashInspector", "html" ));
      }
      else
      {
        super.getLog().warn( "Couldn't open File with default-browser. Please open file manually under: " + System.getProperty("java.io.tmpdir")+"clashInspector.html" );
      }
View Full Code Here

      } catch (URISyntaxException e) {
        return;
      }

      try {
        desktop.browse(uri);
      } catch (IOException e) {
        return;
      }
    }
  }
View Full Code Here

                    "New version of G15Lastfm is available to download!",
                    "New Update for G15Lastfm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                  LOGGER.debug("User choose to update, opening browser.");
                  Desktop desktop = Desktop.getDesktop();
                  try {
                    desktop.browse(new URI("http://code.google.com/p/g15lastfm/"));
                  } catch (IOException e) {
                    LOGGER.debug(e);
                  } catch (URISyntaxException e) {
                    LOGGER.debug(e);
                  }
View Full Code Here

                    "New version of G15Lastfm is available to download!",
                    "New Update for G15Lastfm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                  LOGGER.debug("User choose to update, opening browser.");
                  Desktop desktop = Desktop.getDesktop();
                  try {
                    desktop.browse(new URI("http://code.google.com/p/g15lastfm/"));
                  } catch (IOException e) {
                    LOGGER.debug(e);
                  } catch (URISyntaxException e) {
                    LOGGER.debug(e);
                  }
View Full Code Here

    public void mouseClicked(java.awt.event.MouseEvent evt) {
        JLabel l = (JLabel) evt.getSource();
        try {
            Desktop desktop = java.awt.Desktop.getDesktop();
            URI uri = new java.net.URI(getPlainLink(l.getText()));
            desktop.browse(uri);
        } catch (URISyntaxException use) {
            throw new AssertionError(use);
        } catch (IOException ioe) {
            ioe.printStackTrace();
            JOptionPane.showMessageDialog(null, "Sorry, a problem occurred while trying to open this link in your system's standard browser.", "A problem occured", JOptionPane.ERROR_MESSAGE);
View Full Code Here

    private void handleHttpClick(URL url) {
      if (Desktop.isDesktopSupported()) {
        try {
          final Desktop desktop = Desktop.getDesktop();
          desktop.browse(url.toURI());
        } catch (Exception ex) {
          throw new RuntimeException("Could not open URL: " + url, ex);
        }
      }
    }
View Full Code Here

    if (!Desktop.isDesktopSupported()) return;
    try {
      Desktop desktop = Desktop.getDesktop();
      if (!desktop.isSupported(Desktop.Action.BROWSE)) return;
      closeAction();
      desktop.browse(new URI(Parameters.OFFICIAL_WEBSITE));
    } catch (Exception e) {
      // Give up
    }
  }
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.