| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DesktopPeer
The DesktopPeer
interface provides methods for the operation
of open, edit, print, browse and mail with the given URL or file, by
launching the associated application.
Each platform has an implementation class for this interface.
Method Summary | |
---|---|
void |
Launches the user default browser to display the given URI. |
void |
Launches the associated editor and opens the given file for editing. |
boolean |
isSupported(Desktop.Action action) Returns whether the given action is supported on the current platform. |
void |
Launches the mail composing window of the user default mail client, filling the message fields including to, cc, etc, with the values specified by the given mailto URL. |
void |
Launches the associated application to open the given file. |
void |
Prints the given file with the native desktop printing facility, using the associated application's print command. |
Method Detail |
---|
public void browse(URI url) throws IOException
url
IOException
- If the user default browser is not found,
or it fails to be launched.public void edit(File file) throws IOException
file
- the given file.IOException
- If the given file has no associated editor, or
the associated application fails to be launched.public boolean isSupported(Desktop.Action action)
action
- the action type to be tested if it's supported on the
current platform.true
if the given action is supported on
the current platform; false
otherwise.public void mail(URI mailtoURL) throws IOException
mailtoURL
IOException
- If the user default mail client is not found,
or it fails to be launched.public void open(File file) throws IOException
file
- the given file.IOException
- If the given file has no associated application,
or the associated application fails to be launched.public void print(File file) throws IOException
file
- the given file.IOException
- If the given file has no associated application
that can be used to print it.
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |