Browse Source

REPORT-64702【frm设计器界面修改】新&旧模式下,新拖入的报表块,组件尺寸是250*150,进入报表块编辑,悬浮虚线看到的尺寸也是250*150,但退出编辑,拖拽调整报表块尺寸时,虚线范围比刚才看到的大了

feature/x
kerry 3 years ago
parent
commit
c4a9881f89
  1. 11
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

11
designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -38,6 +38,7 @@ import com.fr.report.cell.CellElement;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.worksheet.FormElementCase; import com.fr.report.worksheet.FormElementCase;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.Constants;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -151,6 +152,7 @@ public class FormElementCaseDesigner
Grid grid = this.elementCasePane != null ? this.elementCasePane.getGrid() : null; Grid grid = this.elementCasePane != null ? this.elementCasePane.getGrid() : null;
if (grid != null) { if (grid != null) {
resetGrid(grid);
boolean oldTranslucent = grid.isTranslucent(); boolean oldTranslucent = grid.isTranslucent();
boolean oldShowExtraGridLine = grid.isShowExtraGridLine(); boolean oldShowExtraGridLine = grid.isShowExtraGridLine();
// 截缩图图时grid需支持半透明,不能用默认白色填充画布,否则会遮挡组件样式背景 // 截缩图图时grid需支持半透明,不能用默认白色填充画布,否则会遮挡组件样式背景
@ -168,6 +170,15 @@ public class FormElementCaseDesigner
return image; return image;
} }
private void resetGrid(Grid grid) {
grid.setResolution(Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION);
grid.updateUI();
grid.setAdsorbHeight(0);
grid.setAdsorbWidth(0);
grid.setVerticalValue(0);
grid.setHorizontalValue(0);
}
/** /**
* 刷新右侧属性面板 * 刷新右侧属性面板
*/ */

Loading…
Cancel
Save