Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java
index 0fb482deddb..7ce1087c4d8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java
@@ -290,13 +290,22 @@ public abstract class PapyrusLabelEditPart extends LabelEditPart {
// get the value of the CSS property
Object model = getModel();
if (model instanceof View) {
- boolean labelConstrained = NotationUtils.getBooleanValue((View) getModel(), LABEL_CONSTRAINED, getDefaultLabelConstrained());
// set the value on the locator
- ((IPapyrusBorderItemLocator) getBorderItemLocator()).setConstrained(labelConstrained);
+ ((IPapyrusBorderItemLocator) getBorderItemLocator()).setConstrained(isLabelConstrained());
}
}
/**
+ * Checks if is label constrained.
+ *
+ * @return true, if the label is constrained
+ */
+ public boolean isLabelConstrained() {
+ boolean labelConstrained = NotationUtils.getBooleanValue((View) getModel(), LABEL_CONSTRAINED, getDefaultLabelConstrained());
+ return labelConstrained;
+ }
+
+ /**
* Gets the default label offset y.
*
* @return the default label offset y

Back to the top