Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 211971 Details for
Bug 154578
Connection Bendpoints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch proposal
clipboard.txt (text/plain), 2.72 KB, created by
Arnaud MERGEY
on 2012-03-02 10:27:21 EST
(
hide
)
Description:
patch proposal
Filename:
MIME Type:
Creator:
Arnaud MERGEY
Created:
2012-03-02 10:27:21 EST
Size:
2.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.zest.core >Index: src/org/eclipse/zest/core/widgets/GraphConnection.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.zest.core/src/org/eclipse/zest/core/widgets/GraphConnection.java,v >retrieving revision 1.24 >diff -u -r1.24 GraphConnection.java >--- src/org/eclipse/zest/core/widgets/GraphConnection.java 21 Oct 2011 21:08:11 -0000 1.24 >+++ src/org/eclipse/zest/core/widgets/GraphConnection.java 2 Mar 2012 15:24:16 -0000 >@@ -9,6 +9,11 @@ > ******************************************************************************/ > package org.eclipse.zest.core.widgets; > >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.draw2d.AbsoluteBendpoint; >+import org.eclipse.draw2d.BendpointConnectionRouter; > import org.eclipse.draw2d.ChopboxAnchor; > import org.eclipse.draw2d.ColorConstants; > import org.eclipse.draw2d.Connection; >@@ -74,6 +79,7 @@ > private boolean highlighted; > private GraphLayoutConnection layoutConnection = null; > private boolean hasCustomTooltip; >+ private Object routingConstraint; > > public GraphConnection(Graph graphModel, int style, GraphNode source, GraphNode destination) { > super(graphModel, style); >@@ -600,6 +606,10 @@ > toolTip = this.getTooltip(); > } > connection.setToolTip(toolTip); >+ >+ if (routingConstraint != null) { >+ connection.setRoutingConstraint(routingConstraint); >+ } > } > > private Connection createFigure() { >@@ -658,6 +668,8 @@ > connectionFigure.add(this.connectionLabel, labelLocator); > > doUpdateFigure(connectionFigure); >+ >+ connectionFigure.setConnectionRouter(new BendpointConnectionRouter()); > return connectionFigure; > } > >@@ -675,7 +687,7 @@ > Object layoutInformation = null; > > public void clearBendPoints() { >- // @tag TODO : add bendpoints >+ routingConstraint = null; > } > > public LayoutEntity getDestinationInLayout() { >@@ -695,7 +707,12 @@ > } > > public void setBendPoints(LayoutBendPoint[] bendPoints) { >- // @tag TODO : add bendpoints >+ List list = new ArrayList(); >+ for (int i = 0; i < bendPoints.length; i++) { >+ list.add(new AbsoluteBendpoint((int) bendPoints[i].getX(), >+ (int) bendPoints[i].getY())); >+ } >+ setRoutingConstraint(list); > } > > public void setLayoutInformation(Object layoutInformation) { >@@ -712,6 +729,17 @@ > > } > >+ /** >+ * Sets the routing constraint >+ * >+ * @param cons >+ * The routing constraint >+ */ >+ public void setRoutingConstraint(Object cons) { >+ routingConstraint = cons; >+ updateFigure(connectionFigure); >+ } >+ > IFigure getFigure() { > return this.getConnectionFigure(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 154578
: 211971 |
211986