< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java

Print this page




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import java.awt.Desktop.Action;
  29 import java.awt.peer.DesktopPeer;
  30 import java.io.File;
  31 import java.io.IOException;
  32 import java.net.URI;
  33 
  34 
  35 /**
  36  * Concrete implementation of the interface <code>DesktopPeer</code> for MacOS X
  37  *
  38  * @see DesktopPeer
  39  */
  40 public class CDesktopPeer implements DesktopPeer {
  41 
  42     public boolean isSupported(Action action) {
  43         // OPEN, EDIT, PRINT, MAIL, BROWSE all supported.
  44         // Though we don't really differentiate between OPEN / EDIT
  45         return true;
  46     }
  47 
  48     public void open(File file) throws IOException {
  49         this.lsOpenFile(file, false);
  50     }
  51 
  52     public void edit(File file) throws IOException {
  53         this.lsOpenFile(file, false);
  54     }
  55 
  56     public void print(File file) throws IOException {




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import java.awt.Desktop.Action;
  29 import java.awt.peer.DesktopPeer;
  30 import java.io.File;
  31 import java.io.IOException;
  32 import java.net.URI;
  33 
  34 
  35 /**
  36  * Concrete implementation of the interface {@code DesktopPeer} for MacOS X
  37  *
  38  * @see DesktopPeer
  39  */
  40 public class CDesktopPeer implements DesktopPeer {
  41 
  42     public boolean isSupported(Action action) {
  43         // OPEN, EDIT, PRINT, MAIL, BROWSE all supported.
  44         // Though we don't really differentiate between OPEN / EDIT
  45         return true;
  46     }
  47 
  48     public void open(File file) throws IOException {
  49         this.lsOpenFile(file, false);
  50     }
  51 
  52     public void edit(File file) throws IOException {
  53         this.lsOpenFile(file, false);
  54     }
  55 
  56     public void print(File file) throws IOException {


< prev index next >