home *** CD-ROM | disk | FTP | other *** search
- package java.applet;
-
- import java.awt.Component;
- import java.awt.Dimension;
- import java.awt.Image;
- import java.awt.Panel;
- import java.net.MalformedURLException;
- import java.net.URL;
-
- public class Applet extends Panel {
- private AppletStub stub;
-
- public final void setStub(AppletStub stub) {
- this.stub = stub;
- }
-
- public boolean isActive() {
- return this.stub.isActive();
- }
-
- public URL getDocumentBase() {
- return this.stub.getDocumentBase();
- }
-
- public URL getCodeBase() {
- return this.stub.getCodeBase();
- }
-
- public String getParameter(String name) {
- return this.stub.getParameter(name);
- }
-
- public AppletContext getAppletContext() {
- return this.stub.getAppletContext();
- }
-
- public void resize(int width, int height) {
- Dimension d = ((Component)this).size();
- if (d.width != width || d.height != height) {
- super.resize(width, height);
- if (this.stub != null) {
- this.stub.appletResize(width, height);
- }
- }
-
- }
-
- public void resize(Dimension d) {
- this.resize(d.width, d.height);
- }
-
- public void showStatus(String msg) {
- this.getAppletContext().showStatus(msg);
- }
-
- public Image getImage(URL url) {
- return this.getAppletContext().getImage(url);
- }
-
- public Image getImage(URL url, String name) {
- try {
- return this.getImage(new URL(url, name));
- } catch (MalformedURLException var3) {
- return null;
- }
- }
-
- public AudioClip getAudioClip(URL url) {
- return this.getAppletContext().getAudioClip(url);
- }
-
- public AudioClip getAudioClip(URL url, String name) {
- try {
- return this.getAudioClip(new URL(url, name));
- } catch (MalformedURLException var3) {
- return null;
- }
- }
-
- public String getAppletInfo() {
- return null;
- }
-
- public String[][] getParameterInfo() {
- return null;
- }
-
- public void play(URL url) {
- AudioClip clip = this.getAudioClip(url);
- if (clip != null) {
- clip.play();
- }
-
- }
-
- public void play(URL url, String name) {
- AudioClip clip = this.getAudioClip(url, name);
- if (clip != null) {
- clip.play();
- }
-
- }
-
- public void init() {
- }
-
- public void start() {
- }
-
- public void stop() {
- }
-
- public void destroy() {
- }
- }
-