info.aduna.platform.desktop.support
Class WindowsDesktop

java.lang.Object
  extended by info.aduna.platform.desktop.DesktopBase
      extended by info.aduna.platform.desktop.support.WindowsDesktop
All Implemented Interfaces:
Desktop

public class WindowsDesktop
extends DesktopBase

Platform implementation for all Windows' platforms.


Field Summary
static String[] EXECUTABLE_EXTENSIONS
          The extensions of executable files
 
Constructor Summary
WindowsDesktop(Platform platform)
           
 
Method Summary
 String getCommandShell()
          Returns appropriate command shell for the current windows shell.
 boolean isExecutable(String resource)
          Determines whether the specified resource is an executable.
 int openResource(String resource)
          Opens the specified resource in the appropriate external application.
 boolean warnsWhenOpeningExecutable()
          Returns true when the platform is not a Windows 9x platform.
 
Methods inherited from class info.aduna.platform.desktop.DesktopBase
getPlatform, isExecutable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXECUTABLE_EXTENSIONS

public static final String[] EXECUTABLE_EXTENSIONS
The extensions of executable files

Constructor Detail

WindowsDesktop

public WindowsDesktop(Platform platform)
Method Detail

openResource

public int openResource(String resource)
                 throws IOException
Description copied from interface: Desktop
Opens the specified resource in the appropriate external application. The resource may have the form of a URL, but this is not required. This method blocks until the external process that actually opens the resource completes, and then returns its exit code.

Returns:
exit code of the external process
Throws:
IOException - when an I/O error occurs.

isExecutable

public boolean isExecutable(String resource)
Description copied from interface: Desktop
Determines whether the specified resource is an executable. It supports the same parameter format as the openResource method.


warnsWhenOpeningExecutable

public boolean warnsWhenOpeningExecutable()
Returns true when the platform is not a Windows 9x platform.

Specified by:
warnsWhenOpeningExecutable in interface Desktop
Overrides:
warnsWhenOpeningExecutable in class DesktopBase
See Also:
Desktop.openResource(java.lang.String)

getCommandShell

public String getCommandShell()
Returns appropriate command shell for the current windows shell.



Copyright © 1997-2008 Aduna. All Rights Reserved.