|
|
Re: Node Resize when doing auto layout [message #1727993 is a reply to message #1727991] |
Wed, 30 March 2016 06:56 |
|
Example:
public class MyLayoutConnector extends GmfDiagramLayoutConnector {
...
protected KNode createNode(LayoutMapping mapping, ShapeNodeEditPart nodeEditPart,
IGraphicalEditPart parentEditPart, KNode parentKNode, Maybe<KInsets> kinsets) {
KNode node = super.createNode(mapping, nodeEditPart, parentEditPart, parentKNode, kinsets);
if (nodeEditPart instanceof MySpecialEditPart) {
KShapeLayout shapeLayout = node.getData(KShapeLayout.class);
shapeLayout.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.fixed());
}
return node;
}
}
But beware! This is a very early stage of ELK and the APIs are likely to change further in the course of this year.
[Updated on: Wed, 30 March 2016 06:58] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03923 seconds