javax.swing
public class SizeSequence extends Object
| Constructor Summary | |
|---|---|
| SizeSequence()
Creates a new empty SizeSequence instance. | |
| SizeSequence(int numEntries)
Creates a new SizeSequence instance with the specified number
of elements, each having a size of 0.
| |
| SizeSequence(int numEntries, int value)
Creates a new SizeSequence instance with the specified number
of elements all having the same size (value).
| |
| SizeSequence(int[] sizes)
Creates a new SizeSequence instance using the specified
element sizes.
| |
| Method Summary | |
|---|---|
| int | getIndex(int position)
Returns the index of the element that contains the specified position.
|
| int | getPosition(int index)
Returns the position of the specified element.
|
| int | getSize(int index)
Returns the size of the specified element, or 0 if the element index is
outside the defined range.
|
| int[] | getSizes()
Returns an array containing the sizes for all the elements in the sequence.
|
| void | insertEntries(int start, int length, int value)
Inserts new entries into the sequence at the start position.
|
| void | removeEntries(int start, int length)
Removes the element(s) at index start (the number of elements
removed is length).
|
| void | setSize(int index, int size)
Sets the size of the element at the specified index.
|
| void | setSizes(int[] sizes)
Sets the sizes for the elements in the sequence.
|
SizeSequence instance.SizeSequence instance with the specified number
of elements, each having a size of 0.
Parameters: numEntries the number of elements.
SizeSequence instance with the specified number
of elements all having the same size (value).
Parameters: numEntries the number of elements. value the value for each element.
SizeSequence instance using the specified
element sizes.
Parameters: sizes the element sizes (null not permitted).
Parameters: position the position.
Returns: The index of the element that contains the specified position.
Parameters: index the element index.
Returns: The position.
Parameters: index the element index.
Returns: The size of the specified element, or 0 if the element index is outside the defined range.
Returns: The element sizes.
start position.
There are length new entries each having the specified
value.
Parameters: start the start element. length the number of elements to insert. value the size for each of the new elements.
start (the number of elements
removed is length).
Parameters: start the index of the first element to remove. length the number of elements to remove.
Parameters: index the index. size the size.
Parameters: sizes the element sizes (null not permitted).