FileDocCategorySizeDatePackage
CacheControlComponent.javaAPI DocJMF 2.1.1e2738Mon May 12 12:20:50 BST 2003com.sun.media.ui

CacheControlComponent

public class CacheControlComponent extends BufferedPanel

Fields Summary
protected CachingControl
ctrl
private ExtendedCachingControl
xtdctrl
protected Player
player
protected ButtonComp
cancelButton
protected ProgressBar
progressBar
Constructors Summary
public CacheControlComponent(CachingControl ctrl, Player player)

        GridBagLayout gbl;
        GridBagConstraints gbc;
        Panel controls;
        Label label;

        this.ctrl = ctrl;
        this.player = player;

        if (ctrl instanceof ExtendedCachingControl) {
            xtdctrl = (ExtendedCachingControl) ctrl;
        }
        setBackground(DefaultControlPanel.colorBackground);
        setBackgroundTile(BasicComp.fetchImage("texture3.gif"));
        setLayout(gbl = new GridBagLayout());
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.gridwidth = GridBagConstraints.REMAINDER;
        label = new Label(JMFI18N.getResource("mediaplayer.download"), Label.CENTER);
        add(label);
        gbl.setConstraints(label, gbc);

        gbc.gridy++;
        gbc.gridwidth = 1;
        cancelButton = new CancelButton();
        add(cancelButton);
        gbl.setConstraints(cancelButton, gbc);
        gbc.gridx++;
        progressBar = new ProgressBar(ctrl);
        add(progressBar);
        gbl.setConstraints(progressBar, gbc);
    
Methods Summary
public voidaddNotify()

        super.addNotify();
        setSize(getPreferredSize());
    
public java.awt.ComponentgetProgressBar()

        return progressBar;