FileDocCategorySizeDatePackage
MuxPane.javaAPI DocJMF 2.1.1e2401Mon May 12 12:21:00 BST 2003com.sun.media.customizer

MuxPane

public class MuxPane extends JPanel
This is the class to define the multiplexer page
version
2.0

Fields Summary
public static final int
AU
public static final int
AIFF
public static final int
GSM
public static final int
WAV
public static final int
MP2
public static final int
MP3
public static final int
MOV
public static final int
AVI
JCheckBox[]
muxs
boolean[]
resultMux
Constructors Summary
public MuxPane()


      
	muxs[GSM] = new JCheckBox(I18N.getResource("MuxPane.GSM"), false);
	muxs[MP2] = new JCheckBox(I18N.getResource("MuxPane.MP2"), false);
	muxs[MP3] = new JCheckBox(I18N.getResource("MuxPane.MP3"), false); 
	muxs[WAV] = new JCheckBox(I18N.getResource("MuxPane.WAV"), false);
	muxs[AIFF] = new JCheckBox(I18N.getResource("MuxPane.AIFF"), false);
	muxs[AU] = new JCheckBox(I18N.getResource("MuxPane.AU"), false);
	muxs[MOV] = new JCheckBox(I18N.getResource("MuxPane.MOV"), false);
	muxs[AVI] = new JCheckBox(I18N.getResource("MuxPane.AVI"), false);
	
	JPanel apane = new JPanel(new GridLayout(2,3));
	JPanel vpane = new JPanel(new GridLayout(2,1));
        apane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), I18N.getResource("MuxPane.ATITLE")));
        vpane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), I18N.getResource("MuxPane.VTITLE")));
	
	for ( int i = 0; i < 6; i++) {
	    muxs[i].setEnabled(false);
	    apane.add(muxs[i]);
	}

	for ( int i = 6; i < 8; i++) {
	    muxs[i].setEnabled(false);
	    vpane.add(muxs[i]);
	}

	setLayout(new GridLayout(2,1));
	this.add(apane);
	this.add(vpane);
    
Methods Summary
public voiddisableAll()

	for ( int i = 0; i < 8; i++) 
	    muxs[i].setEnabled(false);
    
public voidenableAll()

	for ( int i = 0; i < 8; i++) 
	    muxs[i].setEnabled(true);
	muxs[MP3].setEnabled(false);
    
public boolean[]getState()

	for (int i = 0; i < 8; i++) {
	    if (muxs[i].isEnabled() && muxs[i].isSelected())
		resultMux[i] = true;
	    else 
		resultMux[i] = false;
	} 
	return (resultMux);