Examples of Desktop


Examples of java.awt.Desktop

            if (!GfrOptionPaneAbs.s_showDialogConfirm(frmOwner, "Done PDF image gallery", strBody))
               return;

            try
            {
               Desktop desktop = Desktop.getDesktop();
               desktop.open(fleOut);
            }
            catch (Exception exc)
            {
               exc.printStackTrace();
               GfrOptionPaneAbs.s_showDialogError(frmOwner, "failed to launch default PDF reader");
View Full Code Here

Examples of java.awt.Desktop

         if (blnIsDesktopSupported)
         {
            try
            {
               Desktop desktop = Desktop.getDesktop();
               desktop.open(fleOut);
            }
            catch (Exception exc)
            {
               exc.printStackTrace();
               GfrOptionPaneAbs.s_showDialogError(frmOwner, "failed to launch default PDF reader");
View Full Code Here

Examples of java.awt.Desktop

                } else if (count == 2
                    && feedListView.getItemAt(y) == index) {
                    Element itemElement = (Element)feedListView.getListData().get(index);

                    String link = XMLSerializer.getText(itemElement, "link");
                    Desktop desktop = Desktop.getDesktop();

                    try {
                        desktop.browse(new URL(link).toURI());
                    } catch(MalformedURLException exception) {
                        throw new RuntimeException(exception);
                    } catch(URISyntaxException exception) {
                        throw new RuntimeException(exception);
                    } catch(IOException exception) {
View Full Code Here

Examples of java.awt.Desktop

        });

        yahooFinanceButton.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                Desktop desktop = Desktop.getDesktop();

                try {
                    desktop.browse(new URL(YAHOO_FINANCE_HOME).toURI());
                } catch(MalformedURLException exception) {
                    throw new RuntimeException(exception);
                } catch(URISyntaxException exception) {
                    throw new RuntimeException(exception);
                } catch(IOException exception) {
View Full Code Here

Examples of java.awt.Desktop

    JMenu helpMenu = new JMenu(LocaleProps.get("HELP_MENU"));

    // If default browser support is available, add an online docs menu
    // items.
    if (Desktop.isDesktopSupported()) {
      Desktop desktop = Desktop.getDesktop();
      if (desktop.isSupported(Desktop.Action.BROWSE)) {
        // User manual.
        helpContentsItem = new JMenuItem(HELP_CONTENTS, KeyEvent.VK_H);
        helpContentsItem
            .addActionListener(createHelpContentsListener());
        helpMenu.add(helpContentsItem);
View Full Code Here

Examples of java.awt.Desktop

    javax.swing.SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        // Try to open the VStar online page in the default web
        // browser.
        if (Desktop.isDesktopSupported()) {
          Desktop desktop = Desktop.getDesktop();
          URL url = null;
          try {
            url = new URL(urlStr);
            java.net.URL helpURL = ResourceAccessor
                .getHelpHTMLResource();
            if (desktop.isSupported(Desktop.Action.BROWSE)) {
              try {
                desktop.browse(url.toURI());
              } catch (IOException e) {
                MessageBox.showErrorDialog("VStar Help",
                    "Error reading from '"
                        + helpURL.toString() + "'");
              } catch (URISyntaxException e) {
View Full Code Here

Examples of java.awt.Desktop

    private Desktop getDesktop() {
        if (Desktop.isDesktopSupported() == false)
            return null;

        Desktop d = Desktop.getDesktop();
        if (d != null && d.isSupported(Action.OPEN))
            return d;
        else
            return null;
    }
View Full Code Here

Examples of java.awt.Desktop

        // Add a button press listener to open the Yahoo! Finance web page when
        // the link is clicked
        yahooFinanceButton.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                Desktop desktop = Desktop.getDesktop();

                try {
                    desktop.browse(new URL(YAHOO_FINANCE_HOME).toURI());
                } catch(MalformedURLException exception) {
                    throw new RuntimeException(exception);
                } catch(URISyntaxException exception) {
                    throw new RuntimeException(exception);
                } catch(IOException exception) {
View Full Code Here

Examples of java.awt.Desktop

        public void actionPerformed(ActionEvent e) {
            if (e.getSource() instanceof LinkModel) {
                final LinkModel link = (LinkModel) e.getSource();
                try {
                    Desktop desktop = Desktop.getDesktop();
                    desktop.browse(link.getURL().toURI());
                    link.setVisited(true);
                } catch (Exception e1) {
                    // TODO: error handling
                }
            }
View Full Code Here

Examples of java.awt.Desktop

//            System.out.println();
        } catch (Exception e) {}
    }
   
    public static void openDocument(File document) throws IOException {
        Desktop dt = Desktop.getDesktop();
        dt.open(document);
    }
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.