com.tuneology.avm.mrj
Class MRJPlugin

java.lang.Object
  |
  +--com.tuneology.avm.mrj.MRJPlugin
All Implemented Interfaces:
CorePlugin, com.apple.mrj.MRJAboutHandler, com.apple.mrj.MRJOpenApplicationHandler, com.apple.mrj.MRJOpenDocumentHandler, com.apple.mrj.MRJPrefsHandler, com.apple.mrj.MRJPrintDocumentHandler, com.apple.mrj.MRJQuitHandler

public class MRJPlugin
extends java.lang.Object
implements CorePlugin, com.apple.mrj.MRJAboutHandler, com.apple.mrj.MRJOpenApplicationHandler, com.apple.mrj.MRJOpenDocumentHandler, com.apple.mrj.MRJPrefsHandler, com.apple.mrj.MRJPrintDocumentHandler, com.apple.mrj.MRJQuitHandler

This class exists as a glue layer for MRJ. MRJ is obsolete as of Java 1.4, but we are forced to use Java 1.3.1, and therefore MRJ, because Apple has not updated Quicktime for Java to work with Java 1.4.

Version:
$Id: MRJPlugin.java,v 1.5 2003/06/10 08:39:10 xnarf Exp $
Author:
Fran Taylor

Constructor Summary
MRJPlugin()
          The constructor registers this class as a listener for all the MRJ events.
 
Method Summary
 int getFileCreator(java.io.File f)
           
 int getFileType(java.io.File f)
           
 java.io.File getPrefsDirectory()
           
 java.io.File getTempDirectory()
           
 java.io.File getTrashDirectory()
           
 void handleAbout()
          Callback from MRJ.
 void handleOpenApplication()
          Callback from MRJ.
 void handleOpenFile(java.io.File f)
           
 void handlePrefs()
          Callback from MRJ.
 void handlePrintFile(java.io.File f)
          Callback from MRJ.
 void handleQuit()
          Callback from MRJ.
static java.lang.String intToString(int i)
           
 void openBrowserWindow(java.lang.String url)
          Call this to open an url in a new browser window.
 void openURL(java.lang.String url)
           
 void registerApplListener(ApplListener listener)
          The application calls this to register a listener.
 void removeApplListener(ApplListener listener)
          The application calls this to un-register a listener.
 void setFileTypeAndCreator(java.io.File f, int typ, int creator)
           
static int stringToInt(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MRJPlugin

public MRJPlugin()
The constructor registers this class as a listener for all the MRJ events.
Method Detail

getPrefsDirectory

public java.io.File getPrefsDirectory()
                               throws java.io.FileNotFoundException
Specified by:
getPrefsDirectory in interface CorePlugin

getTempDirectory

public java.io.File getTempDirectory()
                              throws java.io.FileNotFoundException
Specified by:
getTempDirectory in interface CorePlugin

getTrashDirectory

public java.io.File getTrashDirectory()
                               throws java.io.FileNotFoundException
Specified by:
getTrashDirectory in interface CorePlugin

openBrowserWindow

public void openBrowserWindow(java.lang.String url)
                       throws java.io.IOException
Call this to open an url in a new browser window.
Specified by:
openBrowserWindow in interface CorePlugin
Throws:
java.io.IOException -  

handleAbout

public void handleAbout()
Callback from MRJ. Notify the application.
Specified by:
handleAbout in interface com.apple.mrj.MRJAboutHandler

handleOpenApplication

public void handleOpenApplication()
Callback from MRJ. Notify the application.
Specified by:
handleOpenApplication in interface com.apple.mrj.MRJOpenApplicationHandler

handlePrefs

public void handlePrefs()
Callback from MRJ. Notify the application.
Specified by:
handlePrefs in interface com.apple.mrj.MRJPrefsHandler

handlePrintFile

public void handlePrintFile(java.io.File f)
Callback from MRJ. Notify the application.
Specified by:
handlePrintFile in interface com.apple.mrj.MRJPrintDocumentHandler

handleQuit

public void handleQuit()
                throws java.lang.IllegalStateException
Callback from MRJ. Notify the application.
Specified by:
handleQuit in interface com.apple.mrj.MRJQuitHandler

handleOpenFile

public void handleOpenFile(java.io.File f)
Specified by:
handleOpenFile in interface com.apple.mrj.MRJOpenDocumentHandler

registerApplListener

public void registerApplListener(ApplListener listener)
The application calls this to register a listener.
Specified by:
registerApplListener in interface CorePlugin

removeApplListener

public void removeApplListener(ApplListener listener)
The application calls this to un-register a listener.
Specified by:
removeApplListener in interface CorePlugin

openURL

public void openURL(java.lang.String url)
             throws java.io.IOException

getFileType

public int getFileType(java.io.File f)
                throws java.io.IOException

getFileCreator

public int getFileCreator(java.io.File f)
                   throws java.io.IOException

setFileTypeAndCreator

public void setFileTypeAndCreator(java.io.File f,
                                  int typ,
                                  int creator)
                           throws java.io.IOException

stringToInt

public static int stringToInt(java.lang.String s)

intToString

public static java.lang.String intToString(int i)