Top Description Fields Constructors Methods
javafx.scene.media

public final Class EqualizerBand

extends Object
Class Inheritance
Imports
javafx.beans.property.DoubleProperty, .DoublePropertyBase

The EqualizerBand class provides control for each band in the AudioEqualizer.
Since
JavaFX 2.0
See Also
AudioEqualizer

Field Summary

Modifier and TypeField and Description
private DoubleProperty
bandwidth

Bandwidth of the band in Hertz.

private DoubleProperty
centerFrequency

Center frequency of the band in Hertz.

private final Object
private DoubleProperty
gain

The gain to be applied to the frequencies of this band.

private EqualizerBand
public static final double
MAX_GAIN

Maximum possible gain value.

public static final double
MIN_GAIN

Minimum possible gain value.

Constructor Summary

AccessConstructor and Description
public
EqualizerBand()

EqualizerBand default constructor.

public
EqualizerBand(double
a positive value specifying the center frequency of the band in Hertz.
centerFrequency
,
double
a positive value specifying the bandwidth of the band in Hertz.
bandwidth
,
double
the gain in decibels to be applied to the band in the range [MIN_GAIN, MAX_GAIN] dB.
gain
)

Custom EqualizerBand constructor.

Method Summary

Modifier and TypeMethod and Description
public DoubleProperty
public DoubleProperty
public DoubleProperty
public final double

Returns:

the bandwidth of the band in Hertz.
getBandwidth
()

Retrieve the bandwidth of the band.

public final double

Returns:

the center frequency on the band in Hertz.
getCenterFrequency
()

Retrieve the center frequency of the band.

public final double

Returns:

the gain of the band in dB.
getGain
()

Retrieve the gain to be applied to the band.

public final void
setBandwidth(double
the bandwidth which must be a positive value in Hz.
value
)

Set the bandwidth of the band in Hertz.

public final void
setCenterFrequency(double
the center frequency which must be a positive value in Hz.
value
)

Set the center frequency on the band in Hertz.

public final void
setGain(double
the gain in the range [MIN_GAIN, MAX_GAIN].
value
)

Set the gain of the band in dB.

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bandwidthback to summary
private DoubleProperty bandwidth

Bandwidth of the band in Hertz. The default value is 0.0 Hz.

centerFrequencyback to summary
private DoubleProperty centerFrequency

Center frequency of the band in Hertz. The default value is 0.0 Hz.

disposeLockback to summary
private final Object disposeLock
gainback to summary
private DoubleProperty gain

The gain to be applied to the frequencies of this band. The default value is 0.0 dB.

jfxBandback to summary
private EqualizerBand jfxBand
MAX_GAINback to summary
public static final double MAX_GAIN

Maximum possible gain value. In the current implementation this value is 12.0 dB.

MIN_GAINback to summary
public static final double MIN_GAIN

Minimum possible gain value. In the current implementation this value is -24.0 dB.

Constructor Detail

EqualizerBandback to summary
public EqualizerBand()

EqualizerBand default constructor. It creates an instance with centerFrequency, bandwidth and gain set to 0.

EqualizerBandback to summary
public EqualizerBand(double centerFrequency, double bandwidth, double gain)

Custom EqualizerBand constructor. It creates an instance from the centerFrequency, bandwidth and gain parameters. The gain specifies the amount of amplification (gain > 0.0 dB) or attenuation (gain < 0.0 dB) to be applied to the center frequency of the band. The bandwidth is the frequency spread between the upper and lower edges of the equalizer transfer function which have half the dB gain of the peak (center frequency).

Parameters
centerFrequency:double

a positive value specifying the center frequency of the band in Hertz.

bandwidth:double

a positive value specifying the bandwidth of the band in Hertz.

gain:double

the gain in decibels to be applied to the band in the range [MIN_GAIN, MAX_GAIN] dB.

Method Detail

bandwidthPropertyback to summary
public DoubleProperty bandwidthProperty()
centerFrequencyPropertyback to summary
public DoubleProperty centerFrequencyProperty()
gainPropertyback to summary
public DoubleProperty gainProperty()
getBandwidthback to summary
public final double getBandwidth()

Retrieve the bandwidth of the band.

Returns:double

the bandwidth of the band in Hertz.

getCenterFrequencyback to summary
public final double getCenterFrequency()

Retrieve the center frequency of the band.

Returns:double

the center frequency on the band in Hertz.

getGainback to summary
public final double getGain()

Retrieve the gain to be applied to the band.

Returns:double

the gain of the band in dB.

setBandwidthback to summary
public final void setBandwidth(double value)

Set the bandwidth of the band in Hertz.

Parameters
value:double

the bandwidth which must be a positive value in Hz.

setCenterFrequencyback to summary
public final void setCenterFrequency(double value)

Set the center frequency on the band in Hertz.

Parameters
value:double

the center frequency which must be a positive value in Hz.

setGainback to summary
public final void setGain(double value)

Set the gain of the band in dB. Gain property is limited to be within the interval MIN_GAIN to MAX_GAIN.

Parameters
value:double

the gain in the range [MIN_GAIN, MAX_GAIN].

setJfxBandback to summary
pack-priv void setJfxBand(EqualizerBand jfxBand)