public void gullMoved( final Coordinate newLoc ) {
Display.getDefault().asyncExec(new Runnable(){
private void scroll(int newx, int newy, int startx, int starty){
ViewportModelImpl vm = (ViewportModelImpl)map.getViewportModel();
final ViewportPaneTiledSWT viewera = (ViewportPaneTiledSWT)viewer;
org.eclipse.swt.graphics.Point p = Display.getCurrent().map((Canvas)viewera, null, newx, newy);
org.eclipse.swt.graphics.Point p2 = Display.getCurrent().map((Canvas)viewera, null, startx, starty);
int xdiff = p2.x - p.x;
int ydiff = p2.y - p.y;
((Canvas)viewera).scroll(xdiff, ydiff, 0,0, map.getRenderManager().getMapDisplay().getWidth(), map.getRenderManager().getMapDisplay().getHeight(), true);
}
public void run() {
ViewportModelImpl vm = (ViewportModelImpl)map.getViewportModel();
final ViewportPaneTiledSWT viewera = (ViewportPaneTiledSWT)viewer;
final ReferencedEnvelope bounds = vm.getBounds();
Coordinate currentc = vm.getCenter();
final Point newpnt = vm.worldToPixel(newLoc);
final Point oldpnt = vm.worldToPixel(currentc);