Top Description Inners Fields Constructors Methods
javax.sound.sampled

public abstract Class Control

extends Object
Class Inheritance
Known Direct Subclasses
javax.sound.sampled.EnumControl, javax.sound.sampled.FloatControl, javax.sound.sampled.BooleanControl, javax.sound.sampled.CompoundControl

Lines often have a set of controls, such as gain and pan, that affect the audio signal passing through the line. Java Sound's Line objects let you obtain a particular control object by passing its class as the argument to a getControl method.

Because the various types of controls have different purposes and features, all of their functionality is accessed from the subclasses that define each kind of control.

Author
Kara Kytle
Since
1.3
See Also
Line#getControls, Line#isControlSupported

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Control.Type

An instance of the Type class represents the type of the control.

Field Summary

Modifier and TypeField and Description
private final Control.Type
type

The control type.

Constructor Summary

AccessConstructor and Description
protected
Control(Control.Type
the kind of control desired
type
)

Constructs a control with the specified type.

Method Summary

Modifier and TypeMethod and Description
public Control.Type

Returns:

the control's type
getType
()

Obtains the control's type.

public String

Returns:

a string representation of the control
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the control.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

typeback to summary
private final Control.Type type

The control type.

Constructor Detail

Controlback to summary
protected Control(Control.Type type)

Constructs a control with the specified type.

Parameters
type:Control.Type

the kind of control desired

Method Detail

getTypeback to summary
public Control.Type getType()

Obtains the control's type.

Returns:Control.Type

the control's type

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of the control.

Returns:String

a string representation of the control

Annotations
@Override
javax.sound.sampled back to summary

public Class Control.Type

extends Object
Class Inheritance
Known Direct Subclasses
javax.sound.sampled.EnumControl.Type, javax.sound.sampled.FloatControl.Type, javax.sound.sampled.BooleanControl.Type, javax.sound.sampled.CompoundControl.Type

An instance of the Type class represents the type of the control.

Field Summary

Modifier and TypeField and Description
private final String
name

Type name.

Constructor Summary

AccessConstructor and Description
protected
Type(String
the name of the new control type
name
)

Constructs a new control type with the name specified.

Method Summary

Modifier and TypeMethod and Description
public final boolean

Returns:

true if the specified object is equal to this control type; false otherwise
equals
(Object
the reference object with which to compare
obj
)

Overrides java.lang.Object.equals.

Indicates whether the specified object is equal to this control type, returning true if the objects are the same.

public final int

Returns:

a hash code value for this control type
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this control type.

public final String

Returns:

a string representation of the control type
toString
()

Overrides java.lang.Object.toString.

Returns type's name as the string representation of the control type.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private final String name

Type name.

Constructor Detail

Typeback to summary
protected Type(String name)

Constructs a new control type with the name specified. The name should be a descriptive string appropriate for labelling the control in an application, such as "Gain" or "Balance".

Parameters
name:String

the name of the new control type

Method Detail

equalsback to summary
public final boolean equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether the specified object is equal to this control type, returning true if the objects are the same.

Parameters
obj:Object

the reference object with which to compare

Returns:boolean

true if the specified object is equal to this control type; false otherwise

Annotations
@Override
hashCodeback to summary
public final int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this control type.

Returns:int

a hash code value for this control type

Annotations
@Override
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Returns type's name as the string representation of the control type.

Returns:String

a string representation of the control type

Annotations
@Override