public class IlvCompositeRenderer extends IlvInteractorRenderer
IlvCompositeRenderer
manages IlvSDMCompositeNode
and IlvSDMCompositeLink
.
In particular this renderer allows to :
LinkConnectionRectangle
This property is defined on the objects of type node.
IlvCompositeGraphic.getChildren(int)
The links will be connected to the nearest edge of the bounding box of the child
at the position defined by this property.
FromCompositePin
: Connects the origin of a link to a decoration.
ToCompositePin
: Connects the destination of a link to a decoration
FromCompositePinPosition
: Connects the origin to this position of the decoration
ToCompositePinPosition
: Connects the destination to this position of the decoration
Here is an example of using the rendering property LinkConnectionRectangle
SDM { Composite : true; } node { class : "ilog.views.graphic.composite.IlvCompositeGraphic" ; children[0]:@+base; children[1]:@+label; constraints[1]:@=attachmentLabel; LinkConnectionRectangle:0; } Subobject#base { class : ilog.views.sdm.graphic.IlvGraphicFactories$Rectangle; IlvRect : 0,0,40,40; } Subobject#attachmentLabel { class : "ilog.views.graphic.composite.layout.IlvAttachmentConstraint" ; hotSpot:TopCenter; anchor:BottomCenter; offset:0,3; } Subobject#label { class : ilog.views.sdm.graphic.IlvGraphicFactories$ZoomableLabel; IlvRect : 0,0,100,100; label:@label; foreground:black; name:"label"; }
This example shows how to build the following composite graphics
using the rendering properties From/ToCompositePin
, and From/ToCompositePinPosition
:
>
SDM { Composite: "true"; } node { class:"ilog.views.sdm.graphic.IlvSDMCompositeNode"; children[0]:@+rect; children[1]:@+decoration; constraints[1]:@=attachmentDecoration; } Subobject#rect { class : ilog.views.sdm.graphic.IlvGraphicFactories$Rectangle; IlvRect : 0,0,40,40; background:red; fillOn:true; } Subobject#decoration { class : ilog.views.sdm.graphic.IlvGraphicFactories$Rectangle; IlvRect : 0,0,5,5; background:yellow; fillOn:true; name:"decoration"; // We give a name to the graphic and use this name below } Subobject#attachmentDecoration { class : "ilog.views.graphic.composite.layout.IlvAttachmentConstraint" ; hotSpot:Center; anchor:RightCenter; offset : "20,20"; } link { class : ilog.views.sdm.graphic.IlvGeneralLink; arrowColor : '153,0,51'; arrowRatio : 4; lineStyle : 0; lineWidth : 1; endCap : CAP_BUT ; foreground : '153,0,51'; lineJoin : JOIN_ROUND; mode : MODE_UNICOLOR; oriented : true; NodeSideForOrigin : Bottom; NodeSideForDestination : Top; } link { FromCompositePin:"decoration"; // use the name defined above FromCompositePinPosition:"Center"; ToCompositePin:"decoration"; // use the name defined above ToCompositePinPosition:"Center"; }CSS example:
Composite {
class : "ilog.views.sdm.renderer.IlvCompositeRenderer";
alias : "<value>";
interactor : "<value>";
parameter : "<value>";
processMouseMoveEvents : "false";
}
IlvInteractorRenderer
Modifier and Type | Property and Description |
---|---|
java.lang.String |
alias
Sets the alias of this renderer. |
java.lang.String |
class
Default constructor. |
java.lang.String |
interactor
Changes the interactor that will be put on the graphic objects created by the filtered renderer. |
java.lang.String |
parameter
This method calls #setInteractor . |
boolean |
processMouseMoveEvents
Sets the processMouseMoveEvents to set. |
public java.lang.String class
class : "ilog.views.sdm.renderer.IlvCompositeRenderer";
public java.lang.String alias
SubGraph
or GraphLayout
.
alias : "<value>";
public java.lang.String interactor
interactor : "<value>";
public java.lang.String parameter
#setInteractor
. So, you can
simply customize the interactor renderer as follows:
SDM { Interactor : "ilog.views.objectinteractor.IlvButtonInteractor"; }CSS example:
parameter : "<value>";
public boolean processMouseMoveEvents
processMouseMoveEvents : "false";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.