From 1574e61ec4b7fc9509def4848e236c7c5370e94b Mon Sep 17 00:00:00 2001 From: Lukas Ladenberger <lukas.ladenberger@googlemail.com> Date: Wed, 22 Aug 2012 11:27:32 +0200 Subject: [PATCH] set transparency to column and table --- .../gef/editor/editpolicy/AppEditLayoutPolicy.java | 8 ++++---- .../gef/editor/figure/TableColumnFigure.java | 3 +-- .../de/bmotionstudio/gef/editor/figure/TableFigure.java | 2 +- .../bmotionstudio/gef/editor/part/BTableColumnPart.java | 1 - .../src/de/bmotionstudio/gef/editor/part/BTablePart.java | 1 - 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/AppEditLayoutPolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/AppEditLayoutPolicy.java index 5fcc1fe2..d6303ee0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/AppEditLayoutPolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/AppEditLayoutPolicy.java @@ -143,8 +143,8 @@ public class AppEditLayoutPolicy extends XYLayoutEditPolicy { BControl newObj = (BControl) request.getNewObject(); - CreateCommand createCmd = new CreateCommand( - newObj, (BControl) getHost().getModel()); + CreateCommand createCmd = new CreateCommand(newObj, + (BControl) getHost().getModel()); Rectangle constraint = (Rectangle) getConstraintFor(request); constraint.x = (constraint.x < 0) ? 0 : constraint.x; @@ -157,7 +157,7 @@ public class AppEditLayoutPolicy extends XYLayoutEditPolicy { .getAttributes().get( AttributeConstants.ATTRIBUTE_HEIGHT); - if (atrWidth != null) { + if (atrWidth != null && !atrWidth.isEditable()) { constraint.width = Integer.valueOf(atrWidth.getValue() .toString()); } else { @@ -165,7 +165,7 @@ public class AppEditLayoutPolicy extends XYLayoutEditPolicy { : constraint.width; } - if (atrHeight != null) { + if (atrHeight != null && !atrHeight.isEditable()) { constraint.height = Integer.valueOf(atrHeight.getValue() .toString()); } else { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableColumnFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableColumnFigure.java index ce1c1f6b..1b03990e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableColumnFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableColumnFigure.java @@ -10,7 +10,7 @@ public class TableColumnFigure extends AbstractTableFigure { public TableColumnFigure() { ToolbarLayout toolbarLayout = new ToolbarLayout(); setLayoutManager(toolbarLayout); - setOpaque(true); + setOpaque(false); } @Override @@ -19,7 +19,6 @@ public class TableColumnFigure extends AbstractTableFigure { Color foregroundColor = getForegroundColor(); if (foregroundColor != null) g.setForegroundColor(foregroundColor); - // g.drawLine(r.x, r.y, r.x + r.width, r.y); // Left line g.drawLine(r.x, r.y, r.x, r.y + r.height - 15); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableFigure.java index e1b39594..3f0dafe0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableFigure.java @@ -16,7 +16,7 @@ public class TableFigure extends AbstractTableFigure { ToolbarLayout toolbarLayout = new ToolbarLayout(); toolbarLayout.setHorizontal(true); setLayoutManager(toolbarLayout); - setOpaque(true); + setOpaque(false); } @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableColumnPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableColumnPart.java index 0955e8bc..55b7db8b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableColumnPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableColumnPart.java @@ -22,7 +22,6 @@ public class BTableColumnPart extends AppAbstractEditPart { protected IFigure createEditFigure() { TableColumnFigure tableColumnFigure = new TableColumnFigure(); Label figure = new Label(); - figure.setOpaque(true); tableColumnFigure.add(figure); if (!isRunning()) { figure.setIcon(BMotionStudioImage diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTablePart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTablePart.java index 95f025ef..ce86dc2c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTablePart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTablePart.java @@ -27,7 +27,6 @@ public class BTablePart extends AppAbstractEditPart { protected IFigure createEditFigure() { TableFigure tableFigure = new TableFigure(); Label figure = new Label(); - figure.setOpaque(true); tableFigure.add(figure); if (!isRunning()) { figure.setIcon(BMotionStudioImage -- GitLab