int rx = Math.max(0, (int)(view.getRx()/oldscale*scale+dx)); int ry = Math.max(0, (int)(view.getRy()/oldscale*scale+dy));  view.setRx(rx); view.setRy(ry);
double drx = view.getDrx() + view.getViewWidth()*oldscale/2.0; double dry = view.getDry() + view.getViewHeight()*oldscale/2.0;   drx *= ds; dry *= ds;   drx += view.getViewWidth()*(ds-1-scale)/2.0; dry += view.getViewHeight()*(ds-1-scale)/2.0;  view.setDrx(drx); view.setDry(dry);
public void setScale(double scale) {	/// !!!! try to resive with slider (compare grid & records sizes!!!)		ViewState view = ViewState.getInstance();	double oldscale = view.getScale();	double dx = view.getViewWidth()*(scale-oldscale)/2.0;	double dy = view.getViewHeight()*(scale-oldscale)/2.0;		/// !!!! to be fixed	int rx = Math.max(0, (int)(view.getRx()/oldscale*scale+dx));	int ry = Math.max(0, (int)(view.getRy()/oldscale*scale+dy));			view.setRx(rx);	view.setRy(ry);	view.setScale(scale);	recalculateNavigatorPosition();	repaint();}