Home » Modeling » Eclipse Layout Kernel » Unwanted child nodes resize(layout issue)
| | | |
Re: Unwanted child nodes resize [message #1766875 is a reply to message #1766861] |
Wed, 28 June 2017 12:50 |
Aurelien Didier Messages: 13 Registered: April 2015 |
Junior Member |
|
|
Here are my option and invocation (using ElkPadding) :
DiagramLayoutEngine.Parameters params = new DiagramLayoutEngine.Parameters();
params.getGlobalSettings()
.setProperty(CoreOptions.ANIMATE, animation)
.setProperty(CoreOptions.LAYOUT_ANCESTORS, false)
.setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(100d, 50d))
.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.fixed())
.setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN)
.setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE))
.setProperty(CoreOptions.PROGRESS_BAR, progressDialog)
.setProperty(CoreOptions.ZOOM_TO_FIT, zoomToFit)
.setProperty(CoreOptions.PADDING, new ElkPadding(24, 12, 12, 12))
.setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.layered.layered")
;
params.addLayoutRun().configure(ElkNode.class)
.setProperty(LayeredOptionsOpt1.SPACING_NODE_NODE, 10d)
.setProperty(LayeredOptionsOpt1.DIRECTION, Direction.RIGHT)
.setProperty(LayeredOptionsOpt1.EDGE_THICKNESS, 10d)
.setProperty(LayeredOptionsOpt1.LAYERING_STRATEGY, LayeringStrategy.NETWORK_SIMPLEX)
.setProperty(LayeredOptionsOpt1.COMPACTION_CONNECTED_COMPONENTS, true)
.setProperty(LayeredOptionsOpt1.EDGE_ROUTING, EdgeRouting.ORTHOGONAL)
.setProperty(LayeredOptionsOpt1.PADDING, new ElkPadding(24, 12, 12, 12))
.setProperty(LayeredOptionsOpt1.LAYERING_NODE_PROMOTION_STRATEGY, NodePromotionStrategy.NONE)
.setProperty(LayeredOptionsOpt1.NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY, NodeFlexibility.NONE)
.setProperty(LayeredOptionsOpt1.NODE_SIZE_CONSTRAINTS, SizeConstraint.fixed())
.setProperty(LayeredOptionsOpt1.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE))
.setProperty(LayeredOptionsOpt1.PORT_BORDER_OFFSET, 0d)
.setProperty(LayeredOptionsOpt1.SPACING_COMPONENT_COMPONENT, 0d)
.setProperty(LayeredOptionsOpt1.SPACING_NODE_NODE, 0d)
.setProperty(LayeredOptionsOpt1.BOX_PACKING_MODE, PackingMode.SIMPLE)
.setProperty(LayeredOptionsOpt1.LAYERING_LAYER_CONSTRAINT, LayerConstraint.NONE)
.setProperty(LayeredOptionsOpt1.PORT_LABELS_PLACEMENT, PortLabelPlacement.INSIDE)
;
DiagramLayoutEngine.invokeLayout(editorPart, diagramPart, null, params);
|
|
|
Goto Forum:
Current Time: Mon Sep 09 15:25:19 GMT 2024
Powered by FUDForum. Page generated in 0.04796 seconds
|