home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / solaris2 / jdk / src / java / applet / appletco.jav < prev    next >
Encoding:
Text File  |  1995-10-30  |  2.2 KB  |  75 lines

  1. /*
  2.  * @(#)AppletContext.java    1.11 95/09/01 Arthur van Hoff
  3.  *
  4.  * Copyright (c) 1994-1995 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software
  7.  * and its documentation for NON-COMMERCIAL purposes and without
  8.  * fee is hereby granted provided that this copyright notice
  9.  * appears in all copies. Please refer to the file "copyright.html"
  10.  * for further important copyright and licensing information.
  11.  *
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  13.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  14.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  15.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  16.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  17.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  18.  */
  19.  
  20. package java.applet;
  21.  
  22. import java.awt.Image;
  23. import java.awt.Graphics;
  24. import java.awt.image.ColorModel;
  25. import java.net.URL;
  26. import java.util.Enumeration;
  27.  
  28. /**
  29.  * Applet context. This interface corresponds to an Applet's
  30.  * environment. It can be used by an applet to obtain information
  31.  * from the applet's environment, which is usually the browser
  32.  * or the applet viewer.
  33.  *
  34.  * @version     1.11, 09/01/95
  35.  * @author     Arthur van Hoff
  36.  */
  37. public interface AppletContext {
  38.     /**
  39.      * Gets an audio clip.
  40.      */
  41.     AudioClip getAudioClip(URL url);
  42.  
  43.     /**
  44.      * Gets an image. This usually involves downloading it
  45.      * over the net. However, the environment may decide to
  46.      * cache images. This methods takes an array of URLs,
  47.      * each of which will be tried until the images is found.
  48.      */
  49.     Image getImage(URL url);
  50.  
  51.     /**
  52.      * Gets an applet by name. 
  53.      * @return null if the applet does not exist.
  54.      */
  55.     Applet getApplet(String name);
  56.  
  57.     /**
  58.      * Enumerate the applets in this context. Only applets
  59.      * that are accessible will be returned. This list always
  60.      * includes the applet itself.
  61.      */
  62.     Enumeration getApplets();
  63.  
  64.     /**
  65.      * Show a new document. This may be ignored by
  66.      * the applet context.
  67.      */
  68.     void showDocument(URL url);
  69.  
  70.     /**
  71.      * Show a status string.
  72.      */
  73.     void showStatus(String status);
  74. }
  75.