double scale = getRscale(); int rwidth = (int)((getX()+getWidth())*scale)-getRx(); int height = (int)(getY()*scale+Constants.TEMPLATE_INITIAL_HEIGHT)-getRy();
VDBTemplate tmpl = (VDBTemplate)VDBData.getTemplates().get(getTemplateData().getTemplate().getId()); if (tmpl!=getTemplateData().getTemplate()) { getTemplateData().setTemplate(tmpl); synchronizeLinkFields(); } else { if (getTemplateData().getTemplate().getPortsGeneratedID()!=portsID) synchronizePortLinkFields(); if (getTemplateData().getTemplate().getMacrosGeneratedID()!=macrosID) synchronizeMacroLinkFields(); }  revalidatePosition();
	protected void validate()	{				  // template change check		  VDBTemplate tmpl = (VDBTemplate)VDBData.getTemplates().get(getTemplateData().getTemplate().getId());				  if (tmpl!=getTemplateData().getTemplate())		  {		  	getTemplateData().setTemplate(tmpl);			synchronizeLinkFields();		  }		  else		  {		  	if (getTemplateData().getTemplate().getPortsGeneratedID()!=portsID)				synchronizePortLinkFields();			if (getTemplateData().getTemplate().getMacrosGeneratedID()!=macrosID)				synchronizeMacroLinkFields();		  }				  revalidatePosition();		  double scale = getRscale();		  int rwidth = (int)((getX()+getWidth())*scale)-getRx();		  int height = (int)(getY()*scale+Constants.TEMPLATE_INITIAL_HEIGHT)-getRy();		  initY = height;		  	  		  int rheight = validateFont(scale, rwidth, height);		  		  setHeight((int)(rheight/scale));		  setRwidth(rwidth);		  setRheight(rheight);		  	      // sub-components		  revalidatePosition();		  validateFields();	}