FileDocCategorySizeDatePackage
BasicComp.javaAPI DocJMF 2.1.1e1463Mon May 12 12:20:52 BST 2003com.sun.media.ui

BasicComp

public class BasicComp extends Container

Fields Summary
protected String
label
private ActionListener
al
static Panel
panel
Control
control
int
width
int
height
Constructors Summary
protected BasicComp(String label)


       
	this.label = label;
    
Methods Summary
public static synchronized java.awt.ImagefetchImage(java.lang.String name)


       Image image=null;
       byte[] bits;

       bits = ImageLib.getImage(name);
       if (bits==null)
           return null;

       image = Toolkit.getDefaultToolkit().createImage(bits);

       try {  // wait for image
           MediaTracker imageTracker = new MediaTracker(panel);
           imageTracker.addImage(image, 0);
           imageTracker.waitForID(0);
       } catch (InterruptedException e) {
           System.err.println("ImageLoader: Interrupted at waitForID");
       }

	return image;
    
public java.lang.StringgetLabel()

        return ( label );
    
protected voidinformListener()

	if (al != null)
	    al.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
					       label));
    
public voidsetActionListener(java.awt.event.ActionListener al)

	this.al = al;