Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.desktop/share/classes/java/applet/AppletStub.java
41152 views
1
/*
2
* Copyright (c) 1995, 2021, 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
26
package java.applet;
27
28
import java.net.URL;
29
30
/**
31
* When an applet is first created, an applet stub is attached to it using the
32
* applet's {@code setStub} method. This stub serves as the interface between
33
* the applet and the browser environment or applet viewer environment in which
34
* the application is running.
35
*
36
* @author Arthur van Hoff
37
* @see java.applet.Applet#setStub(java.applet.AppletStub)
38
* @since 1.0
39
* @deprecated The Applet API is deprecated, no replacement.
40
*/
41
@Deprecated(since = "9", forRemoval = true)
42
@SuppressWarnings("removal")
43
public interface AppletStub {
44
45
/**
46
* Determines if the applet is active. An applet is active just before its
47
* {@code start} method is called. It becomes inactive just before its
48
* {@code stop} method is called.
49
*
50
* @return {@code true} if the applet is active; {@code false} otherwise
51
*/
52
boolean isActive();
53
54
/**
55
* Gets the {@code URL} of the document in which the applet is embedded. For
56
* example, suppose an applet is contained within the document:
57
* <blockquote><pre>
58
* http://www.oracle.com/technetwork/java/index.html
59
* </pre></blockquote>
60
* The document base is:
61
* <blockquote><pre>
62
* http://www.oracle.com/technetwork/java/index.html
63
* </pre></blockquote>
64
*
65
* @return the {@link java.net.URL} of the document that contains the applet
66
* @see java.applet.AppletStub#getCodeBase()
67
*/
68
URL getDocumentBase();
69
70
/**
71
* Gets the base {@code URL}. This is the {@code URL} of the directory which
72
* contains the applet.
73
*
74
* @return the base {@link java.net.URL} of the directory which contains the
75
* applet
76
* @see java.applet.AppletStub#getDocumentBase()
77
*/
78
URL getCodeBase();
79
80
/**
81
* Returns the value of the named parameter in the HTML tag. For example, if
82
* an applet is specified as
83
* <blockquote><pre>
84
* &lt;applet code="Clock" width=50 height=50&gt;
85
* &lt;param name=Color value="blue"&gt;
86
* &lt;/applet&gt;
87
* </pre></blockquote>
88
* <p>
89
* then a call to {@code getParameter("Color")} returns the value
90
* {@code "blue"}.
91
*
92
* @param name a parameter name
93
* @return the value of the named parameter, or {@code null} if not set
94
*/
95
String getParameter(String name);
96
97
/**
98
* Returns the applet's context.
99
*
100
* @return the applet's context
101
*/
102
AppletContext getAppletContext();
103
104
/**
105
* Called when the applet wants to be resized.
106
*
107
* @param width the new requested width for the applet
108
* @param height the new requested height for the applet
109
*/
110
void appletResize(int width, int height);
111
}
112
113