public final class RubberBandEqualizerModel extends DefaultEqualizerModel
EqualizerModel that guarantees that the sum of all categories is 100. So if a new value
is set all the other categories' values are adapted so that the sum is 100 again. Thus this model does
not inform listeners about a specific change at a specific index but only fires a general change event.1 is
applied to the remaining categories, ascending by indexDEFAULT_RANGE, equalizerCategories| Constructor and Description |
|---|
RubberBandEqualizerModel(Collection<EqualizerCategory> equalizerCategories)
Creates a new RubberBandEqualizerModel object using the given list of
EqualizerCategorys. |
| Modifier and Type | Method and Description |
|---|---|
void |
setValueAt(int index,
int value)
Setter for the a new value at the specified index.
|
checkValueWithinRange, getEqualizerCategories, getEqualizerCategory, getEqualizerCategoryCount, getRange, getValueAtaddEqualizerModelListener, fireEqualizerModelEvent, removeEqualizerModelListenerpublic RubberBandEqualizerModel(Collection<EqualizerCategory> equalizerCategories)
EqualizerCategorys. The
Range of this model is [0, 100]. In addition to the policies of
DefaultEqualizerModel this model implementation ensures that the sum of all values of the categories is
always 100. For convenience this constructor permits a category collection that contains categories
with 0 values only. In this case the constructor distributes values among the categories equally so
that a sum of 100 is guaranteed.equalizerCategories - the EqualizerCategorys of this modelIllegalArgumentException - if any of the policies of DefaultEqualizerModel are not met or if
the sum of the categories' values is not 0 or 100DefaultEqualizerModelpublic void setValueAt(int index,
int value)
EqualizerModelRange of this
model. Otherwise an IllegalArgumentException shall be thrown. Shall throw
IndexOutOfBoundsException if index is < 0 or >=
EqualizerModel.getEqualizerCategoryCount().setValueAt in interface EqualizerModelsetValueAt in class DefaultEqualizerModelindex - the category indexvalue - the new valueCopyright © 2012–2026 cismet GmbH. All rights reserved.