home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / AppletStub.java < prev    next >
Text File  |  1997-05-20  |  3KB  |  103 lines

  1. /*
  2.  * @(#)AppletStub.java    1.9 96/11/23
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agre     * Constructs a NegativeArraySizeException with the specified detail message.
  10.      * A detail message is a String that describes this particular exception.
  11.      * @param s the detail messageement you entered into
  12.  * with Sun.
  13.  * 
  14.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  15.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  16.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  17.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  18.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  19.  * THIS SOFTWARE OR ITS DERIVATIVES.
  20.  * 
  21.  * CopyrightVersion 1.1_beta
  22.  * 
  23.  */
  24. package java.applet;
  25.  
  26. import java.net.URL;
  27.  
  28. /**
  29.  * When an applet is first created, an applet stub is attached to it 
  30.  * using the applet's <code>setStub</code> method. This stub 
  31.  * serves as the interface between the applet and the browser 
  32.  * environment or applet viewer environment in which the application 
  33.  * is running. 
  34.  *
  35.  * @author     Arthur van Hoff
  36.  * @version     1.12, 01/16/97
  37.  * @see         java.applet.Applet#setStub(java.applet.AppletStub)
  38.  * @since       JDK1.0
  39.  */
  40. public interface AppletStub {
  41.     /**
  42.      * Determines if the applet is active. An applet is active just 
  43.      * before its <code>start</code> method is called. It becomes 
  44.      * inactive immediately after its <code>stop</code> method is called. 
  45.      *
  46.      * @return  <code>true</code> if the applet is active;
  47.      *          <code>false</code> otherwise.
  48.      * @since   JDK1.0
  49.      */
  50.     boolean isActive();
  51.     
  52.     /**
  53.      * Gets the document URL.
  54.      *
  55.      * @return  the <code>URL</code> of the document containing the applet.
  56.      * @since   JDK1.0
  57.      */
  58.     URL getDocumentBase();
  59.  
  60.     /**
  61.      * Gets the base URL.
  62.      *
  63.      * @return  the <code>URL</code> of the applet.
  64.      * @since   JDK1.0
  65.      */
  66.     URL getCodeBase();
  67.  
  68.     /**
  69.      * Returns the value of the named parameter in the HTML tag. For 
  70.      * example, if an applet is specified as 
  71.      * <ul><code>
  72.      *    <applet code="Clock" width=50 height=50><br>
  73.      *  <param name=Color value="blue"><br>
  74.      *  </applet>
  75.      * </code></ul>
  76.      * <p>
  77.      * then a call to <code>getParameter("Color")</code> returns the 
  78.      * value <code>"blue"</code>. 
  79.      *
  80.      * @param   name   a parameter name.
  81.      * @return  the value of the named parameter.
  82.      * @since   JDK1.0
  83.      */
  84.     String getParameter(String name);
  85.  
  86.     /**
  87.      * Gets a handler to the applet's context.
  88.      *
  89.      * @return  the applet's context.
  90.      * @since   JDK1.0
  91.      */
  92.     AppletContext getAppletContext();
  93.  
  94.     /**
  95.      * Called when the applet wants to be resized. 
  96.      *
  97.      * @param   width    the new requested width for the applet.
  98.      * @param   height   the new requested height for the applet.
  99.      * @since   JDK1.0
  100.      */
  101.     void appletResize(int width, int height);
  102. }
  103.