Browse Source

Merge pull request #1287 in DESIGN/design from bugfix/10.0 to release/10.0

* commit '35713e7eb9cb8243cd6fbeda8c2e3972c1056cca':
  REPORT-22108 这里写死了,一旦超过了30列就会无法渲染
  REPORT-22108 这里写死了,一旦超过了30行就会无法渲染
  REPORT-22595【10.0.4设计器】开发者鸣谢,放到启动图左侧下方
  fix
  REPORT-23246 设计器设置纸张颜色然后合并单元格的颜色会变白色
  fix
  REPORT-23246 设计器UI 插入斜线显示不全
  REPORT-23494 修改控件名后 直接编辑事件 事件内容不会被保存
  REPORT-22806	 模板自适应下块还是有叠盖 转专人服务-Winnie
  REPORT-23486 修复bug以及更改文件夹
  REPORT-23578 设计器文件-选项-高级里新加了个通用数据连接管理器,有很多bug,需要屏蔽
  REPORT-23570 模版版本管理,gc为负数时应当提示“无可优化文件”
  REPORT-23486 修复bug以及更改文件夹
feature/big-screen
neil 5 years ago
parent
commit
acead771b8
  1. 13
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  4. 36
      designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java
  5. 9
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java
  6. 24
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java
  7. 5
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  8. 5
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java
  9. 1
      designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java
  10. 3
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java
  11. 9
      designer-realize/src/main/java/com/fr/grid/GridUI.java

13
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -199,10 +199,11 @@ public class PreferencePane extends BasicPane {
upmSelectorPane.add(useOptimizedUPMCheckbox);
advancePane.add(upmSelectorPane);
JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager"));
useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager"));
dbmSelectorPane.add(useUniverseDBMCheckbox);
advancePane.add(dbmSelectorPane);
//REPORT-23578 先屏蔽掉
//JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager"));
//useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager"));
//dbmSelectorPane.add(useUniverseDBMCheckbox);
//advancePane.add(dbmSelectorPane);
JPanel improvePane = FRGUIPaneFactory.createVerticalTitledBorderPane(i18nText("Fine-Design_Basic_Product_Improve"));
joinProductImproveCheckBox = new UICheckBox(i18nText("Fine-Design_Basic_Join_Product_Improve"));
@ -704,7 +705,7 @@ public class PreferencePane extends BasicPane {
useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM());
useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM());
//useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM());
this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace());
this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit());
@ -817,7 +818,7 @@ public class PreferencePane extends BasicPane {
@Override
public void run() {
ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected());
ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected());
//ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected());
}
@Override

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java

