|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.graphic.views.IlpSlotSizes
public class IlpSlotSizes
This class encapsulates a bi-dimensional array of slots containing the size of each row and column.
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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
protected int[] |
createArray(int count,
int slotSize)
Creates a array to be used internally based on the given parameters. |
boolean |
equals(Object obj)
|
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[] |
getWidths()
Returns the whole array of width sizes. |
int |
getWidthSize(int widthIndex)
Method to access the width size of a slot. |
int |
hashCode()
|
protected void |
setHeights(int[] h)
Sets the whole array of height sizes. |
protected void |
setWidths(int[] w)
Sets the whole array of width sizes. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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)| Method Detail |
|---|
public int getWidthSize(int widthIndex)
widthIndex - The width index to address the slot.
ArrayOutOfBoundsException - if the index is out of bounds.public int getHeightSize(int heightIndex)
heightIndex - The height index to address the slot.
ArrayOutOfBoundsException - if the index is out of bounds.public int[] getWidths()
protected void setWidths(int[] w)
w - New slot widthpublic int[] getHeights()
protected void setHeights(int[] h)
h - New slot heights
protected int[] createArray(int count,
int slotSize)
count - Slot countslotSize - Slot size
size values with count slotspublic Object clone()
clone in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||