|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.model.IlpDefaultObject
ilog.tgo.model.IltObject
ilog.tgo.model.IltShelf
public class IltShelf
The IltShelf class is used to represent shelf configurations.
A shelf is made up of a given number of horizontal slots (x slots)
and vertical slots (y slots) forming a rectangular matrix of
variable-sized slots.
The shelf graphic representation consists of a frame divided into rectangles (one for each slot with its corresponding width and height). Each slot column is assigned a number which is displayed either below (default) or above the shelf outline. The slot columns are numbered continuously from a given initial value or according to the slot labels configured using cascading style sheets.
IltShelf objects play the role of graphic containers for any
IltObject; they are especially suitable for shelf items of
the following classes: IltCard, IltEmptySlot
and IltCardCarrier.
| Nested Class Summary | |
|---|---|
static class |
IltShelf.Type
This enumeration lists the types of shelves. |
| Nested classes/interfaces inherited from class ilog.tgo.model.IltObject |
|---|
IltObject.ListPrimaryStateStyleValueProvider, IltObject.LogicalType, IltObject.TinyType |
| Field Summary | |
|---|---|
static IltAttribute |
DirectionAttribute
Attribute used to define the direction of the shelf. |
static IlpColorKey |
FrameColor
Deprecated. Please use CSS property frameColor instead. |
static IltObjectInfo |
metainfo
Contains metainformation about this IltObject class. |
static IltAttribute |
SlotSizesAttribute
Attribute that manages the number of slots and its dimensions. |
static IltAttribute |
TypeAttribute
Attribute used to define the type of the shelf. |
static IltAttribute |
XSlotFirstIndex
Deprecated. Please use IltShelf.XSlotIndexAttribute instead. |
static IltAttribute |
XSlotIndexAttribute
Aa attribute used to define the logical first index for the slots along the X axis of a shelf. |
static IlpStringArrayKey |
XSlotLabels
Stores the labels that shall be used as slot labels when drawing a shelf |
static IlpIntegerKey |
XSlotNumbersOffset
Deprecated. Please use CSS property XSlotNumbersOffset instead. |
static IlpBooleanKey |
XSlotNumbersOnTop
Deprecated. Please use CSS property XSlotNumbersOnTop instead. |
| Fields inherited from interface ilog.cpl.model.IlpAttributeValueHolder |
|---|
VALUE_NOT_SET |
| Constructor Summary | |
|---|---|
IltShelf(IlpClass ilpClass,
Object identifier)
Creates a new shelf with the given identifier. |
|
IltShelf(int[] xSlotWidths,
int[] ySlotWidths,
int xSlotIndex)
This constructor creates an instance of a standard IltShelf
with variable-width slots. |
|
IltShelf(int[] slotWidths,
int slotHeight,
int logicalFirstIndex)
This constructor creates an instance of a standard type IltShelf
with variable-width slots. |
|
IltShelf(int sCount,
int sWidth,
int sHeight,
int index)
This constructor creates an instance of IltShelf with fixed-width
slots, and with the Standard type. |
|
IltShelf(int numXSlots,
int widthXSlot,
int numYSlots,
int widthYSlot,
int xSlotIndex)
This constructor creates an instance of a standard IltShelf
with fixed-width slots. |
|
IltShelf(Object identifier)
Creates a new shelf with the given identifier. |
|
| Method Summary | |
|---|---|
void |
applyTransform(IltGraphicManager manager,
IltGraphic graphic,
IlvTransformer t,
IlpPositionSource reason)
Deprecated. |
boolean |
areSlotNumsOnTop()
Deprecated. Please use the CSS property XSlotNumbersOnTop instead. |
void |
checkItem(IltObject item,
IlpShelfItemPosition position)
Check the position for a given item, verifying if indexes and spans are valid, and also checking if the item can fit into the container. |
void |
computeGraphic(IltGraphicManager manager,
IlvPoint position)
Deprecated. Adding a object to a datasource, connected to a graphic component such as an IlpNetwork, is enough to make its graphic representation
visible. |
protected void |
copyFrom(IltObject o)
Copies the attributes from an original object. |
ilog.tgo.graphic.internal.base.IltBaseElement |
createBase(IltcGraphicElementAggregate root)
Creates a base element, suitable for this particular kind of object. |
void |
createGraphic(IltGraphicManager manager)
Deprecated. Adding a object to a datasource, connected to a graphic component such as an IlpNetwork, is enough to make its graphic representation
visible. |
ilog.tgo.graphic.internal.IltGraphicUpdate |
createPositionUpdate(Object position,
Object positionInManager)
Creates the graphic update responsible for setting the position/shape to a graphical representation. |
Object |
defaultShape()
Returns the default shape, used when an object is made visible without having been assigned a shape. |
int |
findItem(IltObject item)
Deprecated. Please use the IltShelfItem.getPosition or retrieve
the shelf item position from the component view. |
IlvRect |
getBaseRectangle(IltGraphicManager manager)
Returns the base rectangle of the graphic representation in a given IltGraphicManager. |
protected IlvPoint |
getCenterPoint(IltGraphicManager manager,
IltGraphic graphic)
Returns the position of the graphic representation in a given IltGraphicManager. |
Enumeration |
getChildren()
Deprecated. In the future, relationships will only be defined at the datasource level. |
static IltLegend |
GetClassLegend()
Deprecated. The Style API has been replaced by the Cascading Style Sheet mechanism. Please refer to the User's Manual for further information. |
IltChildrenModel |
getDetailObjects()
Deprecated. Containment relationships should be declared at the Datasource level. |
static IltObjectInfo |
GetIlpClass()
Returns the IlpClass corresponding to this Java class. |
IltObject |
getItem(int slotIndex)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
IltObject |
getItem(int xSlotIndex,
int ySlotIndex)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
IlpShelfItemPosition |
getItemPosition(IltObject item)
Deprecated. Please use the IltShelfItem.getPosition or retrieve
the shelf item position from the component view. |
IlvRect |
getItemRect(IltGraphicManager manager,
IltObject item)
Deprecated. Adding a object to a datasource, connected to a graphic component such as an IlpNetwork, is enough to make its graphic representation
visible. Retrieve the bounding box of the children object from its
graphic representation. |
Enumeration |
getItems()
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
Enumeration |
getItems(int slotIndex,
float slotSpan)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
Enumeration |
getItems(int xSlotIndex,
float xSlotSpan,
int ySlotIndex,
float ySlotSpan)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
float |
getItemSpan(int slotIndex)
Deprecated. Please use the IltShelfItem.getPosition or retrieve
the shelf item position from the component view. |
int |
getLogicalFirstIndex()
Deprecated. Use the method getAttributeValue to retrieve the
XSlotIndexAttribute attribute instead. |
ilog.util.internal.IlAVector |
getMappedForUserList()
|
IltStateHolder |
getOverviewObject()
Deprecated. Containment relationships should be declared at the Datasource level. |
int |
getSizeOtherDimension()
Returns the size of the other dimension for all the slots. |
int |
getSlotCount()
Accesses the total number of slots in the container. |
int |
getSlotNumSpace()
Deprecated. Please use the CSS property XSlotNumbersOffset instead. |
int[] |
getSlotSizes()
Returns the slot sizes. |
float |
getSlotSpanX(int xIndex,
int yIndex)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
float |
getSlotSpanY(int xIndex,
int yIndex)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
IltStatePropagator |
getStatePropagator()
Deprecated. State propagation at the graphic level is not supported in the Network Component. |
IlvPoint |
getTopLeftPoint(IltGraphicManager manager)
Deprecated. Please use getPosition instead. |
protected IlvPoint |
getTopLeftPoint(IltGraphicManager manager,
IltGraphic graphic)
Returns the shape graphic setting. |
IltShelf.Type |
getType()
Returns the type of the shelf. |
int[] |
getXSlotSizes()
Accesses the sizes of the slots along the x axis. |
int[] |
getYSlotSizes()
Accesses the sizes of the slots along the y axis. |
void |
initializeCreatedGraphic(IltGraphicManager manager,
IltGraphic graphic)
This method must be called just after preCreateGraphic to initialize any needed property or graphic setting. |
protected void |
initializeObject(IltObjectState state,
String name)
This method is only called by the constructor. |
protected void |
initializeShelf(int[] xSlotWidths,
int[] ySlotWidths,
int xSlotIndex)
This method should be only called by the constructors. |
protected void |
initializeShelf(int countXSlot,
int slotWidth,
int countYSlot,
int slotHeight,
int xSlotIndex)
This method should be only called by the constructors. |
boolean |
isValidPosition(Object position)
Determines whether the argument is a valid position/shape for this type of object. |
protected void |
recreateChildren(ilog.tgo.model.internal.IltSlotArray sArray,
ilog.tgo.model.internal.IltSlotSizes sSizes)
|
void |
removeAllItems()
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
void |
removeGraphic(IltGraphicManager manager)
Removes the graphic representation of this object from a given IltGraphicManager. |
boolean |
removeItem(IltObject item)
Deprecated. Containment relationships should be declared and retrieved at the Datasource level. |
void |
setAttributeValue(IlpAttribute attribute,
Object value)
Sets the value of an attribute of this object. |
void |
setBaseRectangle(IltGraphicManager manager,
IlvRect newBaseRectangle)
Applies a transformation to the graphic representation in a given IltGraphicManager, attempting to make the base rectangle resemble the given rectangle. |
void |
setCenterPoint(IltGraphicManager manager,
IltGraphic graphic,
IlvPoint position,
IlpPositionSource reason)
Changes the position of the graphic representation in a given IltGraphicManager. |
void |
setDetailObjects(IltChildrenModel details)
Deprecated. Containment relationships should be declared at the Datasource level. |
void |
setDirection(int direction)
Deprecated. Please use the method setAttributeValue to
change the IltShelf.DirectionAttribute
instead. The direction has changed from
IlvDirection to IlpDirection. |
void |
setDirection(int direction,
int itemsDirection)
Deprecated. Whenever the direction of a shelf changes, all its children directions change accordingly. Update each child direction individually instead, by using the setAttributeValue method to change the
IltShelf.DirectionAttribute of each
child object. The direction has changed from
IlvDirection to IlpDirection. |
void |
setItem(int xSlotIndex,
float xSlotSpan,
int ySlotIndex,
float ySlotSpan,
IltObject item)
Deprecated. Containment relationships should be declared at the Datasource level. Please insert your shelf item in the datasource, setting it as child of this shelf. It will also be necessary to define its position within the shelf. You can do this, by setting the shelf item position attribute to a IlpShelfItemPosition |
void |
setItem(int slotIndex,
IltObject item)
Deprecated. Containment relationships should be declared at the Datasource level. Please insert your shelf item in the datasource, setting it as child of this shelf. It will also be necessary to define its position within the shelf. You can do this, by setting the shelf item position attribute to a IlpShelfItemPosition |
void |
setItem(int slotIndex,
IltObject item,
float slotSpan)
Deprecated. Containment relationships should be declared at the Datasource level. Please insert your shelf item in the datasource, setting it as child of this shelf. It will also be necessary to define its position within the shelf. You can do this, by setting the shelf item position attribute to a IlpShelfItemPosition |
void |
setItem(int xSlotIndex,
int ySlotIndex,
IltObject item)
Deprecated. Containment relationships should be declared at the Datasource level. Please insert your shelf item in the datasource, setting it as child of this shelf. It will also be necessary to define its position within the shelf. You can do this, by setting the shelf item position attribute to a IlpShelfItemPosition |
void |
setLogicalFirstIndex(int logicalFirstIndex)
Deprecated. Use the method setAttributeValue to set the
XSlotIndexAttribute attribute instead. |
void |
setOverviewObject(IltStateHolder overview)
Deprecated. Containment relationships should be declared at the Datasource level. In case of shelves, the overview object can not be changed, as it is the shelf instance itself. |
void |
setSizeOtherDimension(int sizeOtherDimension)
Changes the size of the other dimension for all the slots. |
void |
setSlotNumsOnTop(boolean slotNumsOnTop)
Deprecated. Please use the CSS property XSlotNumbersOnTop instead. |
void |
setSlotNumSpace(int slotNumSpace)
Deprecated. Please use the CSS property XSlotNumbersOffset instead. |
void |
setSlotSizes(int[] slotSizes)
Changes the number and size of slots. |
void |
setSlotSizes(int[] xSlotWidths,
int[] ySlotWidths)
Changes the number and size of the slots in both x and
y dimensions. |
void |
setSlotSizes(int slotCount,
int slotSize)
Changes the number and size of slots. |
void |
setSlotSizes(int numXSlots,
int widthXSlot,
int numYSlots,
int widthYSlot)
Changes the number of slots and their size in both x and
y dimensions. |
void |
setStatePropagator(IltStatePropagator propagator)
Deprecated. State propagation at the graphic level is not supported in the Network Component. |
void |
setTopLeftPoint(IltGraphicManager manager,
IltGraphic graphic,
IlvPoint position,
IlpPositionSource reason)
Changes the shape graphic setting. |
void |
setTopLeftPoint(IltGraphicManager manager,
IlvPoint topLeftPoint)
Deprecated. Please use setPosition instead. |
void |
setTopLeftPoint(IltGraphicManager manager,
IlvPoint topLeftPoint,
IlpPositionSource reason)
Deprecated. Please use setPosition instead. |
void |
setTopLeftPointInManager(IltGraphicManager manager,
IltGraphic graphic,
IlvPoint position,
IlpPositionSource reason)
Changes the position of the graphic representation in a given IltGraphicManager. |
void |
setType(IltShelf.Type type)
Changes the type of the shelf. |
void |
setXSlotSizes(int numXSlots,
int widthXSlot)
Changes the number of slots and their size in the x
dimension. |
void |
setYSlotSizes(int numYSlots,
int widthYSlot)
Changes the number of slots and their size in the y
dimension. |
Object |
transformPosition(IltGraphicManager manager,
Object position)
Applies the manager transformer to the position parameter. |
void |
updateFrom(IltObject other)
Updates the local cache of attributes stored in getObjectAttribute(). |
void |
updateShapeGraphicSettingInManager(IltGraphicManager manager,
IltGraphic graphic,
Object newShape,
IlpPositionSource reason)
If the graphic representation is visible, updates the shape graphic setting in manager coordinates. |
protected void |
updateSlotSizes(int[] xSlotWidths,
int[] ySlotWidths)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ilog.tgo.model.IltContainer |
|---|
setObjectState |
| Methods inherited from interface ilog.tgo.model.IltStateHolder |
|---|
addStateChangedListener, getObjectState, removeStateChangedListener |
| Field Detail |
|---|
public static IltObjectInfo metainfo
IltObject class.
public static IlpColorKey FrameColor
frameColor instead.
IltObjectCustomization.getFrameColor()public static IlpBooleanKey XSlotNumbersOnTop
XSlotNumbersOnTop instead.x axis.
The slot numbers may be positioned at the top or at the bottom of a shelf.
IltObjectCustomization.isXSlotNumbersOnTop()public static IlpIntegerKey XSlotNumbersOffset
XSlotNumbersOffset instead.X axis.It defines the distance between the slot numbering and the shelf.
IltObjectCustomization.getXSlotNumbersOffset()public static IlpStringArrayKey XSlotLabels
public static IltAttribute TypeAttribute
Attribute name: type.
Value type: IltShelf.Type.
public static IltAttribute SlotSizesAttribute
Attribute name: slotSizes.
Value type: IlpSlotSizes.
IlpSlotSizespublic static IltAttribute DirectionAttribute
Attribute name: direction.
Value type: IlpDirection.
IlpDirectionpublic static IltAttribute XSlotIndexAttribute
X axis of a shelf.
The logical first index is the initial number displayed to count the
slots, by default its value is 0 (zero).
Attribute name: xslotindex.
Value type: Integer.
public static IltAttribute XSlotFirstIndex
IltShelf.XSlotIndexAttribute instead.X axis of a shelf.
Its value is an instance of Integer.
Logical first index is the initial number displayed to count the
slots, by default its value is 0 (zero).
| Constructor Detail |
|---|
public IltShelf(Object identifier)
The shelf properties must be set using the accessors.
identifier - the identifier of this new instance
public IltShelf(IlpClass ilpClass,
Object identifier)
The shelf properties must be set using the accessors.
ilpClass - the business class of this new instance. It must be a
subclass of IltShelfidentifier - the identifier of this new instance
public IltShelf(int numXSlots,
int widthXSlot,
int numYSlots,
int widthYSlot,
int xSlotIndex)
IltShelf
with fixed-width slots.
Note: The type can be modified with setType.
numXSlots - The number of slots along the x axis.widthXSlot - The width of each slot on the x axis.numYSlots - The number of slots along the y axis.widthYSlot - The width of each slot on the y axis.xSlotIndex - Specifies the value of the first slot number
displayed below or above the shelf frame.
Numbering is sequential.
public IltShelf(int[] xSlotWidths,
int[] ySlotWidths,
int xSlotIndex)
IltShelf
with variable-width slots.
Note: The type can be modified with setType.
xSlotWidths - An array of integers, each one corresponding to the width
of a slot along the x axis. The
width of a slot can be 0.ySlotWidths - An array of integers, each one corresponding to the width
of a slot along the y axis. The
width of a slot can be 0.xSlotIndex - Specifies the value of the first slot number
displayed below or above the shelf frame.
Numbering is sequential. Slots with a width of 0
are ignored, which may lead to non-sequential numbering.
public IltShelf(int sCount,
int sWidth,
int sHeight,
int index)
IltShelf with fixed-width
slots, and with the Standard type.
Note: The type can be modified with setType.
sCount - Number of slots in the shelfsWidth - Width of the slots in the shelfsHeight - Height of the slots in the shelf. This will
also be the height of the shelf.index - Specifies the value of the first slot number
to be displayed either
below or above the shelf frame. Numbering is
sequential.
public IltShelf(int[] slotWidths,
int slotHeight,
int logicalFirstIndex)
IltShelf
with variable-width slots.
Note: The type can be modified with setType.
slotWidths - Array of integers, each one corresponding to the width of
a slot. The width of a slot can be 0.slotHeight - Height of the slots in the shelf. This will
also be the height of the shelf.logicalFirstIndex - Specifies the value of the first slot number
to be displayed
below or above the shelf frame. Numbering is
sequential. Slots with a width of 0 are
ignored, which may lead to non-sequential
numbering.| Method Detail |
|---|
public static IltObjectInfo GetIlpClass()
public static IltLegend GetClassLegend()
protected void initializeObject(IltObjectState state,
String name)
initializeObject in class IltObjectIltObject.initializeObject(ilog.tgo.model.IltObjectState, java.lang.String)
protected void initializeShelf(int countXSlot,
int slotWidth,
int countYSlot,
int slotHeight,
int xSlotIndex)
protected void initializeShelf(int[] xSlotWidths,
int[] ySlotWidths,
int xSlotIndex)
public void updateFrom(