author | adinn |
Fri, 26 Jan 2018 16:38:21 +0000 | |
changeset 48682 | 34e45260c040 |
parent 47216 | 71c04702a3d5 |
child 50345 | 276cb4b17f79 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
38470
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
2 |
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
* |
|
5506 | 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. |
|
2 | 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 |
|
32283
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
31 |
* using the applet's {@code setStub} method. This stub |
2 | 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) |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
38 |
* @since 1.0 |
38470
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
39 |
* |
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
40 |
* @deprecated The Applet API is deprecated. See the |
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
41 |
* <a href="package-summary.html"> java.applet package documentation</a> |
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
42 |
* for further information. |
2 | 43 |
*/ |
38470
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
44 |
|
6dd62dab450d
8157622: Add @Deprecated annotations to the Applet API classes
dtitov
parents:
32283
diff
changeset
|
45 |
@Deprecated(since = "9") |
2 | 46 |
public interface AppletStub { |
47 |
/** |
|
48 |
* Determines if the applet is active. An applet is active just |
|
32283
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
49 |
* before its {@code start} method is called. It becomes |
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
50 |
* inactive just before its {@code stop} method is called. |
2 | 51 |
* |
32283
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
52 |
* @return {@code true} if the applet is active; |
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
53 |
* {@code false} otherwise. |
2 | 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> |
|
20455
f6f9a0c2796b
8020688: Broken links in documentation at http://docs.oracle.com/javase/6/docs/api/index.
mcherkas
parents:
5506
diff
changeset
|
63 |
* http://www.oracle.com/technetwork/java/index.html |
2 | 64 |
* </pre></blockquote> |
65 |
* The document base is: |
|
66 |
* <blockquote><pre> |
|
20455
f6f9a0c2796b
8020688: Broken links in documentation at http://docs.oracle.com/javase/6/docs/api/index.
mcherkas
parents:
5506
diff
changeset
|
67 |
* http://www.oracle.com/technetwork/java/index.html |
2 | 68 |
* </pre></blockquote> |
69 |
* |
|
70 |
* @return the {@link java.net.URL} of the document that contains the |
|
71 |
* applet. |
|
72 |
* @see java.applet.AppletStub#getCodeBase() |
|
73 |
*/ |
|
74 |
URL getDocumentBase(); |
|
75 |
||
76 |
/** |
|
77 |
* Gets the base URL. This is the URL of the directory which contains the applet. |
|
78 |
* |
|
79 |
* @return the base {@link java.net.URL} of |
|
80 |
* the directory which contains the applet. |
|
81 |
* @see java.applet.AppletStub#getDocumentBase() |
|
82 |
*/ |
|
83 |
URL getCodeBase(); |
|
84 |
||
85 |
/** |
|
86 |
* Returns the value of the named parameter in the HTML tag. For |
|
87 |
* example, if an applet is specified as |
|
88 |
* <blockquote><pre> |
|
89 |
* <applet code="Clock" width=50 height=50> |
|
90 |
* <param name=Color value="blue"> |
|
91 |
* </applet> |
|
92 |
* </pre></blockquote> |
|
93 |
* <p> |
|
32283
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
94 |
* then a call to {@code getParameter("Color")} returns the |
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
95 |
* value {@code "blue"}. |
2 | 96 |
* |
97 |
* @param name a parameter name. |
|
98 |
* @return the value of the named parameter, |
|
32283
1a96ab120a48
8133134: docs: replace <tt> tags (obsolete in html5) for java.desktop
avstepan
parents:
25859
diff
changeset
|
99 |
* or {@code null} if not set. |
2 | 100 |
*/ |
101 |
String getParameter(String name); |
|
102 |
||
103 |
/** |
|
104 |
* Returns the applet's context. |
|
105 |
* |
|
106 |
* @return the applet's context. |
|
107 |
*/ |
|
108 |
AppletContext getAppletContext(); |
|
109 |
||
110 |
/** |
|
111 |
* Called when the applet wants to be resized. |
|
112 |
* |
|
113 |
* @param width the new requested width for the applet. |
|
114 |
* @param height the new requested height for the applet. |
|
115 |
*/ |
|
116 |
void appletResize(int width, int height); |
|
117 |
} |