skip to main content
Programmers documentation > Integrating with JViews Diagrammer > Attribute binding > Predefined attribute bindings
 
Predefined attribute bindings
You can use the following predefined bindings:
*IlpDefaultAttributeBinding: Defines a pass-through binding (it supports READ_WRITE).
*IlpEnumBinding: Defines a binding between IlEnum and String (it supports READ_WRITE).
*IlpPointPositionBinding: Defines a binding between IlpPoint and either “x” or “y” property (it supports READ_WRITE).
*IlpPolylinePositionBinding: Defines a binding between IlpPolyline and either “x” or “y” property, based on the center of gravity of the polyline (it supports READ_WRITE).
*IlpPolygonePositionBinding: Defines a binding between IlpPolygone and either “x” or “y” property, based on the center of gravity of the polygon (it supports READ_WRITE).
*IlpRectPositionBinding: Defines a binding between IlpRect and either “x” or “y” property, based on the center of gravity of the rectangle (it supports READ_WRITE).
*IlpRelativePointPositionBinding: Defines a binding between the position of a card item (IltLed or IltPort) and either “x” or “y” property. Because relative positioning has no meaning within JViews Diagrammer, this binding will convert IlpRelativePoint to “null” when the element is inside a card.
*IlpShelfItemPositionBinding: Defines a binding between the position of a shelf item (IltCard or IltCardCarrier) and either “x” or “y” property. Because relative positioning has no meaning within JViews Diagrammer, this binding will convert IlpShelfItemPosition to “null”.
*IlpSlotSizesBinding: Defines a binding between IlpSlotSizes and either “width” or “height” property. Because shelf dimensions have no meaning within JViews Diagrammer, this binding will only stretch slots (it supports READ_WRITE).
Example
The following example illustrates how to use IlpDefaultAttributeBinding to create a binding between the JViews TGO attribute name (available for all predefined business objects) and the SDM property label.
// Create the binding
IlpDefaultAttributeBinding nameBinding =
   new IlpDefaultAttributeBinding(IlpDefaultAttributeBinding.Type.READ_WRITE,
                                  ”name”, String.class, ”label”);
 
// Add binding to adapter
IlpAbstractSDMAdapter adapter = ...
adapter.addAttributeBinding(IltObject.GetIlpClass(), nameBinding);
The method IlpDefaultAttributeBinding.addDefaultBindings() can be used to automatically set all default bindings at once.
NOTE The TGO-SDM adapter does not provide any default binding for JViews TGO geographic positions, but this kind of binding can be achieved by extending IlpAbstractAttributeBinding to implement a position converter that fits the user needs.
NOTE JViews TGO relative positions such as IlpSlotSizes, IlpShelfItemPosition, and IlpRelativePoint are specific to the way JViews TGO renders them. The TGO-SDM adapter does not convert these positions to the SDM model as these values have no meaning for a JViews Diagrammer view. Users can customize the predefined position attribute bindings to perform a position conversion that fits their needs.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.