|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.graphic.views.IlpShelfItemPosition
public class IlpShelfItemPosition
Implements the relative position of a card item within a shelf in the network or equipment component.
| Constructor Summary | |
|---|---|
IlpShelfItemPosition()
Creates a new position. |
|
IlpShelfItemPosition(IlpShelfItemPosition pos)
Copies a position. |
|
IlpShelfItemPosition(IlvRect rect)
Creates a new position by copying an existing one. |
|
IlpShelfItemPosition(int slotX,
int slotY)
Creates a new position with a default span. |
|
IlpShelfItemPosition(int slotX,
int slotY,
float spanX,
float spanY)
Creates a new position based on given information. |
|
| Method Summary | |
|---|---|
Object |
clone()
Creates and returns a copy of a given IlpShelfItemPosition
object. |
boolean |
equals(Object pos)
Compares the position to the given object. |
int |
getSlotIndex()
Deprecated. Please use getXIndex instead. |
float |
getSlotSpan()
Deprecated. Please use getXSpan instead. |
int |
getXIndex()
Retrieves the xIndex attribute. |
float |
getXSpan()
Retrieves the xSpan attribute. |
int |
getYIndex()
Retrieves the yIndex attribute. |
float |
getYSpan()
Retrieves the ySpan attribute. |
int |
hashCode()
|
void |
setXIndex(int index)
Sets the xIndex attribute. |
void |
setXSpan(float span)
Sets the xSpan attribute. |
void |
setYIndex(int index)
Sets the yIndex attribute. |
void |
setYSpan(float span)
Sets the ySpan attribute. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlpShelfItemPosition()
public IlpShelfItemPosition(IlpShelfItemPosition pos)
pos - The position to be copied.
public IlpShelfItemPosition(int slotX,
int slotY)
. The spanX and spanY are 1.
slotX - The slot index for the X axis.slotY - The slot index for the Y axis.
public IlpShelfItemPosition(int slotX,
int slotY,
float spanX,
float spanY)
A shelf is composed of a matrix of slots. When a shelf item occupies a part of a slot or more than one slot, it can be positioned by reference to the matrix. The shelf item position gives the indexes for the matrix and how many slots are occupied through X and Y axes.
For example, if spanX == 1, the shelf item occupies
one slot only along the X axis. If spanY == 2, the
shelf item occupies 2 slots along the Y axis. Using these
parameters, you could also position an item to occupy half a slot.
slotX - The slot index for the X axis.slotY - The slot index for the Y axis.spanX - The span in the matrix in the X orientation of the slots.spanY - The span in the matrix in the Y orientation of the slots.public IlpShelfItemPosition(IlvRect rect)
The position to be copied is given in a rectangle where
the x coordinate corresponds to
slotX; the y coordinate corresponds to
slotY; the width corresponds to
spanX and the height corresponds
to spanY.
rect - The copied position.| Method Detail |
|---|
public int getXIndex()
xIndex attribute.
xIndex attribute.public void setXIndex(int index)
xIndex attribute.
index - The new value for the xIndex attribute.public int getYIndex()
yIndex attribute.
yIndex attribute.public void setYIndex(int index)
yIndex attribute.
index - The new value for the yIndex attribute.public float getXSpan()
xSpan attribute.
xSpan attribute.public void setXSpan(float span)
xSpan attribute.
span - The new value for xSpan attribute.public float getYSpan()
ySpan attribute.
ySpan attribute.public void setYSpan(float span)
ySpan attribute.
span - The new value for the ySpan attribute.public Object clone()
IlpShelfItemPosition
object.
clone in class ObjectIlpShelfItemPosition
that represents the same shelf item position as the given object.public boolean equals(Object pos)
The result is true only if the argument is not
null and is an IlpShelfItemPosition
or an IlvRect object that represents the same
shelf position as this object.
equals in class Objectpos - The object to compare IlpShelfItemPosition
against.
true if the positions are equal; otherwise,
false.public int hashCode()
hashCode in class Objectpublic int getSlotIndex()
getXIndex instead.
IlpShelfItemContainer.
public float getSlotSpan()
getXSpan instead.
IlpShelfItemContainer.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||