|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The MutableCategoryScale is a specialization of the
CategoryScale interface and the MutableScale
interface. Therefore it is neccessary to read the
documentation of the CategoryScale interface and the
MutableScale interface in order to have an understanding of the
basics for a CategoryScale and a MutableScale.
Since a CategoryScale is immutable but mutable category scales
are also needed this class represents such a
MutableCategoryScale.
In contrast to a CategoryScale for a
MutableCategoryScale it is possible to modify the settings of
each CategoryRange. The methods a
MutableCategoryScale provides to do so are as follows:
setCategoryRange(com.tensegrity.composite.coordinate.range.CategoryRange)setCategories(java.util.List)
| Field Summary |
| Fields inherited from interface com.tensegrity.composite.coordinate.Scale |
TYPE_LINEAR |
| Method Summary | |
CategoryRange |
getCategoryRangeAt(int index)
Returns the CategoryRange at the given index.
|
void |
insertCategoryRangeAt(int index,
int width)
Inserts a new CategoryRange with width width
at location index. |
boolean |
removeCategoryRangeAt(int index)
Removes the CategoryRange located at position
index. |
void |
setCategories(java.util.List categories)
Sets the List of CategoryRanges given by
categories as the new CategoryRanges this
MutableCategoryScale provides. |
void |
setCategoryRange(CategoryRange range)
Adds the CategoryRange given by range to the
CategoryRanges this MutableCategoryScale
provides. |
| Methods inherited from interface com.tensegrity.composite.coordinate.CategoryScale |
getCategories, getWidth, getWidth, getWidthSum |
| Methods inherited from interface com.tensegrity.composite.coordinate.Scale |
deepCopy, descale, getDescaleFactor, getScaleFactor, getScaleMaximum, getScaleMinimum, getScaleRange, scale |
| Methods inherited from interface com.tensegrity.composite.coordinate.MutableScale |
setScaleMaximum, setScaleMinimum, setScaleRange |
| Method Detail |
public void setCategoryRange(CategoryRange range)
CategoryRange given by range to the
CategoryRanges this MutableCategoryScale
provides. If the new CategoryRange overlaps or lies within
other CategoryRanges these will be adjusted so that that no
overlapping occurs.
range - the CategoryRange to addpublic void setCategories(java.util.List categories)
List of CategoryRanges given by
categories as the new CategoryRanges this
MutableCategoryScale provides.
categories - the List of new
CategoryRangespublic CategoryRange getCategoryRangeAt(int index)
CategoryRange at the given index.
The returned CategoryRange can start on the left of
index and end on the right of index.
index - the index.
CategoryRange at the given index.
public void insertCategoryRangeAt(int index,
int width)
CategoryRange with width width
at location index. The new CategoryRange starts
and ends at index.
index - the insert location.width - the width of the inserted CategoryRange.public boolean removeCategoryRangeAt(int index)
CategoryRange located at position
index.
index - the insert location.
true if the removal was successful.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||