Skip to content
Snippets Groups Projects
Commit 399b8b92 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

added node layout creation

refs 214
parent fe574773
No related branches found
No related tags found
No related merge requests found
......@@ -34,14 +34,26 @@ import org.fortiss.tooling.base.model.layout.Points;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: F89151582818B77DAA804D5042AF68F7
* @ConQAT.Rating YELLOW Hash: E84D6730B2F452D7DD81165E6C195730
*/
public final class LayoutModelElementFactory {
/** Creates a model element node layout. */
public static void createNodeElementLayout(ILayoutedModelElement layouted) {
PointUtils.setPoint(layouted, LayoutKeyConstants.NODE_POSITION, 0, 0);
DimensionUtils.setDimension(layouted,
LayoutKeyConstants.NODE_DIMENSION,
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH,
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT);
}
/** Creates a connector layout. */
public static void createConnectorLayout(ILayoutedModelElement lo) {
PointUtils.setPoint(lo, LayoutKeyConstants.NODE_POSITION, 0, 0);
public static void createConnectorLayout(ILayoutedModelElement layouted) {
PointUtils.setPoint(layouted, LayoutKeyConstants.NODE_POSITION, 0, 0);
DimensionUtils.setDimension(lo, LayoutKeyConstants.NODE_DIMENSION,
DimensionUtils.setDimension(layouted,
LayoutKeyConstants.NODE_DIMENSION,
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH,
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT);
......@@ -51,15 +63,15 @@ public final class LayoutModelElementFactory {
Dimension cdim = LayoutModelElementFactory.createDimension(0, 0,
LayoutKeyConstants.CONNECTOR_DIMENSION);
lo.getLayoutDataList().add(cpos);
lo.getLayoutDataList().add(cdim);
layouted.getLayoutDataList().add(cpos);
layouted.getLayoutDataList().add(cdim);
}
/** Creates a new connection layout. */
public static void createConnectionLayout(ILayoutedModelElement lo) {
public static void createConnectionLayout(ILayoutedModelElement layouted) {
Points points = LayoutModelElementFactory
.createPoints(LayoutKeyConstants.CONNECTION_POINTS);
lo.getLayoutDataList().add(points);
layouted.getLayoutDataList().add(points);
}
/** Creates a new {@link Angle}. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment