public class IlpSlotSizes extends Object implements Cloneable
It does not provide methods to set values, to avoid synchronization
problems with the attribute value SlotSizes from
IltShelf.
It is also internally used by implementations of
IltShelfItemContainer classes.
| Constructor and Description |
|---|
IlpSlotSizes()
Creates a new zero-length array of slots.
|
IlpSlotSizes(int[] width,
int[] height)
Creates a new array based on two given arrays.
|
IlpSlotSizes(int columns,
int rows,
int width,
int height)
Creates a new array with fixed width and height.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clone this object.
|
protected int[] |
createArray(int count,
int slotSize)
Creates a array to be used internally based on the given
parameters.
|
boolean |
equals(Object obj)
Compares two objects.
|
int |
getHeightCount()
Method to access the number of slots across the height.
|
int[] |
getHeights()
Method to access the whole array of height sizes.
|
int |
getHeightSize(int heightIndex)
Method to access the height size of a slot.
|
int |
getWidthCount()
Method to access the number of slots across the width.
|
int[] |
getWidths()
Returns the whole array of width sizes.
|
int |
getWidthSize(int widthIndex)
Method to access the width size of a slot.
|
int |
hashCode()
Returns a hash code value for the object.
|
protected void |
setHeights(int[] h)
Sets the whole array of height sizes.
|
protected void |
setWidths(int[] w)
Sets the whole array of width sizes.
|
public IlpSlotSizes()
public IlpSlotSizes(int[] width,
int[] height)
Both arrays must be non-null.
width - The array representing the width sizes.height - The array representing the height sizes.IllegalArgumentException - When at least one of the parameters
is null.public IlpSlotSizes(int columns,
int rows,
int width,
int height)
Non negative values are allowed.
columns - The number of columns in the array.rows - The number of rows in the array.width - The width of each slot.height - The height of each slot.IllegalArgumentException - When the parameters are invalid
(negative values)public int getWidthSize(int widthIndex)
widthIndex - The width index to address the slot.ArrayOutOfBoundsException - if the index is out of bounds.public int getWidthCount()
public int getHeightSize(int heightIndex)
heightIndex - The height index to address the slot.ArrayOutOfBoundsException - if the index is out of bounds.public int getHeightCount()
public int[] getWidths()
protected void setWidths(int[] w)
w - New slot widthpublic int[] getHeights()
protected void setHeights(int[] h)
h - New slot heightsprotected int[] createArray(int count,
int slotSize)
count - Slot countslotSize - Slot sizesize values with count slotspublic Object clone()
public boolean equals(Object obj)
© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.