org.xnap.util.launcher
Class DefaultLauncher

java.lang.Object
  extended by org.xnap.util.launcher.DefaultLauncher
All Implemented Interfaces:
Launcher
Direct Known Subclasses:
DefaultPlayer, KDELauncher, MacOSXLauncher, WindowsLauncher

public class DefaultLauncher
extends java.lang.Object
implements Launcher

Provides a default implementation for the Launcher interface.


Constructor Summary
DefaultLauncher(java.lang.String key, java.lang.String name, java.lang.String command)
           
 
Method Summary
 java.lang.String getCommand()
          Returns the command of the launcher.
 java.lang.String getKey()
          Returns the key.
 java.lang.String getName()
          Returns the name of the launcher.
 boolean isEditable()
          Returns true.
 boolean isEnabled()
          Returns true.
 void open(java.io.File file)
          Launches file.
 void open(java.net.URL url)
          Opens the given URL.
 void setCommand(java.lang.String command)
          Sets command to command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLauncher

public DefaultLauncher(java.lang.String key,
                       java.lang.String name,
                       java.lang.String command)
Method Detail

getCommand

public java.lang.String getCommand()
Returns the command of the launcher.

Specified by:
getCommand in interface Launcher

getKey

public java.lang.String getKey()
Returns the key.

Specified by:
getKey in interface Launcher

getName

public java.lang.String getName()
Returns the name of the launcher.

Specified by:
getName in interface Launcher

isEditable

public boolean isEditable()
Returns true.

Specified by:
isEditable in interface Launcher

isEnabled

public boolean isEnabled()
Returns true.

Specified by:
isEnabled in interface Launcher

open

public void open(java.io.File file)
          throws java.io.IOException
Launches file.

Specified by:
open in interface Launcher
Throws:
java.io.IOException

setCommand

public void setCommand(java.lang.String command)
Sets command to command.

Specified by:
setCommand in interface Launcher

open

public void open(java.net.URL url)
          throws java.io.IOException
Description copied from interface: Launcher
Opens the given URL.

Specified by:
open in interface Launcher
Throws:
java.io.IOException


Copyright © 2001-2005 XNap Team. All Rights Reserved.