diff --git a/com.archimatetool.canvas/src/com/archimatetool/canvas/figures/CanvasBlockFigure.java b/com.archimatetool.canvas/src/com/archimatetool/canvas/figures/CanvasBlockFigure.java index b1ce6bb87..7603e1568 100644 --- a/com.archimatetool.canvas/src/com/archimatetool/canvas/figures/CanvasBlockFigure.java +++ b/com.archimatetool.canvas/src/com/archimatetool/canvas/figures/CanvasBlockFigure.java @@ -26,6 +26,7 @@ import com.archimatetool.editor.diagram.figures.TextPositionDelegate; import com.archimatetool.editor.ui.ColorFactory; import com.archimatetool.editor.utils.StringUtils; +import com.archimatetool.model.IDiagramModelObject; /** @@ -171,7 +172,7 @@ private void drawFigure(Graphics graphics, Color background) { drawIconImage(graphics, bounds); // Border - if(getBorderColor() != null) { + if(getBorderColor() != null && getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { graphics.setAlpha(getLineAlpha()); graphics.setForegroundColor(getBorderColor()); graphics.drawRectangle(bounds.x, bounds.y, bounds.width, bounds.height); diff --git a/com.archimatetool.editor/img/line-none.png b/com.archimatetool.editor/img/line-none.png new file mode 100644 index 000000000..b531aec81 Binary files /dev/null and b/com.archimatetool.editor/img/line-none.png differ diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/commands/DiagramModelObjectLineStyleCommand.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/commands/DiagramModelObjectLineStyleCommand.java index c014869a1..39662bba9 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/commands/DiagramModelObjectLineStyleCommand.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/commands/DiagramModelObjectLineStyleCommand.java @@ -27,7 +27,7 @@ public DiagramModelObjectLineStyleCommand(IDiagramModelObject dmo, int style) { @Override public boolean canExecute() { - return super.canExecute() && style >= IDiagramModelObject.LINE_STYLE_SOLID && style <= IDiagramModelObject.LINE_STYLE_DOTTED; + return super.canExecute() && style >= IDiagramModelObject.LINE_STYLE_SOLID && style <= IDiagramModelObject.LINE_STYLE_NONE; } /** diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/AbstractFigureDelegate.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/AbstractFigureDelegate.java index 96dc34cf4..ccf293c4e 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/AbstractFigureDelegate.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/AbstractFigureDelegate.java @@ -129,6 +129,10 @@ protected void setLineWidth(Graphics graphics, int lineWidth, Rectangle bounds) getOwner().setLineWidth(graphics, lineWidth, bounds); } + protected int getLineStyle() { + return getOwner().getLineStyle(); + } + /** * Set line style * @param graphics diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/EllipseFigureDelegate.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/EllipseFigureDelegate.java index 9c91125ea..84b9a908a 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/EllipseFigureDelegate.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/EllipseFigureDelegate.java @@ -9,6 +9,8 @@ import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.swt.graphics.Pattern; +import com.archimatetool.model.IDiagramModelObject; + /** @@ -51,9 +53,11 @@ public void drawFigure(Graphics graphics) { disposeGradientPattern(graphics, gradient); // Outline - graphics.setAlpha(getLineAlpha()); - graphics.setForegroundColor(getLineColor()); - graphics.drawOval(bounds); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.setForegroundColor(getLineColor()); + graphics.drawOval(bounds); + } // Image Icon Rectangle imageArea = new Rectangle(bounds.x + (bounds.width / 6), bounds.y + (bounds.height / 6), diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RectangleFigureDelegate.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RectangleFigureDelegate.java index 8217407cc..186a0fa11 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RectangleFigureDelegate.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RectangleFigureDelegate.java @@ -9,6 +9,8 @@ import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.swt.graphics.Pattern; +import com.archimatetool.model.IDiagramModelObject; + /** @@ -52,9 +54,11 @@ public void drawFigure(Graphics graphics) { disposeGradientPattern(graphics, gradient); // Outline - graphics.setAlpha(getLineAlpha()); - graphics.setForegroundColor(getLineColor()); - graphics.drawRectangle(bounds); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.setForegroundColor(getLineColor()); + graphics.drawRectangle(bounds); + } // Icon // getOwner().drawIconImage(graphics, bounds); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RoundedRectangleFigureDelegate.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RoundedRectangleFigureDelegate.java index 368276d99..88cc755de 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RoundedRectangleFigureDelegate.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/RoundedRectangleFigureDelegate.java @@ -10,6 +10,8 @@ import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.swt.graphics.Pattern; +import com.archimatetool.model.IDiagramModelObject; + @@ -57,9 +59,11 @@ public void drawFigure(Graphics graphics) { disposeGradientPattern(graphics, gradient); // Outline - graphics.setAlpha(getLineAlpha()); - graphics.setForegroundColor(getLineColor()); - graphics.drawRoundRectangle(bounds, fArc.width, fArc.height); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.setForegroundColor(getLineColor()); + graphics.drawRoundRectangle(bounds, fArc.width, fArc.height); + } // Image Icon Rectangle imageArea = new Rectangle(bounds.x + 2, bounds.y + 2, bounds.width - 4, bounds.height - 4); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/DiagramImageFigure.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/DiagramImageFigure.java index ea18e069e..8b1c1dfd2 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/DiagramImageFigure.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/DiagramImageFigure.java @@ -23,6 +23,7 @@ import com.archimatetool.editor.ui.IArchiImages; import com.archimatetool.editor.ui.ImageFactory; import com.archimatetool.model.IDiagramModelImage; +import com.archimatetool.model.IDiagramModelObject; /** @@ -130,7 +131,7 @@ protected void paintFigure(Graphics graphics) { } // Border - if(getBorderColor() != null) { + if(getBorderColor() != null && getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { graphics.setAlpha(getDiagramModelObject().getLineAlpha()); graphics.setForegroundColor(getBorderColor()); graphics.drawRectangle(bounds.x, bounds.y, bounds.width, bounds.height); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/GroupFigure.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/GroupFigure.java index 88d134fdc..8e5b93147 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/GroupFigure.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/GroupFigure.java @@ -111,18 +111,20 @@ protected void drawFigure(Graphics graphics) { } // Line - graphics.setForegroundColor(getLineColor()); - graphics.setAlpha(getLineAlpha()); - - Path path = new Path(null); - path.moveTo(bounds.x, bounds.y + tabHeight); - path.lineTo(bounds.x, bounds.y); - path.lineTo(bounds.x + tabWidth, bounds.y); - path.lineTo(bounds.x + tabWidth, bounds.y + tabHeight); - graphics.drawPath(path); - path.dispose(); - - graphics.drawRectangle(bounds.x, bounds.y + tabHeight, bounds.width, bounds.height - tabHeight); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setForegroundColor(getLineColor()); + graphics.setAlpha(getLineAlpha()); + + Path path = new Path(null); + path.moveTo(bounds.x, bounds.y + tabHeight); + path.lineTo(bounds.x, bounds.y); + path.lineTo(bounds.x + tabWidth, bounds.y); + path.lineTo(bounds.x + tabWidth, bounds.y + tabHeight); + graphics.drawPath(path); + path.dispose(); + + graphics.drawRectangle(bounds.x, bounds.y + tabHeight, bounds.width, bounds.height - tabHeight); + } } else { graphics.setBackgroundColor(getFillColor()); @@ -139,9 +141,11 @@ protected void drawFigure(Graphics graphics) { } // Line - graphics.setForegroundColor(getLineColor()); - graphics.setAlpha(getLineAlpha()); - graphics.drawRectangle(bounds); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setForegroundColor(getLineColor()); + graphics.setAlpha(getLineAlpha()); + graphics.drawRectangle(bounds); + } } graphics.popState(); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/NoteFigure.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/NoteFigure.java index 72a236816..cb5078983 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/NoteFigure.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/diagram/NoteFigure.java @@ -25,6 +25,7 @@ import com.archimatetool.editor.diagram.figures.TextPositionDelegate; import com.archimatetool.editor.ui.textrender.TextRenderer; import com.archimatetool.model.IDiagramModelNote; +import com.archimatetool.model.IDiagramModelObject; /** @@ -151,7 +152,7 @@ protected void paintFigure(Graphics graphics) { // Icon drawIconImage(graphics, bounds); - if(getDiagramModelObject().getBorderType() != IDiagramModelNote.BORDER_NONE) { + if(getDiagramModelObject().getBorderType() != IDiagramModelNote.BORDER_NONE && getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { graphics.setAlpha(getLineAlpha()); graphics.setForegroundColor(getLineColor()); graphics.drawPolygon(points); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/AbstractMotivationFigure.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/AbstractMotivationFigure.java index 0d7f4071b..0d6728f1f 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/AbstractMotivationFigure.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/AbstractMotivationFigure.java @@ -13,6 +13,7 @@ import com.archimatetool.editor.diagram.figures.AbstractTextControlContainerFigure; import com.archimatetool.editor.diagram.figures.FigureUtils; +import com.archimatetool.model.IDiagramModelObject; /** @@ -76,9 +77,11 @@ protected void drawFigure(Graphics graphics) { disposeGradientPattern(graphics, gradient); // Line - graphics.setAlpha(getLineAlpha()); - graphics.setForegroundColor(getLineColor()); - graphics.drawPolygon(points); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.setForegroundColor(getLineColor()); + graphics.drawPolygon(points); + } // Image Icon Rectangle imageArea = new Rectangle(bounds.x + FLANGE / 2, bounds.y + FLANGE / 2, bounds.width - FLANGE, bounds.height - FLANGE); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/GroupingFigure.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/GroupingFigure.java index ebd4c7787..b3fce0176 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/GroupingFigure.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/elements/GroupingFigure.java @@ -18,6 +18,7 @@ import com.archimatetool.editor.diagram.figures.AbstractTextControlContainerFigure; import com.archimatetool.editor.diagram.figures.FigureUtils; +import com.archimatetool.model.IDiagramModelObject; import com.archimatetool.model.ITextAlignment; import com.archimatetool.model.ITextPosition; @@ -131,17 +132,21 @@ protected void drawFigure(Graphics graphics) { drawIconImage(graphics, bounds); } - graphics.setAlpha(getLineAlpha()); - graphics.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + tabHeight); - graphics.drawLine(bounds.x, bounds.y, bounds.x + tabWidth, bounds.y); - graphics.drawLine(bounds.x + tabWidth, bounds.y, bounds.x + tabWidth, bounds.y + tabHeight); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + tabHeight); + graphics.drawLine(bounds.x, bounds.y, bounds.x + tabWidth, bounds.y); + graphics.drawLine(bounds.x + tabWidth, bounds.y, bounds.x + tabWidth, bounds.y + tabHeight); + } } disposeGradientPattern(graphics, gradient); // Outlines - graphics.setAlpha(getLineAlpha()); - graphics.drawPolygon(mainRectangle); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.drawPolygon(mainRectangle); + } graphics.popState(); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/sketch/figures/StickyFigure.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/sketch/figures/StickyFigure.java index 66caf75d9..6571622a5 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/sketch/figures/StickyFigure.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/sketch/figures/StickyFigure.java @@ -12,6 +12,7 @@ import com.archimatetool.editor.diagram.figures.AbstractTextControlContainerFigure; import com.archimatetool.editor.utils.StringUtils; +import com.archimatetool.model.IDiagramModelObject; import com.archimatetool.model.ISketchModelSticky; @@ -65,9 +66,11 @@ protected void drawFigure(Graphics graphics) { drawIconImage(graphics, bounds); // Outline - graphics.setAlpha(getLineAlpha()); - graphics.setForegroundColor(getLineColor()); - graphics.drawRectangle(bounds.x, bounds.y, bounds.width, bounds.height); + if(getLineStyle() != IDiagramModelObject.LINE_STYLE_NONE) { + graphics.setAlpha(getLineAlpha()); + graphics.setForegroundColor(getLineColor()); + graphics.drawRectangle(bounds.x, bounds.y, bounds.width, bounds.height); + } graphics.popState(); } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineStyleComposite.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineStyleComposite.java index d667883b9..d8acd2e70 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineStyleComposite.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineStyleComposite.java @@ -62,6 +62,7 @@ private void createControls(Composite parent) { menuManager.add(createAction(Messages.LineStyleComposite_1, IDiagramModelObject.LINE_STYLE_SOLID, IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.LINE_SOLID))); menuManager.add(createAction(Messages.LineStyleComposite_2, IDiagramModelObject.LINE_STYLE_DASHED, IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.LINE_DASHED))); menuManager.add(createAction(Messages.LineStyleComposite_3, IDiagramModelObject.LINE_STYLE_DOTTED, IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.LINE_DOTTED))); + menuManager.add(createAction(Messages.LineStyleComposite_4, IDiagramModelObject.LINE_STYLE_NONE, IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.LINE_NONE))); Menu menu = menuManager.createContextMenu(button.getShell()); Rectangle buttonBounds = button.getBounds(); @@ -133,6 +134,9 @@ void updateControl() { case IDiagramModelObject.LINE_STYLE_DOTTED: button.setImage(IArchiImages.ImageFactory.getImage(IArchiImages.LINE_DOTTED)); break; + case IDiagramModelObject.LINE_STYLE_NONE: + button.setImage(IArchiImages.ImageFactory.getImage(IArchiImages.LINE_NONE)); + break; } button.setEnabled(!section.isLocked(dmo)); diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/Messages.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/Messages.java index 7664a71ce..b45e3ad65 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/Messages.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/Messages.java @@ -255,6 +255,8 @@ public class Messages extends NLS { public static String LineStyleComposite_3; + public static String LineStyleComposite_4; + public static String LineWidthSection_0; public static String LineWidthSection_1; diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/messages.properties b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/messages.properties index 12a73676d..e933a254b 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/messages.properties +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/messages.properties @@ -133,6 +133,7 @@ LineStyleComposite_0=Line Style: LineStyleComposite_1=Solid LineStyleComposite_2=Dashed LineStyleComposite_3=Dotted +LineStyleComposite_4=None LineWidthSection_0=Line Width: LineWidthSection_1=Normal LineWidthSection_2=Medium diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/ui/IArchiImages.java b/com.archimatetool.editor/src/com/archimatetool/editor/ui/IArchiImages.java index 0662f3156..bf7c2cd06 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/ui/IArchiImages.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/ui/IArchiImages.java @@ -192,6 +192,7 @@ public interface IArchiImages { String LINE_SOLID = IMGPATH + "line-solid.png"; String LINE_DASHED = IMGPATH + "line-dashed.png"; String LINE_DOTTED = IMGPATH + "line-dotted.png"; + String LINE_NONE = IMGPATH + "line-none.png"; String ARROW_SOURCE_FILL = IMGPATH + "arrow-source-fill.png"; String ARROW_TARGET_FILL = IMGPATH + "arrow-target-fill.png"; diff --git a/com.archimatetool.help/help/Text/properties_canvas_block.html b/com.archimatetool.help/help/Text/properties_canvas_block.html index bd02ec19f..df4c2114d 100644 --- a/com.archimatetool.help/help/Text/properties_canvas_block.html +++ b/com.archimatetool.help/help/Text/properties_canvas_block.html @@ -92,7 +92,7 @@