Interface FormatControl

All Known Subinterfaces:

public interface FormatControl
extends Control

The FormatControl interfaces is implemented by objects which supports format setting.

JMF 2.0

Method Summary
 Format getFormat()
          Obtain the format that this object is set to.
 Format[] getSupportedFormats()
          Lists the possible input formats supported by this plug-in.
 boolean isEnabled()
          Return the state of the track.
 void setEnabled(boolean enabled)
          Enable or disable the track.
 Format setFormat(Format format)
          Sets the data format.
Methods inherited from interface

Method Detail


public Format getFormat()
Obtain the format that this object is set to.
the current format.


public Format setFormat(Format format)
Sets the data format. The method returns null if the format is not supported. Otherwise, it returns the format that's actually set.

However in some situations, returning a non-null format does not necessarily mean that the format is supported since determining the supported formats may be state dependent or simply too costly. In such cases, the setFormat call will succeed but the object may fail in another state-transition operation such as when the object is being initialized.

Alternatively, the getSupportedFormats method can be used to query for the list of supported formats. The resulting list can be used to screen for the valid formats before setting that on the object.

null if the format is not supported; otherwise return the format that's actually set.


public Format[] getSupportedFormats()
Lists the possible input formats supported by this plug-in.
an array of the supported formats


public boolean isEnabled()
Return the state of the track.
A boolean telling whether or not the track is enabled.


public void setEnabled(boolean enabled)
Enable or disable the track.
enabled - true if the track is to be enabled.

Submit a bug or feature
Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.