Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-10-26 06:26:25 -0400
committerHenrik Rentz-Reichert2011-10-26 06:26:25 -0400
commitde4f75412073a35375435f5c2fa8a5b2ee1fc996 (patch)
treea17207e240a02daf11e548a5ccbff3f91bccb9d0 /plugins/org.eclipse.etrice.ui.structure
parent130e237ddfa28aae046cd08b441a0eadf8e154ff (diff)
downloadorg.eclipse.etrice-de4f75412073a35375435f5c2fa8a5b2ee1fc996.tar.gz
org.eclipse.etrice-de4f75412073a35375435f5c2fa8a5b2ee1fc996.tar.xz
org.eclipse.etrice-de4f75412073a35375435f5c2fa8a5b2ee1fc996.zip
[ui.behavior/structure] border is black again
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java
index 23d0558bf..46ec54fa7 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java
@@ -118,9 +118,9 @@ public class StructureClassSupport {
int width = context.getWidth() <= 0 ? DEFAULT_SIZE_X : context.getWidth();
int height = context.getHeight() <= 0 ? DEFAULT_SIZE_Y : context.getHeight();
- Rectangle rect; // need to access it later
- IGaService gaService = Graphiti.getGaService();
{
+ IGaService gaService = Graphiti.getGaService();
+
// create invisible outer rectangle expanded by
// the width needed for the ports
Rectangle invisibleRectangle =
@@ -130,10 +130,17 @@ public class StructureClassSupport {
context.getX(), context.getY(), width + 2*MARGIN, height + 2*MARGIN);
// create and set visible rectangle inside invisible rectangle
- rect = gaService.createRectangle(invisibleRectangle);
+ // transparent first
+ Rectangle rect = gaService.createRectangle(invisibleRectangle);
rect.setForeground(manageColor(LINE_COLOR));
rect.setBackground(manageColor(BACKGROUND));
- rect.setTransparency(0.4);
+ rect.setTransparency(0.5);
+ rect.setLineWidth(LINE_WIDTH);
+ gaService.setLocationAndSize(rect, MARGIN, MARGIN, width, height);
+ // then unfilled opaque
+ rect = gaService.createRectangle(invisibleRectangle);
+ rect.setForeground(manageColor(LINE_COLOR));
+ rect.setFilled(false);
rect.setLineWidth(LINE_WIDTH);
gaService.setLocationAndSize(rect, MARGIN, MARGIN, width, height);
@@ -195,10 +202,13 @@ public class StructureClassSupport {
int w = containerGa.getWidth();
int h = containerGa.getHeight();
- if (containerGa.getGraphicsAlgorithmChildren().size()==1) {
+ if (containerGa.getGraphicsAlgorithmChildren().size()==2) {
GraphicsAlgorithm ga = containerGa.getGraphicsAlgorithmChildren().get(0);
ga.setWidth(w-2*MARGIN);
ga.setHeight(h-2*MARGIN);
+ ga = containerGa.getGraphicsAlgorithmChildren().get(1);
+ ga.setWidth(w-2*MARGIN);
+ ga.setHeight(h-2*MARGIN);
anythingChanged = true;
}
@@ -407,7 +417,7 @@ public class StructureClassSupport {
if (containerShape.getGraphicsAlgorithm()!=null) {
GraphicsAlgorithm containerGa = containerShape.getGraphicsAlgorithm();
- if (containerGa.getGraphicsAlgorithmChildren().size()==1) {
+ if (containerGa.getGraphicsAlgorithmChildren().size()==2) {
// scale interface item coordinates
// we refer to the visible rectangle which defines the border of our structure class
// since the margin is not scaled

Back to the top