Browse Source

Merge pull request #5569 in DESIGN/design from feature/10.0 to feature/big-screen

* commit 'fffab82d33909d706e50e3a8f6df9994d4e897e4':
  REPORT-56147 决策报表-电脑200%缩放下决策报表下方显示不全
  REPORT-56602 页面设置的纸张大小与实际分页精度不符
  REPORT-58159 日志栏点击日志窗口不显示在上面
  REPORT-57590 选中参数面板模后板上方的工具栏也要禁用剪切复制
feature/big-screen
superman 3 years ago
parent
commit
138595685f
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java
  3. 8
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  4. 62
      designer-realize/src/main/java/com/fr/grid/GridUI.java

1
designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java

@ -48,6 +48,7 @@ public class LogMessageBar extends JPanel {
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (dlg != null && dlg.isVisible()) { if (dlg != null && dlg.isVisible()) {
dlg.setExtendedState(JFrame.NORMAL); dlg.setExtendedState(JFrame.NORMAL);
dlg.requestFocus();
return; return;
} }
dlg = new LogDetailPane().showDialog(); dlg = new LogDetailPane().showDialog();

2
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -177,14 +177,12 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
double[] rowSize = {f}; double[] rowSize = {f};
double[] columnSize = {p, f, p, p, p, p, p, f, p}; double[] columnSize = {p, f, p, p, p, p, p, f, p};
UILabel tipsPane = new UILabel("form"); UILabel tipsPane = new UILabel("form");
tipsPane.setPreferredSize(new Dimension(265, 0));
widthPane = new UINumberField(); widthPane = new UINumberField();
widthPane.setPreferredSize(new Dimension(60, 0)); widthPane.setPreferredSize(new Dimension(60, 0));
heightPane = new UINumberField(); heightPane = new UINumberField();
heightPane.setPreferredSize(new Dimension(60, 0)); heightPane.setPreferredSize(new Dimension(60, 0));
slidePane = JFormSliderPane.getInstance(); slidePane = JFormSliderPane.getInstance();
slidePane.setPreferredSize(new Dimension(326, 20));
JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane( JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane(
new JComponent[][]{{tipsPane, new UILabel(), widthPane, new JComponent[][]{{tipsPane, new UILabel(), widthPane,

8
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -109,6 +109,10 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
Arrays.asList(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete")}) Arrays.asList(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete")})
); );
protected static final ArrayList<String> PARAMETER_TOOLAR_BAN_LIST = new ArrayList<String>(
Arrays.asList(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy")})
);
private double scale = 1.0D; private double scale = 1.0D;
//底层容器的默认大小 //底层容器的默认大小
@ -1304,6 +1308,10 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
protected void setToolbarButtons() { protected void setToolbarButtons() {
//自适应布局和底层都不能删除 //自适应布局和底层都不能删除
DesignerContext.getDesignerFrame().checkCombineUp(!isRootSelected(), NAME_ARRAY_LIST); DesignerContext.getDesignerFrame().checkCombineUp(!isRootSelected(), NAME_ARRAY_LIST);
if (isParameterSelected()) {
DesignerContext.getDesignerFrame().checkCombineUp(false, PARAMETER_TOOLAR_BAN_LIST);
}
} }
private void invalidateLayout() { private void invalidateLayout() {

62
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -10,12 +10,15 @@ import com.fr.base.background.ColorBackground;
import com.fr.base.background.ImageFileBackground; import com.fr.base.background.ImageFileBackground;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.fun.ReportLengthUNITProvider;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.unit.UnitConvertUtil;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
@ -48,6 +51,7 @@ import com.fr.stable.Constants;
import com.fr.stable.script.CalculatorUtils; import com.fr.stable.script.CalculatorUtils;
import com.fr.stable.unit.FU; import com.fr.stable.unit.FU;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
import com.fr.stable.unit.UNIT;
import com.fr.third.antlr.ANTLRException; import com.fr.third.antlr.ANTLRException;
import com.fr.third.guava.collect.HashMultimap; import com.fr.third.guava.collect.HashMultimap;
@ -372,41 +376,41 @@ public class GridUI extends ComponentUI {
@Override @Override
protected void iterateStart2End(Graphics2D g2d) { protected void iterateStart2End(Graphics2D g2d) {
float rowHeight, paperYAxisSumSize = 0, yAxisSumSize = 0; UNIT rowHeight, paperYAxisSumSize = FU.getInstance(0), yAxisSumSize = FU.getInstance(0);
for (int i = 0; i <= gridRange.yEndIndex; i++) { for (int i = 0; i <= gridRange.yEndIndex; i++) {
if (i == 0) { if (i == 0) {
i = gridRange.yBeginIndex; i = gridRange.yBeginIndex;
for (int k = 0; k < gridRange.yBeginIndex; k++) { for (int k = 0; k < gridRange.yBeginIndex; k++) {
rowHeight = gridRange.rowHeightList.get(k).toPixF(resolution); rowHeight = gridRange.rowHeightList.get(k);
paperYAxisSumSize = paperYAxisSumSize.add(rowHeight);
paperYAxisSumSize += rowHeight; if (paperYAxisSumSize.toPixF(resolution) >= paperPaintSize) {
if (paperYAxisSumSize >= paperPaintSize) {
paperYAxisSumSize = rowHeight; paperYAxisSumSize = rowHeight;
} }
} }
} }
rowHeight = gridRange.rowHeightList.get(i).toPixF(resolution);
paperYAxisSumSize += rowHeight; rowHeight = gridRange.rowHeightList.get(i);
paperYAxisSumSize = paperYAxisSumSize.add(rowHeight);
if (showGridLine) { if (showGridLine) {
float columnWidth, xAxisSumSize = 0; UNIT columnWidth, xAxisSumSize = FU.getInstance(0);
for (int j = gridRange.xBeginIndex; j <= gridRange.xEndIndex; j++) { for (int j = gridRange.xBeginIndex; j <= gridRange.xEndIndex; j++) {
columnWidth = gridRange.columnWidthList.get(j).toPixF(resolution); columnWidth = gridRange.columnWidthList.get(j);
if (!mergeCellElementTable.get(CellPosition.value(i - 1, j)).contains(CellPosition.BOTTOM)) { if (!mergeCellElementTable.get(CellPosition.value(i - 1, j)).contains(CellPosition.BOTTOM)) {
tmpLine2D.setLine(xAxisSumSize, yAxisSumSize, xAxisSumSize + columnWidth, yAxisSumSize); tmpLine2D.setLine(xAxisSumSize.toPixF(resolution), yAxisSumSize.toPixF(resolution), xAxisSumSize.add(columnWidth).toPixF(resolution), yAxisSumSize.toPixF(resolution));
g2d.draw(tmpLine2D); g2d.draw(tmpLine2D);
} }
xAxisSumSize += columnWidth; xAxisSumSize = xAxisSumSize.add(columnWidth);
} }
} }
if (showPaginateLine && paperYAxisSumSize - paperPaintSize > THRESHOLD) { if (showPaginateLine && paperYAxisSumSize.toPixF(resolution) - paperPaintSize > THRESHOLD) {
paginateLineList.add(getPaginateLine2D((int) yAxisSumSize)); paginateLineList.add(getPaginateLine2D((int) yAxisSumSize.toPixF(resolution)));
paperYAxisSumSize = rowHeight; paperYAxisSumSize = rowHeight;
} }
yAxisSumSize += rowHeight; yAxisSumSize = yAxisSumSize.add(rowHeight);
} }
// paint 最后一个横线.. // paint 最后一个横线..
if (showGridLine) { if (showGridLine) {
drawLastLine(g2d, (int) yAxisSumSize); drawLastLine(g2d, (int) yAxisSumSize.toPixF(resolution));
} }
} }
} }
@ -432,40 +436,40 @@ public class GridUI extends ComponentUI {
@Override @Override
protected void iterateStart2End(Graphics2D g2d) { protected void iterateStart2End(Graphics2D g2d) {
float columnWidth, paperXAxisSumSize = 0, xAxisSumSize = 0; UNIT columnWidth, paperXAxisSumSize = FU.getInstance(0), xAxisSumSize = FU.getInstance(0);
for (int i = 0; i <= gridRange.xEndIndex; i++) { for (int i = 0; i <= gridRange.xEndIndex; i++) {
if (i == 0) { if (i == 0) {
i = gridRange.xBeginIndex; i = gridRange.xBeginIndex;
for (int k = 0; k < gridRange.xBeginIndex; k++) { for (int k = 0; k < gridRange.xBeginIndex; k++) {
columnWidth = gridRange.columnWidthList.get(k).toPixF(resolution); columnWidth = gridRange.columnWidthList.get(k);
paperXAxisSumSize += columnWidth; paperXAxisSumSize = paperXAxisSumSize.add(columnWidth);
if (paperXAxisSumSize >= paperPaintSize) { if (paperXAxisSumSize.toPixF(resolution) >= paperPaintSize) {
paperXAxisSumSize = columnWidth; paperXAxisSumSize = columnWidth;
} }
} }
} }
columnWidth = gridRange.columnWidthList.get(i).toPixF(resolution); columnWidth = gridRange.columnWidthList.get(i);
paperXAxisSumSize += columnWidth; paperXAxisSumSize = paperXAxisSumSize.add(columnWidth);
if (showGridLine) { if (showGridLine) {
float rowHeight, yAxisSumSize = 0; UNIT rowHeight, yAxisSumSize = FU.getInstance(0);
for (int j = gridRange.yBeginIndex; j <= gridRange.yEndIndex; j++) { for (int j = gridRange.yBeginIndex; j <= gridRange.yEndIndex; j++) {
rowHeight = gridRange.rowHeightList.get(j).toPixF(resolution); rowHeight = gridRange.rowHeightList.get(j);
if (!mergeCellElementTable.get(CellPosition.value(j, i - 1)).contains(CellPosition.RIGHT)) { if (!mergeCellElementTable.get(CellPosition.value(j, i - 1)).contains(CellPosition.RIGHT)) {
tmpLine2D.setLine(xAxisSumSize, yAxisSumSize, xAxisSumSize, yAxisSumSize + rowHeight); tmpLine2D.setLine(xAxisSumSize.toPixF(resolution), yAxisSumSize.toPixF(resolution), xAxisSumSize.toPixF(resolution), yAxisSumSize.add(rowHeight).toPixF(resolution));
g2d.draw(tmpLine2D); g2d.draw(tmpLine2D);
} }
yAxisSumSize += rowHeight; yAxisSumSize = yAxisSumSize.add(rowHeight);
} }
} }
if (showPaginateLine && paperXAxisSumSize - paperPaintSize > THRESHOLD) { if (showPaginateLine && paperXAxisSumSize.toPixF(resolution) - paperPaintSize > THRESHOLD) {
paginateLineList.add(getPaginateLine2D((int) xAxisSumSize)); paginateLineList.add(getPaginateLine2D((int) xAxisSumSize.toPixF(resolution)));
paperXAxisSumSize = columnWidth; paperXAxisSumSize = columnWidth;
} }
xAxisSumSize += columnWidth; xAxisSumSize = xAxisSumSize.add(columnWidth);
} }
// paint 最后一个横线.. // paint 最后一个横线..
if (showGridLine) { if (showGridLine) {
drawLastLine(g2d, (int) xAxisSumSize); drawLastLine(g2d, (int) xAxisSumSize.toPixF(resolution));
} }
} }
} }

Loading…
Cancel
Save