FileDocCategorySizeDatePackage
SunVideoManual.javaAPI DocJMF 2.1.1e8160Mon May 12 12:20:34 BST 2003None

SunVideoManual

public class SunVideoManual extends Frame

Fields Summary
private static String
DEVICE_PREFIX
private static String
PROTOCOL
private static String
LOCATOR_PREFIX
CaptureDeviceInfo[]
devices
int
currentID
Constructors Summary
public SunVideoManual()

    
      
	super("Register SunVideo Caputure Devices");

	setLayout(new FlowLayout());
	int nDevices = 0;
	for (int i = 0; i < 7; i++) {
	    File fl = new File(DEVICE_PREFIX + i);
	    if (fl.exists()) {
		Button device = new Button(DEVICE_PREFIX + i);
		add(device);
		device.addActionListener( new DBListener(i) );
		nDevices++;
	    }
	}

	devices = new CaptureDeviceInfo[nDevices];
	
	pack();
	addWindowListener( new WindowAdapter() {
	    public void windowClosing(WindowEvent we) {
		if (currentID != -1) {
		    System.err.println("Need to close other window first");
		    return;
		}
		dispose();
		System.exit(0);
	    }
	} );
    
Methods Summary
public voidcreateDialog(int id)

	if (currentID == id)
	    return;
	currentID = id;
	Thread t = new Thread( new Runnable() {
	    public void run() {
		FormatsDialog fd = new FormatsDialog(currentID);
		fd.setVisible(true);
		CaptureDeviceInfo cdi = fd.getDeviceInfo();
		if (cdi != null) {
		    System.err.println("CaptureDeviceInfo = " + cdi.getName() + " " +
				       cdi.getLocator());
		}
		
		currentID = -1;
	    }
	} );
	t.start();
	// Create a CaptureDeviceInfo....
    
public static voidmain(java.lang.String[] args)

	SunVideoManual m = new SunVideoManual();
	m.setVisible(true);