org.jdesktop.jdic.desktop.internal
Interface LaunchService


public interface LaunchService

The LaunchService interface provides opening, editing or printing the given file by launching the associated application.


Method Summary
 void edit(java.io.File file)
          Launches the associated editor to edit the given file.
 boolean isEditable(java.io.File file)
          Checks if the given file is editable.
 boolean isPrintable(java.io.File file)
          Checks if the given file is printable.
 void open(java.io.File file)
          Opens the given file by launching the associated application.
 void print(java.io.File file)
          Prints the given file.
 java.io.File resolveLinkFile(java.io.File file)
          Resolves the link file if the given file is a link file or symbol file.
 

Method Detail

open

void open(java.io.File file)
          throws LaunchFailedException
Opens the given file by launching the associated application.

Parameters:
file - the given file.
Throws:
LaunchFailedException - if the given file has no associated application, or the associated application fails to be launched.

isEditable

boolean isEditable(java.io.File file)
Checks if the given file is editable.

Parameters:
file - the given file.
Returns:
true if the given file has no associated editor; false otherwise.

edit

void edit(java.io.File file)
          throws LaunchFailedException
Launches the associated editor to edit the given file.

Parameters:
file - the given file.
Throws:
LaunchFailedException - if the given file has no associated editor, or the associated editor fails to be launched.

isPrintable

boolean isPrintable(java.io.File file)
Checks if the given file is printable.

Parameters:
file - the given file.
Returns:
true if the given file is printable; false otherwise.

print

void print(java.io.File file)
           throws LaunchFailedException
Prints the given file.

Parameters:
file - the given file.
Throws:
LaunchFailedException - if the given file is not printable, or fails to be printed.

resolveLinkFile

java.io.File resolveLinkFile(java.io.File file)
Resolves the link file if the given file is a link file or symbol file.

This method will get the target/referenced file path if the given file is a link/shortcut file; or get the absolute path if the given file is in a relative path.

Parameters:
file - the given file.
Returns:
the resolved file.


Copyright © 2005 Sun Microsystems All Rights Reserved.