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

ProtocolPane

public class ProtocolPane extends JPanel
This class defines the protocol (DataSource) page
version
2.0

Fields Summary
public static final int
FILE
public static final int
HTTP
public static final int
FTP
public static final int
RTP
public static final int
RTSP
public static final int
JAVASOUND
public static final int
VFW
public static final int
SVDO
public static final int
SVDOPLS
public static final int
HTTPS
public static final int
CLNMGDS
public static final int
DSOUND
JCheckBox[]
protocols
boolean[]
resultProtocol
Constructors Summary
public ProtocolPane()


      
	super();

	protocols[FILE] = new JCheckBox(I18N.getResource("ProtocolPane.FILE"), false);
	protocols[HTTP] = new JCheckBox(I18N.getResource("ProtocolPane.HTTP"), false);
	protocols[FTP] = new JCheckBox(I18N.getResource("ProtocolPane.FTP"), false);
	protocols[RTP] = new JCheckBox(I18N.getResource("ProtocolPane.RTP"), false);
	protocols[RTSP] = new JCheckBox(I18N.getResource("ProtocolPane.RTSP"), false);
	protocols[JAVASOUND] = new JCheckBox(I18N.getResource("ProtocolPane.JAVASOUND"), false);

	protocols[VFW] = new JCheckBox(I18N.getResource("ProtocolPane.VFW"), false);
	protocols[SVDO] = new JCheckBox(I18N.getResource("ProtocolPane.SVDO"), false);
	protocols[SVDOPLS] = new JCheckBox(I18N.getResource("ProtocolPane.SVDOPLS"), false);
	protocols[HTTPS] = new JCheckBox(I18N.getResource("ProtocolPane.HTTPS"), false);
	protocols[CLNMGDS] = new JCheckBox(I18N.getResource("ProtocolPane.CLNMGDS"), false);
	protocols[DSOUND] = new JCheckBox(I18N.getResource("ProtocolPane.DSOUND"), false);

        this.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),I18N.getResource("ProtocolPane.PROTOCOL") ));
	this.setLayout(new BorderLayout());
	JPanel pp1 = new JPanel();
	pp1.setLayout(new GridLayout(6,2));
	this.add("Center", pp1);
	for (int i = 0; i < 12; i++) {
	    protocols[i].setEnabled(false);
	    pp1.add(protocols[i]);
	}
	
	protocols[CLNMGDS].setEnabled(true);

	//this.add("South", protocols[10]);
    
Methods Summary
public boolean[]getState()

	for (int i = 0; i < 12; i++) {
	    if (protocols[i].isEnabled() && protocols[i].isSelected())
		resultProtocol[i] = true;
	    else 
		resultProtocol[i] = false;
	} 
	return (resultProtocol);
    
public voidsetHighlight(boolean[] funcs, int release)

	boolean value;

	value = funcs[GeneralPane.MFILE];
	protocols[HTTP].setEnabled(value);
	protocols[HTTPS].setEnabled(value);
	protocols[FTP].setEnabled(value);
	value = value || funcs[GeneralPane.TRANSCODE];
	protocols[FILE].setEnabled(value);

	value = funcs[GeneralPane.RTPREC] || funcs[GeneralPane.RTPTRANS];
	protocols[RTSP].setEnabled(value);
	protocols[RTP].setEnabled(value);

	value = funcs[GeneralPane.CAPTURE];
	protocols[JAVASOUND].setEnabled(value);

	value = funcs[GeneralPane.CAPTURE] && ( release == 2 ); // SPP
	protocols[SVDO].setEnabled(value);
	protocols[SVDOPLS].setEnabled(value);
	
	value = funcs[GeneralPane.CAPTURE] && ( release == 3 ); // WPP
	protocols[VFW].setEnabled(value);
	protocols[DSOUND].setEnabled(value);