[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: ConnectionEditPart - layout

Did you check to see how your implementation differs from the logic
example's?  Take a look at LogicEditPart.

"Ian Gray" <iandgray@xxxxxxxxx> wrote in message
news:c6tntn$5th$1@xxxxxxxxxxxxxx
> After dragging the horiz/vert scroll bar towards the right/bottom, the
> connections appear to consider the top-left of the viewport to be the
> origin. The connections all displace correspondingly towards the
> right/bottom.
> In contrast, the node editparts behave as intended and appear to consider
> the top left of the contents pane as the origin at all times.
>
> When I reset the scrollbars to their initial position, the next refresh
> brings the connections back to their intended position. I'm guessing this
> is because the absolute origin and the top-left visible point of the pane
> are here the same point.
>
> Can anyone please help to put me on the right track to where to look next.
> Thank you for any help.
>
> Contents EditPart:
>     protected IFigure createFigure() {
> Figure f = new FreeformLayer();
> f.setLayoutManager(new FreeformLayout());
>
> ConnectionAnchors:
> The absolute position of the source/target ConnectionAnchor is calculated
> in the method of the NodeEditPart:
> public ConnectionAnchor
> getSource/TargetConnectionAnchor(ConnectionEditPart connection)
> Each time, a new XYAnchor(new Point(X,Y)) is returned.
>
> ConnectionEditPart:
> I have no implementation of refreshVisuals().
>
>
>