Skip to content
Snippets Groups Projects
Commit ad5a4afe authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

small fix

parent 568d11bb
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ import static org.fortiss.tooling.base.utils.AngleUtils.setAngle;
import static org.fortiss.tooling.base.utils.DimensionUtils.getDimension;
import static org.fortiss.tooling.base.utils.DimensionUtils.setDimension;
import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createAngle;
import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createDimension;
import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createOffsetOrientation;
import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createPoint;
import static org.fortiss.tooling.base.utils.LayoutModelElementFactory.createPoints;
......@@ -77,7 +78,7 @@ import org.fortiss.tooling.base.utils.LayoutModelElementFactory;
* @author hummel
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 8E566392E23F3AC734D13D27DD3D1057
* @ConQAT.Rating YELLOW Hash: B28D9B7FDEEEEF8D1C65392D75AC362B
*/
public class LayoutDataUtils {
......@@ -195,7 +196,7 @@ public class LayoutDataUtils {
setPoint(layouted, CONNECTOR_POSITION, x, y);
}
/** Returns the layouted connector's orientation. */
/** Returns the layouted connector's offset-orientation. */
public static OffsetOrientation getConnectorOffsetOrientation(
ILayoutedModelElement layouted) {
OffsetOrientation oo = getOffsetOrientation(layouted,
......@@ -207,6 +208,13 @@ public class LayoutDataUtils {
return oo;
}
/** Returns the layouted connector's orientation. */
public static EOrientation getConnectorOrientation(
ILayoutedModelElement layouted) {
return getOffsetOrientation(layouted, CONNECTOR_OFFSET_ORIENTATION)
.getOrientation();
}
/** Sets the layouted connector's offset and orientation. */
public static void setConnectorOffsetOrientation(
ILayoutedModelElement layouted, OffsetOrientation orientation) {
......@@ -244,7 +252,21 @@ public class LayoutDataUtils {
return getConnectorAngle(lobject).getAngle();
}
/** Return the absolute position for a given offset, orientation and insets. */
/**
* Return the absolute position for a given offset, orientation, size of the
* parent and insets.
*/
public static Point getAbsolute(OffsetOrientation oo,
Rectangle parentBounds, int parentInsets) {
Dimension d = createDimension(parentBounds.width, parentBounds.height,
"");
return getAbsolute(oo, d, parentInsets);
}
/**
* Return the absolute position for a given offset, orientation, size of the
* parent and insets.
*/
public static Point getAbsolute(OffsetOrientation oo, Dimension parentSize,
int parentInsets) {
Point pos = createPoint(0, 0, null);
......
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