int height = (int) (rheight/scale); if (height != 0) { setHeight(height);  if (use){ int i = bottomy % Constants.GRID_SIZE; if (i!=0 && Settings.getInstance().getSnapToGrid()) { if (i > Constants.GRID_SIZE/2.0) setY(bottomy-height + Constants.GRID_SIZE -i); else setY(bottomy-height -i); } else setY(bottomy-height);
if (scale >= 0.2) { int height = (int) (rheight/scale); if (height != 0) { setHeight(height);  if (use){ int i = bottomy % Constants.GRID_SIZE; if (i!=0 && Settings.getInstance().getSnapToGrid()) { if (i > Constants.GRID_SIZE/2.0) setY(bottomy-height + Constants.GRID_SIZE -i); else setY(bottomy-height -i); } else setY(bottomy-height); }
protected void validate() {//  boolean use = super.getHeight() != 0 && !firstValidation;    boolean use = super.getHeight() != 0 && validationsCounter > 3;    int bottomy = getY() + getHeight();  double scale = getRscale();  int rwidth = (int)(getWidth()*scale);  int rheight = (int)(Constants.RECORD_HEIGHT*scale);  setRheight(rheight);  setRwidth(rwidth);  rheight = validateFont(scale, rwidth, rheight);  int height = (int) (rheight/scale);  if (height != 0) {      setHeight(height);	  //this prevents records from moving up and down when zooming      if (use){	      int i = bottomy % Constants.GRID_SIZE;	      if (i!=0 && Settings.getInstance().getSnapToGrid()) {	          if (i > Constants.GRID_SIZE/2.0)	              setY(bottomy-height + Constants.GRID_SIZE -i);	          else 	              setY(bottomy-height -i);	      } else	          setY(bottomy-height);	  }  }    // round fix  rheight = (int)((getY()+super.getHeight())*scale)-(int)(getY()*scale);  setRheight(rheight);    // sub-components  revalidatePosition();		// rec's height can be different  validateFields();}