diff --git a/de.bmotionstudio.gef.editor/icons/eclipse16/updated_co.gif b/de.bmotionstudio.gef.editor/icons/eclipse16/updated_co.gif new file mode 100644 index 0000000000000000000000000000000000000000..0d686ab4593b4242cc91a9e79bbbd4bf177f1d69 Binary files /dev/null and b/de.bmotionstudio.gef.editor/icons/eclipse16/updated_co.gif differ diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java index 907bae7fe86f3a5689d699007f4592afe20fa782..16392c44ec9ef763e4f8303bfc97480bf9c73781 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java @@ -25,6 +25,7 @@ public class EditorImageRegistry implements IBMotionStudioImageRegistry { public static final String IMG_ICON_CONNECTION24 = "icon_connection24"; public static final String IMG_ICON_NEW_WIZ = "icon_new_wiz"; public static final String IMG_ICON_DELETE_EDIT = "icon_delete_edit"; + public static final String IMG_ICON_TR_UP = "icon_tr_up"; public static final String IMG_ICON_JPG = "icon_jpg"; public static final String IMG_ICON_GIF = "icon_gif"; @@ -66,6 +67,10 @@ public class EditorImageRegistry implements IBMotionStudioImageRegistry { BMotionStudioImage.registerImage(IMG_ICON_DELETE_EDIT, "org.eclipse.ui", "$nl$/icons/full/etool16/delete_edit.gif"); + BMotionStudioImage + .registerImage(IMG_ICON_TR_UP, BMotionEditorPlugin.PLUGIN_ID, + "icons/eclipse16/updated_co.gif"); + BMotionStudioImage.registerImage(IMG_ICON_JPG, BMotionEditorPlugin.PLUGIN_ID, "icons/icon_jpg.gif"); BMotionStudioImage.registerImage(IMG_ICON_GIF, diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableCellFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableCellFigure.java index 09fa6fa84acfab68cb940adbfe6c51657d82c5dc..c9cf14e5e1e9eb334be3c423412a2376f55aa126 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableCellFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TableCellFigure.java @@ -32,6 +32,7 @@ public class TableCellFigure extends AbstractTableFigure { Color foregroundColor = getForegroundColor(); if (foregroundColor != null) g.setForegroundColor(foregroundColor); + // Bottom cell line g.drawLine(r.x, r.y, r.x + r.width, r.y); } 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 e036e5d6863b911b900ce07012635ed3b6ff0715..cec191ca8a38b612351aa75c3d862174e86c0ba5 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 @@ -9,6 +9,7 @@ public class TableColumnFigure extends AbstractTableFigure { public TableColumnFigure() { ToolbarLayout toolbarLayout = new ToolbarLayout(); + toolbarLayout.setSpacing(0); setLayoutManager(toolbarLayout); setOpaque(true); } @@ -19,9 +20,12 @@ 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); - g.drawLine(r.x, r.y, r.x, r.y + r.height - 1); - g.drawLine(r.x, r.y + r.height - 1, r.x + r.width, r.y + r.height - 1); + + // 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); + // Bottom line + g.drawLine(r.x, r.y + r.height - 15, r.x + r.width, r.y + r.height - 15); super.paintBorder(g); } 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 fb322781139451c5f90a087cb2513e1eabdfc9bf..5a1b14a33082c6a93bf4b817b878d90597fe755f 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 @@ -24,8 +24,9 @@ public class TableFigure extends AbstractTableFigure { protected void paintBorder(Graphics g) { Rectangle r = getClientArea(); g.setForegroundColor(getForegroundColor()); + // Right table border line g.drawLine(r.x + r.width - 1, r.y, r.x + r.width - 1, r.y + r.height - - 1); + - 15); super.paintBorder(g); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/TableObserver.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/TableObserver.java index 5377db997c6d0ffd11f7760b5667080513d174d6..cee21033f1ceb5fcd6effd76e383e9346aff14a3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/TableObserver.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/TableObserver.java @@ -1,11 +1,7 @@ package de.bmotionstudio.gef.editor.observer; -import java.util.ArrayList; import java.util.LinkedList; import java.util.List; -import java.util.regex.MatchResult; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import de.bmotionstudio.gef.editor.Animation; import de.bmotionstudio.gef.editor.AttributeConstants; @@ -21,10 +17,6 @@ public class TableObserver extends Observer { private String predicate; public static List<String> split(String input, char tempReplacement) { - while (input.matches(".*\"[^\\{\\}]+,[^\\{\\}]+.*")) { - input = input.replaceAll("([^\\{\\}]+),([^\\{\\}]+)", "$1" - + tempReplacement + "$2"); - } while (input.matches(".*\\{[^\\}]+,[^\\}]+\\}.*")) { input = input.replaceAll("(\\{[^\\}]+),([^\\}]+\\})", "$1" + tempReplacement + "$2"); @@ -38,10 +30,6 @@ public class TableObserver extends Observer { } public static List<String> split2(String input, char tempReplacement) { - while (input.matches(".*\"[^\\(\\)]+\\|->[^\\(\\)]+.*")) { - input = input.replaceAll("(\"[^\\(\\)]+)\\|->([^\\(\\)]+)", "$1" - + tempReplacement + "$2"); - } while (input.matches(".*\\([^\\)]+\\|->[^\\)]+\\).*")) { input = input.replaceAll("(\\([^\\)]+)\\|->([^\\)]+\\))", "$1" + tempReplacement + "$2"); @@ -135,12 +123,13 @@ public class TableObserver extends Observer { } - private Iterable<MatchResult> findMatches(String pattern, CharSequence s) { - List<MatchResult> results = new ArrayList<MatchResult>(); - for (Matcher m = Pattern.compile(pattern).matcher(s); m.find();) - results.add(m.toMatchResult()); - return results; - } + // private Iterable<MatchResult> findMatches(String pattern, CharSequence s) + // { + // List<MatchResult> results = new ArrayList<MatchResult>(); + // for (Matcher m = Pattern.compile(pattern).matcher(s); m.find();) + // results.add(m.toMatchResult()); + // return results; + // } public void setExpression(String expression) { this.expression = expression; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableCellPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableCellPart.java index b82098acebf8e81157319b4af0bf0bedad386199..8c7907cdcabf84f08125f427746fa764f045009a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableCellPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BTableCellPart.java @@ -30,6 +30,7 @@ public class BTableCellPart extends AppAbstractEditPart { installEditPolicy(EditPolicy.NODE_ROLE, new RenamePolicy()); } + @Override protected void prepareRunPolicies() { } 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 598b8feb8ae5ef3229c0f2369dbdf95bd015d66c..0955e8bc5638fbd37a21c970ddbd1a5644d72874 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 @@ -4,10 +4,13 @@ import java.beans.PropertyChangeEvent; import java.util.List; import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; import org.eclipse.gef.EditPolicy; import org.eclipse.swt.graphics.RGB; import de.bmotionstudio.gef.editor.AttributeConstants; +import de.bmotionstudio.gef.editor.BMotionStudioImage; +import de.bmotionstudio.gef.editor.EditorImageRegistry; import de.bmotionstudio.gef.editor.editpolicy.BMotionNodeEditPolicy; import de.bmotionstudio.gef.editor.editpolicy.BMotionStudioFlowEditPolicy; import de.bmotionstudio.gef.editor.figure.TableColumnFigure; @@ -17,7 +20,15 @@ public class BTableColumnPart extends AppAbstractEditPart { @Override protected IFigure createEditFigure() { - return new TableColumnFigure(); + TableColumnFigure tableColumnFigure = new TableColumnFigure(); + Label figure = new Label(); + figure.setOpaque(true); + tableColumnFigure.add(figure); + if (!isRunning()) { + figure.setIcon(BMotionStudioImage + .getImage(EditorImageRegistry.IMG_ICON_TR_UP)); + } + return tableColumnFigure; } @Override 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 f879d71949b1b4100b06916cafb93b0de88d1b1e..c1042055d09615887e405ae1ee8fae1eac09546e 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 @@ -54,7 +54,9 @@ public class BTablePart extends AppAbstractEditPart { figure.getParent().setConstraint( figure, new Rectangle(control.getLocation().x, control.getLocation().y, - width + 1, (rows * 20) + 1)); + width + 1, (rows * 20) + 15)); + + // super.refreshEditLayout(figure, control); } @@ -93,7 +95,7 @@ public class BTablePart extends AppAbstractEditPart { BTableColumn bTableColumn = new BTableColumn( model.getVisualization()); CreateCommand cmd = new CreateCommand(bTableColumn, model); - cmd.setLayout(new Rectangle(0, 0, 50, 25)); + // cmd.setLayout(new Rectangle(0, 0, 50, 40)); cmd.execute(); Integer numberOfRows = Integer.valueOf(model.getAttributeValue( AttributeConstants.ATTRIBUTE_ROWS).toString());