Zoom Problem [message #104214] |
Thu, 15 February 2007 06:55 |
Eclipse User |
|
|
|
Originally posted by: martin.tauber.t-online.de
Hi Virtual Team!
I have the following problem: When I create my own custom anchors,
everthing works fine, except that when I change the zoom in my diagram,
the zoom for the anchors does not change (which means that the
connections actually don't get zoomed. They just stay in the same
position, but everthing else scales and moves) This evect also happens
as soon as my diagram doesn't fit into the window any longer.
I quess I have to translate the points returned by the anchor to some
relative points, but I don't have a clue how. Here is the code I use for
the anchors:
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Point;
public class NorthAnchor extends IdentityAnchor {
public NorthAnchor(IFigure figure) {
super(figure);
setId("NORTH");
}
public Point getLocation(Point reference) {
return this.getOwner().getBounds().getTop();
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.14222 seconds