@ -64,7 +64,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
// 行号显示
TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0);
tableColumn.setCellRenderer(new CellRenderer());
tableColumn.setMaxWidth(30);
tableColumn.setMaxWidth(dataJTable.getColumnCount());
// 控制按钮
add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -220,7 +220,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
// 行号显示,每次dateJTable的表结构发生变化时都要调用
TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0);
tableColumn.setCellRenderer(new CellRenderer());
tableColumn.setMaxWidth(30);
tableColumn.setMaxWidth(dataJTable.getColumnCount());
}
private class DoubleRenderer extends DefaultTableCellRenderer {

36
designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java

@ -0,0 +1,36 @@
package com.fr.design.utils.gui;
import com.fr.stable.os.OperatingSystem;
import java.awt.*;
/**
* @author hades
* @version 10.0
* Created by hades on 2019/10/29
*/
public enum FineDesignScreen {
/**
* 一个临界dpi
* 设计器(windows/linux)大于等于该dpi界面ui变得很小 (jdk bug 在jdk9修复: http://openjdk.java.net/jeps/263)
*/
DPI_144(144);
private int value;
FineDesignScreen(int value) {
this.value = value;
}
/**
* 判断win/linux下的dpi macos不做处理
* @return
*/
public static boolean isHighDPI() {
if (OperatingSystem.isMacos()) {
return false;
}
return Toolkit.getDefaultToolkit().getScreenResolution() >= DPI_144.value;
}
}

9
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java

@ -38,7 +38,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
public HoverPainter getPainter() {
return painter;
}
/**
* 是否能在指定位置添加组件
* @param creator 组件
@ -240,7 +240,8 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
updateCreatorBackBound();
LayoutUtils.layoutRootContainer(container);
}else{
fixAbsolute(creator, x, y);
//添加到其父组件布局中的时候,要用其父组件布局添加
container.getLayoutAdapter().addBean(creator, x, y);
if (creator.shouldScaleCreator() || creator.hasTitleStyle()) {
addParentCreator(creator);
} else {
@ -303,7 +304,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
XWAbsoluteLayout layout = (XWAbsoluteLayout) container;
layout.updateBoundsWidget(creator);
}
/**
* 调整组件大小到合适尺寸位置
* @param creator 组件
@ -338,4 +339,4 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
XWAbsoluteLayout xwAbsoluteLayout = (XWAbsoluteLayout) container;
return new FRAbsoluteLayoutPropertiesGroupModel(xwAbsoluteLayout);
}
}
}

24
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java

@ -593,26 +593,26 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
switch (position) {
case COMP_TOP:
dim.width = maxWidth;
dim.height = maxHeight / 2;
finalY = yL + dim.height;
finalH = maxHeight - dim.height;
dim.height = maxHeight / 2 - actualVal / 2;
finalY = yL + dim.height + actualVal;
finalH = maxHeight - dim.height - actualVal;
break;
case COMP_BOTTOM:
dim.height = maxHeight / 2;
dim.height = maxHeight / 2 - actualVal / 2;
dim.width = maxWidth;
finalH = maxHeight - dim.height;
yL = yL + finalH;
finalH = maxHeight - dim.height - actualVal;
yL = yL + finalH + actualVal;
break;
case COMP_LEFT:
dim.width = maxWidth / 2;
dim.width = maxWidth / 2 - actualVal / 2;
dim.height = maxHeight;
finalX = xL + dim.width;
finalW = maxWidth - dim.width;
finalX = xL + dim.width + actualVal;
finalW = maxWidth - dim.width - actualVal;
break;
default:
finalW = maxWidth / 2;
xL = xL + finalW;
dim.width = maxWidth - finalW;
finalW = maxWidth / 2 - actualVal / 2;
xL = xL + finalW + actualVal;
dim.width = maxWidth - finalW - actualVal;
dim.height = maxHeight;
}
if (isCalculateChildPos) {

5
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -10,6 +10,7 @@ import com.fr.design.designer.beans.painters.FRFitLayoutPainter;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
@ -151,7 +152,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
//布局控件要先判断是不是可编辑
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout();
if (topLayout != null && !isMatchEdge && !topLayout.isEditable()) {
if (topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class)) {
return false;
}
@ -1222,4 +1223,4 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
public ConstraintsGroupModel getLayoutConstraints(XCreator creator) {
return new FRFitLayoutConstraints((XWFitLayout) container, creator);
}
}
}

5
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

@ -72,7 +72,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
XWTabFitLayout tabLayout = (XWTabFitLayout) backUpContainer;
y = adjustY(y, tabLayout);
}
addComp(creator, x, y);
//这时候应该要用计算后的父fit布局添加
this.container.getLayoutAdapter().addBean(creator, x, y);
((XWidgetCreator) creator).recalculateChildrenSize();
return true;
}
@ -100,4 +101,4 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
return ComponentUtils.getRelativeBounds(mainLayout);
}
}
}

1
designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java

@ -98,6 +98,7 @@ public class EventPropertyTable extends UIListControlPane {
Widget widget = creator.toData();
refreshNameableCreator(EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class));
populateNameObjects();
}
public void populateNameObjects() {

3
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.FineDesignScreen;
import com.fr.general.ComparatorUtils;
import com.fr.grid.Grid;
import com.fr.report.cell.TemplateCellElement;
@ -35,7 +36,7 @@ import java.awt.event.ActionListener;
public class BiasTextPainterCellEditor extends AbstractCellEditor {
private BiasTextPainterPane biasTextPainterPane = null;
private static final double MULTIPLE = 1.5;
private static final double MULTIPLE = FineDesignScreen.isHighDPI() ? 2 : 1.5;
/**
* Constructor.

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

@ -482,7 +482,14 @@ public class GridUI extends ComponentUI {
this.tmpRectangle.getHeight() - 1);
// peter:对于合并的单元格,需要先白色的背景来清除背景.
if (tmpCellElement.getColumnSpan() > 1 || tmpCellElement.getRowSpan() > 1) {
WHITE_Backgorund.paint(g2d, this.cell_back_rect);
// REPORT-23492 要看下是否设置了纸张背景 如果设置了按照背景来画
ReportSettingsProvider reportSettings = getReportSettings(report);
Background currentBackground = reportSettings.getBackground();
if (currentBackground != null) {
currentBackground.paint(g2d, this.cell_back_rect);
} else {
WHITE_Backgorund.paint(g2d, this.cell_back_rect);
}
//daniel:上面这里就有问题了啊....报表的背景在这个之前画的 会覆盖报表背景....不过只是设计器中看到预览浏览没问题
}
// peter:将这个元素添加到需要paint的元素列表当中去,留着画边框线..

Loading…
Cancel
Save