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

ProgressBar

public class ProgressBar extends Slider

Fields Summary
private CachingControl
cc
private Color
cb
private Color
cd
private Color
cm
private ProgressBarThread
threadUpdate
Constructors Summary
public ProgressBar(CachingControl cc)


       
	this.cc = cc;
	setGrabberVisible(false);
	setBackground(DefaultControlPanel.colorBackground);

        threadUpdate = new ProgressBarThread ( this, cc );
        threadUpdate.start();
    
Methods Summary
public voidpaint(java.awt.Graphics g)

	if (cc == null)
	    super.paint(g);
	else {
	    long len = cc.getContentLength();
	    long progress = cc.getContentProgress();

	    if (len < 1) {
		return;
	    }

	    if (progress > len)
		len = progress;

	    setDisplayPercent((int)(100 * progress / len));
	    super.paint(g);
	}
    
public voidupdate(java.awt.Graphics g)

	paint(g);