< prev index next >

src/java.desktop/share/classes/java/applet/AppletStub.java

Print this page


   1 /*
   2  * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package java.applet;
  26 
  27 import java.net.URL;
  28 
  29 /**
  30  * When an applet is first created, an applet stub is attached to it
  31  * using the applet's {@code setStub} method. This stub
  32  * serves as the interface between the applet and the browser
  33  * environment or applet viewer environment in which the application
  34  * is running.
  35  *
  36  * @author      Arthur van Hoff
  37  * @see         java.applet.Applet#setStub(java.applet.AppletStub)
  38  * @since       1.0




  39  */


  40 public interface AppletStub {
  41     /**
  42      * Determines if the applet is active. An applet is active just
  43      * before its {@code start} method is called. It becomes
  44      * inactive just before its {@code stop} method is called.
  45      *
  46      * @return  {@code true} if the applet is active;
  47      *          {@code false} otherwise.
  48      */
  49     boolean isActive();
  50 
  51 
  52     /**
  53      * Gets the URL of the document in which the applet is embedded.
  54      * For example, suppose an applet is contained
  55      * within the document:
  56      * <blockquote><pre>
  57      *    http://www.oracle.com/technetwork/java/index.html
  58      * </pre></blockquote>
  59      * The document base is:


   1 /*
   2  * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package java.applet;
  26 
  27 import java.net.URL;
  28 
  29 /**
  30  * When an applet is first created, an applet stub is attached to it
  31  * using the applet's {@code setStub} method. This stub
  32  * serves as the interface between the applet and the browser
  33  * environment or applet viewer environment in which the application
  34  * is running.
  35  *
  36  * @author      Arthur van Hoff
  37  * @see         java.applet.Applet#setStub(java.applet.AppletStub)
  38  * @since       1.0
  39  *
  40  * @deprecated  The Applet API is deprecated. See the
  41  * <a href="package-summary.html"> java.applet package documentation</a>
  42  * for further information.
  43  */
  44 
  45 @Deprecated(since = "9")
  46 public interface AppletStub {
  47     /**
  48      * Determines if the applet is active. An applet is active just
  49      * before its {@code start} method is called. It becomes
  50      * inactive just before its {@code stop} method is called.
  51      *
  52      * @return  {@code true} if the applet is active;
  53      *          {@code false} otherwise.
  54      */
  55     boolean isActive();
  56 
  57 
  58     /**
  59      * Gets the URL of the document in which the applet is embedded.
  60      * For example, suppose an applet is contained
  61      * within the document:
  62      * <blockquote><pre>
  63      *    http://www.oracle.com/technetwork/java/index.html
  64      * </pre></blockquote>
  65      * The document base is:


< prev index next >