FileDocCategorySizeDatePackage
KeyFrameAdapter.javaAPI DocJMF 2.1.1e1530Mon May 12 12:20:56 BST 2003com.sun.media.controls

KeyFrameAdapter

public class KeyFrameAdapter extends Object implements javax.media.control.KeyFrameControl, ActionListener

Fields Summary
int
preferred
int
value
boolean
settable
com.sun.media.ui.TextComp
textComp
Constructors Summary
public KeyFrameAdapter(int preferredInterval, boolean settable)


         
	this.preferred = preferredInterval;
	this.settable = settable;
	this.value = preferred;
    
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent ae)

	int newValue = textComp.getIntValue();
	setKeyFrameInterval(newValue);
    
public java.awt.ComponentgetControlComponent()

	if (textComp == null) {
	    textComp = new TextComp(getName(),
				    Integer.toString(value), 3,
				    settable);
	    textComp.setActionListener(this);

	}
	return textComp;
    
public intgetKeyFrameInterval()

	return value;
    
protected java.lang.StringgetName()

	return "Key Frames Every";
    
public intgetPreferredKeyFrameInterval()

	return preferred;
    
public intsetKeyFrameInterval(int newValue)


	if (settable) {
	    if (newValue < 1)
		newValue = 1;
//	    if (newValue != value) {
		value = newValue;
		if (textComp != null) {
		    textComp.setValue(Integer.toString(value));
		}
//	    }
	    return value;
	} else
	    return -1;