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

RendererPane

public class RendererPane extends JPanel
This class defines the available renderer page
version
2.0

Fields Summary
public static final int
SUNAUDIO
public static final int
JAVASOUND
public static final int
DAUDIO
public static final int
AWT
public static final int
JPEG
public static final int
XLIB
public static final int
XIL
public static final int
SUNRAY
public static final int
DDRAW
public static final int
GDI
JCheckBox[]
rndr
boolean[]
resultRndr
Constructors Summary
public RendererPane()


      
	rndr[SUNAUDIO] = new JCheckBox(I18N.getResource("RendererPane.SUNAUDIO"), false);
	rndr[JAVASOUND] = new JCheckBox(I18N.getResource("RendererPane.JAVASOUND"), false);
	rndr[DAUDIO] = new JCheckBox(I18N.getResource("RendererPane.DAUDIO"), false);
	rndr[AWT] = new JCheckBox(I18N.getResource("RendererPane.AWT"), false);
	rndr[JPEG] = new JCheckBox(I18N.getResource("RendererPane.JPEG"), false);
	rndr[XLIB] = new JCheckBox(I18N.getResource("RendererPane.XLIB"), false);
	rndr[XIL] = new JCheckBox(I18N.getResource("RendererPane.XIL"), false);
	rndr[SUNRAY] = new JCheckBox(I18N.getResource("RendererPane.SUNRAY"), false);
	rndr[DDRAW] = new JCheckBox(I18N.getResource("RendererPane.DDRAW"), false);
	rndr[GDI] = new JCheckBox(I18N.getResource("RendererPane.GDI"), false);

	JPanel apane = new JPanel(new GridLayout(3,1));
	JPanel vpane = new JPanel(new GridLayout(3,3));

	for ( int i = 0 ; i < 3; i++) {
	    rndr[i].setEnabled(false);
	    apane.add(rndr[i]);
	}

	for ( int i = 3 ; i < 10; i++) {
	    rndr[i].setEnabled(false);
	    vpane.add(rndr[i]);
	}

        apane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), I18N.getResource("RendererPane.ARNDR")));
        vpane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), I18N.getResource("RendererPane.VRNDR")));

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

	for ( int i = 0; i < 10; i++)
	    rndr[i].setEnabled(false);
    
public voidenableAll(int release)

	for ( int i = 0; i < 10; i++)
	    rndr[i].setEnabled(true);

	if ( release == 1 ) { // AJ
	   for ( int i = XLIB; i<= GDI; i++) 
	       rndr[i].setEnabled(false);
	   rndr[DAUDIO].setEnabled(false);
	} else if ( release == 2) { // SPP
	    for ( int i = DDRAW; i <= GDI; i++)
		rndr[i].setEnabled(false);
	} else if ( release == 3 ) { // WPP
	    for ( int i = XLIB; i<= SUNRAY; i++)
		rndr[i].setEnabled(false);
	}
	
    
public boolean[]getState()

	for (int i = 0; i < 10; i++) {
	    if (rndr[i].isEnabled() && rndr[i].isSelected())
		resultRndr[i] = true;
	    else 
		resultRndr[i] = false;
	} 
	return (resultRndr);