Author: koen.aers(a)jboss.com
Date: 2008-12-16 19:25:15 -0500 (Tue, 16 Dec 2008)
New Revision: 12630
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ConnectionEditPart.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/figure/RoundedRectangleElementFigure.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java
Log:
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ConnectionEditPart.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ConnectionEditPart.java 2008-12-16
18:07:05 UTC (rev 12629)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ConnectionEditPart.java 2008-12-17
00:25:15 UTC (rev 12630)
@@ -21,6 +21,7 @@
import org.eclipse.draw2d.AbsoluteBendpoint;
import org.eclipse.draw2d.BendpointConnectionRouter;
+import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.PolylineConnection;
@@ -68,6 +69,7 @@
protected IFigure createFigure() {
PolylineConnection result = new PolylineConnection();
+ result.setForegroundColor(ColorConstants.gray);
result.setConnectionRouter(new BendpointConnectionRouter());
result.setTargetDecoration(new PolygonDecoration());
return result;
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/figure/RoundedRectangleElementFigure.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/figure/RoundedRectangleElementFigure.java 2008-12-16
18:07:05 UTC (rev 12629)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/figure/RoundedRectangleElementFigure.java 2008-12-17
00:25:15 UTC (rev 12630)
@@ -23,15 +23,14 @@
public class RoundedRectangleElementFigure extends AbstractElementFigure {
- private RoundedRectangle rectangle;
+ protected RoundedRectangle rectangle;
protected void customizeFigure() {
rectangle = new RoundedRectangle();
rectangle.setCornerDimensions(new Dimension(25, 25));
add(rectangle, 0);
- rectangle.setBounds(getBounds());
+ setSize(92, 52);
setSelected(false);
- setSize(80, 40);
}
public void setColor(Color color) {
@@ -40,7 +39,8 @@
public void setBounds(Rectangle rectangle) {
super.setBounds(rectangle);
- this.rectangle.setBounds(rectangle);
+ Rectangle bounds = rectangle.getCopy();
+ this.rectangle.setBounds(bounds.translate(6, 6).resize(-12, -12));
}
public void setSelected(boolean b) {
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java 2008-12-16
18:07:05 UTC (rev 12629)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java 2008-12-17
00:25:15 UTC (rev 12630)
@@ -210,12 +210,17 @@
} else if ("node".equals(type)) {
return createNodeEditPart(configurationElement);
} else if ("connection".equals(type)) {
- return new ConnectionEditPart();
+ return createConnectionEditPart(configurationElement);
} else {
return null;
}
}
+ private static EditPart createConnectionEditPart(final IConfigurationElement
configurationElement) {
+ return new ConnectionEditPart() {
+ };
+ }
+
private static EditPart createNodeEditPart(final IConfigurationElement
configurationElement) {
return new ElementEditPart() {
protected IFigure createFigure() {
Show replies by date