Fixed anchor points in old implemented diagrams [message #1231277] |
Tue, 14 January 2014 08:46 |
|
Hello all,
I have changed in my gmf diagrams for each ShapeNodeEditPart inherited element to have in the createNodePlate() method a custom DefaultSizeNodeFigure with fixed points:
protected NodeFigure createNodePlate() {
HashMap<String, PrecisionPoint> anchorLocations = new HashMap<String, PrecisionPoint>();
anchorLocations.put("WEST", new PrecisionPoint(0, 0.5d));
anchorLocations.put("EAST", new PrecisionPoint(1d, 0.5d));
anchorLocations.put("NORTH", new PrecisionPoint(0.5d, 0));
anchorLocations.put("SOUTH", new PrecisionPoint(0.5d, 1d));
DefaultSizeNodeFigureWithFixedAnchors result = new DefaultSizeNodeFigureWithFixedAnchors(
40, 40, anchorLocations);
return result;
}
It works as expected, but the previously modeled diagrams with no restriction to the anchor points will not display the connections.
In order to achieve this, I have to select "Arrange all" but this will mess the display of the diagram, the way the elements were drawn.
If some of you experienced this and have any idea, please leave a hint. Thank you!
|
|
|
Powered by
FUDForum. Page generated in 0.03065 seconds