diff options
6 files changed, 33 insertions, 25 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css index 05b5e75590e..f0ccc0c2a97 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css @@ -131,6 +131,19 @@ ActivityDiagram Activity *,InteractionOverviewDiagram Activity * { elementIcon:false;
}
+/* no gradiant for symbol to permit to change color */
+ActivityDiagram MergeNode,
+ActivityDiagram InitialNode,
+ActivityDiagram ActivityFinalNode,
+ActivityDiagram FlowFinalNode,
+ActivityDiagram DecisionNode,
+ActivityDiagram SendSignalAction,
+ActivityDiagram AcceptEventAction
+{
+ gradient:none;
+ fillColor:white;
+}
+
ClassDiagram Dependency{
fillColor:Black;
gradient:none;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css index 1e1cfcfbbd5..b148a3d1817 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css @@ -303,18 +303,18 @@ StateMachineDiagram Pseudostate[kind="choice"]{ /*---------- Composite Diagram ---------*/ -CompositeDiagram Property[aggregation="shared"]{ +CompositeStructureDiagram Property[aggregation="shared"]{ borderStyle: custom; } -CompositeDiagram DurationObservation > Compartment[kind="symbol"], -CompositeDiagram TimeObservation > Compartment[kind="symbol"] +CompositeStructureDiagram DurationObservation > Compartment[kind="symbol"], +CompositeStructureDiagram TimeObservation > Compartment[kind="symbol"] { visible:true; } -CompositeDiagram DurationObservation > Label, -CompositeDiagram TimeObservation > Label +CompositeStructureDiagram DurationObservation > Label, +CompositeStructureDiagram TimeObservation > Label { visible:true; textAlignment:"Left"; diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java index 4a3f5585307..29e2b1fe442 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java @@ -39,9 +39,6 @@ public class BorderedScalableImageFigure extends ScalableImageFigure { public BorderedScalableImageFigure(RenderedImage renderedImage, boolean useDefaultImageSize, boolean useOriginalColors, boolean antiAlias) { super(renderedImage, useDefaultImageSize, useOriginalColors, antiAlias); - - // setBorder(new LineBorder(ColorConstants.red, 1)); - // set a layout manager to override maintain ratio behavior setLayoutManager(new BorderedLayoutManager()); } @@ -51,20 +48,9 @@ public class BorderedScalableImageFigure extends ScalableImageFigure { // Get the parent bounds Rectangle parentBounds = getParent().getBounds().getCopy(); - // IRoundedRectangleFigure parentFigure = FigureUtils.findParentFigureInstance(this, IRoundedRectangleFigure.class); - // if (parentFigure != null) { - // // IRoundedRectangleFigure parentFigure = (IRoundedRectangleFigure) getParent(); - // // manual management of use UseOriginalColors to permit to change - // if (!parentFigure.getUseOriginalColors()) { // Set the color from the color of the parent setBackgroundColor(getParent().getBackgroundColor()); setForegroundColor(getParent().getForegroundColor()); - // } else { - // // Set the color to the original color - // setBackgroundColor(ColorConstants.yellow); - // setForegroundColor(ColorConstants.red); - // } - // } // set the clip of the graphics to the parent clip graphics.setClip(parentBounds); diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java index 599cdf4af8f..5a05cc34ef9 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java @@ -32,7 +32,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils; public abstract class PapyrusRoundedEditPartHelper { /** The Constant HAS_HEADER. */ - public static final String HAS_HEADER = "diplayHeader"; + public static final String HAS_HEADER = "displayHeader";//$NON-NLS-N$ /** The Constant USE_ORIGINAL_COLORS. */ private static final String USE_ORIGINAL_COLORS = "useOriginalColors";//$NON-NLS-N$ diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java index 0a18f5b1487..45988d93fe7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java @@ -136,7 +136,13 @@ public class PortPositionLocator implements IBorderItemLocator { ConnectionAnchor connectionAnchor = ((SVGNodePlateFigure) parentFigure).getConnectionAnchor(""); // Get the location point, with anchor. - ((SlidableRoundedRectangleAnchor) connectionAnchor).setOffset(getPortOffset()); + + // get the offset depending of the position of the port (inside, outside or onLine) + Dimension offset = getPortOffset().getCopy(); + parentFigure.translateToAbsolute(offset); + + ((SlidableRoundedRectangleAnchor) connectionAnchor).setOffset(offset); + Point locationForPort = ((SlidableRoundedRectangleAnchor) connectionAnchor).getLocation(parentRec.getCenter(), proposedLocation.getLocation()); ((SlidableRoundedRectangleAnchor) connectionAnchor).setOffset(new Dimension()); if (locationForPort != null) { @@ -222,8 +228,8 @@ public class PortPositionLocator implements IBorderItemLocator { portOffset.width = -figure.getBounds().width / 2; portOffset.height = -figure.getBounds().height / 2; } else if ("outside".equals(position)) { - portOffset.width = figure.getBounds().width / 2; - portOffset.height = figure.getBounds().height / 2; + portOffset.width = figure.getBounds().width / 2 - 1; + portOffset.height = figure.getBounds().height / 2 - 1; } // Else onLine: no offset is applied and the port is on the line. } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java index 5756ef7e19c..41b855c7dfc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java @@ -552,8 +552,11 @@ public class RoundedRectangleLabelPositionLocator extends ExternalLabelPositionL // proposedBounds.setSize(target.getPreferredSize());//To block the Label // target.setBounds(proposedBounds);//To block the Label - super.relocate(target); - // target.setBounds(new Rectangle(getPreferredLocation(target), size)); + if (!getFloatingItemOffset().equals(new Dimension())) { + target.setBounds(new Rectangle(getPreferredLocation(target), size)); + } else { + super.relocate(target); + } } else { Rectangle rectSuggested = new Rectangle(getPreferredLocation(target), size); |