Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
index 3517c36eee8..305dc4da1f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
@@ -184,6 +184,37 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
}
+
+ public void restoreStereotypeLabel() {
+ stereotypesLabel.setOpaque(false);
+ getStereotypeLabelContainer().add(stereotypesLabel, getStereotypeLabelConstraint(), getStereotypePropertiesLabelPosition());
+ }
+
+
+ /**
+ * Create a label that contains the stereotype of the element.
+ */
+ public void removeStereotypeLabel() {
+ if(getStereotypeLabelContainer().getChildren().contains(stereotypesLabel)) {
+ getStereotypeLabelContainer().remove(stereotypesLabel);
+ }
+ }
+
+
+ public void restoreTaggedLabel() {
+ taggedLabel.setOpaque(false);
+ getTagLabelContainer().add(taggedLabel, getTagLabelConstraint(), 0);
+ }
+
+
+ /**
+ * Create a label that contains the stereotype of the element.
+ */
+ public void removeTaggedLabel() {
+ if(getTagLabelContainer().getChildren().contains(taggedLabel)) {
+ getTagLabelContainer().remove(taggedLabel);
+ }
+ }
/**
* Get the constraint for adding the name label. Children should override
* and implement this method in case the label must be drawn with a specific

Back to the top