Package org.terrier.applications.desktop.filehandling

Examples of org.terrier.applications.desktop.filehandling.WindowsFileOpener


        public void hyperlinkUpdate(HyperlinkEvent e) {
          if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
            try {
              String osname = System.getProperty("os.name").toLowerCase();
              if (osname.startsWith("windows")) {
                FileOpener winFileOpener = new WindowsFileOpener();
                winFileOpener.open(e.getURL().toString());
              } else if (osname.startsWith("mac")) {
                FileOpener winFileOpener = new MacOSXFileOpener();
                winFileOpener.open(e.getURL().toString());
              } else if (osname.startsWith("linux")) {
                Runtime.getRuntime().exec(new String[] {"/usr/bin/mozilla",
                                      e.getURL().toString()});
              }
            } catch(Exception exc) {
View Full Code Here


        public void hyperlinkUpdate(HyperlinkEvent e) {
          if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
            try {
              String osname = System.getProperty("os.name").toLowerCase();
              if (osname.startsWith("windows")) {
                FileOpener winFileOpener = new WindowsFileOpener();
                winFileOpener.open(e.getURL().toString());
              } else if (osname.startsWith("mac")) {
                FileOpener winFileOpener = new MacOSXFileOpener();
                winFileOpener.open(e.getURL().toString());
              } else if (osname.startsWith("linux")) {
                Runtime.getRuntime().exec(new String[] {"/usr/bin/mozilla",
                                      e.getURL().toString()});
              }
            } catch(Exception exc) {
View Full Code Here

TOP

Related Classes of org.terrier.applications.desktop.filehandling.WindowsFileOpener

Copyright © 2018 www.massapicom. 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.