java.applet
Interface AppletContext


public interface AppletContext

This interface corresponds to an applet's environment. It can be used by an applet to obtain information from the applet's environment, which is usually the browser or the applet viewer.


Method Summary
 Applet getApplet(String name)
          Gets an applet by name.
 Enumeration getApplets()
          Enumerates the applets in this context.
 AudioClip getAudioClip(URL url)
          Gets an audio clip.
 Image getImage(URL url)
          Gets an image.
 void showDocument(URL url)
          Shows a new document.
 void showDocument(URL url, String target)
          Show a new document in a target window or frame.
 void showStatus(String status)
          Show a status string.
 

Method Detail

getAudioClip

public AudioClip getAudioClip(URL url)
Gets an audio clip.


getImage

public Image getImage(URL url)
Gets an image. This usually involves downloading it over the net. However, the environment may decide to cache images. This method takes an array of URLs, each of which will be tried until the image is found.


getApplet

public Applet getApplet(String name)
Gets an applet by name.

Returns:
null if the applet does not exist.

getApplets

public Enumeration getApplets()
Enumerates the applets in this context. Only applets that are accessible will be returned. This list always includes the applet itself.


showDocument

public void showDocument(URL url)
Shows a new document. This may be ignored by the applet context.


showDocument

public void showDocument(URL url,
                         String target)
Show a new document in a target window or frame. This may be ignored by the applet context. This method accepts the target strings: _self show in current frame _parent show in parent frame _top show in top-most frame _blank show in new unnamed top-level window show in new top-level window named


showStatus

public void showStatus(String status)
Show a status string.