FileDocCategorySizeDatePackage
AppletAdapter.javaAPI DocExample3053Sun Feb 08 21:33:52 GMT 2004None

AppletAdapter

public class AppletAdapter extends Panel implements AppletStub, AppletContext

Fields Summary
Label
status
The status window at the bottom
Map
streamMap
Constructors Summary
AppletAdapter()
Construct the GUI for an Applet Status window


	         
	 
		super();

		// Must do this very early on, since the Applet's
		// Constructor or its init() may use showStatus()
		add(status = new Label());

		// Give "status" the full width
		status.setSize(getSize().width, status.getSize().height);

		showStatus("AppletAdapter constructed");	// now it can be said
	
Methods Summary
public voidappletResize(int w, int h)
Called when the applet wants to be resized.

		// applet.setSize(w, h);
	
public java.applet.AppletgetApplet(java.lang.String an)
Finds and returns the applet with the given name.

		return null;
	
public java.applet.AppletContextgetAppletContext()
Gets a reference to the applet's context.

		return this;
	
public java.util.EnumerationgetApplets()
Finds all the applets in the document

		class AppletLister implements Enumeration {
			public boolean hasMoreElements() {
				return false;
			}
			public Object nextElement() {
				return null;
			}
		}
		return new AppletLister();
	
public java.applet.AudioClipgetAudioClip(java.net.URL u)
Create an audio clip for the given URL of a .au file

		return null;
	
public java.net.URLgetCodeBase()
Gets the base URL.

		return getClass().getResource(".");
	
public java.net.URLgetDocumentBase()
Gets the document URL.

		return getClass().getResource(".");
	
public java.awt.ImagegetImage(java.net.URL u)
Look up and create an Image object that can be paint()ed

		return null;
	
public java.lang.StringgetParameter(java.lang.String name)
Returns the value of the named parameter in the HTML tag.

		String value = null;
		return value;
	
public java.io.InputStreamgetStream(java.lang.String key)

		return (InputStream)streamMap.get(key);
	
public java.util.IteratorgetStreamKeys()

		return streamMap.keySet().iterator();
	
public booleanisActive()
Determines if the applet is active.

		return true;
	
public voidsetStream(java.lang.String key, java.io.InputStream stream)
Associate the stream with the key.


	       
	        
		streamMap.put(key, stream);
	
public voidshowDocument(java.net.URL u)
Request to overlay the current page with a new one - ignored

	
public voidshowDocument(java.net.URL u, java.lang.String frame)
as above but with a Frame target

	
public voidshowStatus(java.lang.String msg)
Called by the Applet to display a message in the bottom line

		if (msg == null)
			msg = "";
		status.setText(msg);