Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Zoom Problem
Zoom Problem [message #104214] Thu, 15 February 2007 06:55
Eclipse UserFriend
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();
}
}
Previous Topic:dynamic templates with xpand question
Next Topic:Adding the geoshapes
Goto Forum:
  


Current Time: Thu Jul 10 03:31:24 EDT 2025

Powered by FUDForum. Page generated in 0.14222 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top