Browse Source

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

* commit 'a1c397d3f67ab0525c94f53649d62bf9c69d7378':
  REPORT-40553 决策报表-连续点击空白设计面板,body没有处于未选中状态
  代码修改
  代码修改
  REPORT-40553 决策报表-连续点击空白设计面板,body没有处于未选中状态
  REPORT-40553 决策报表-连续点击空白设计面板,body没有处于未选中状态
  REPORT-40496 【10.0.10回归】设计器里的更新升级与平台的更新升级不一致
  更新注释,明确bug原因
  REPORT-38557 修复【JDK11】添加控件图标的面板里输入框显示不全
  REPORT-40495 设计面板-多sheet-windows下韩文名称的sheet不被选中时不显示名称 【问题原因】之前用的Graphics2D的drawString方法,无法画出韩文的sheetName,debug发现走到里面,fontInfo中的font=null,而GraphHelper的drawString方法,这个方法debug走到里面发现font一直是正常的,并且两个方法里面的Graphics2D也都是SunGraphics2D,就很奇怪,没搞懂为啥 【改动思路】将调用Graphics2D的drawString方法替换为调用GraphHelper的drawString方法
  REPORT-40259【回归】Tomcat 下通过 IP 直接访问数据决策系统,切换远程之后配置页面url变了
  MOBILE-29339 两个横向布局块中间无法插入新报表块
bugfix/10.0
superman 4 years ago
parent
commit
d4a5247f5d
  1. 6
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  2. 9
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  3. 34
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  4. 18
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  5. 19
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

6
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -544,7 +544,7 @@ public class UpdateMainDialog extends UIDialog {
private void showDownLoadInfo() {
//形如 Build#release-2018.07.31.03.03.52.80
String buildNO = downloadFileConfig.optString("buildNO");
Date jarDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1));
Date jarDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1));
String serverVersionNO = downloadFileConfig.optString("versionNO");
String currentVersionNO = ProductConstants.RELEASE_VERSION;
String[] serverVersionSplitStr = serverVersionNO.split("\\.");
@ -556,8 +556,8 @@ public class UpdateMainDialog extends UIDialog {
//形如 Build#release-2018.07.31.03.03.52.80
String currentNO = GeneralUtils.readBuildNO();
if (!".".equals(StableUtils.getInstallHome())) {
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.DAY) > 0) {
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) {
updateButton.setEnabled(true);
updateLabel.setVisible(true);
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO);

9
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.Icon;
import com.fr.base.IconManager;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
@ -401,9 +402,9 @@ public class CustomIconPane extends BasicPane {
private void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED;
double rowSize[] = {p, p};
double columnSize[] = {p, p, p};
double[] rowSize = {p, p};
double[] columnSize = {p, p};
int[][] rowCount = {{1, 1}, {1, 1}};
UIButton browseButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_SelectIcon"));
browseButton.setPreferredSize(new Dimension(80, 25));
browseButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Click_this_button"));
@ -442,7 +443,7 @@ public class CustomIconPane extends BasicPane {
imagePane.add(browseButton);
Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), nameTextField}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon") + ":"), imagePane}};
JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1);
this.add(centerPane, BorderLayout.CENTER);
}

34
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -1,7 +1,5 @@
package com.fr.env;
import com.fr.base.FRContext;
import com.fr.base.ServerConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
@ -444,38 +442,6 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
new double[]{FILL}
));
setDefaultAppAndServlet();
}
/**
* 设置 app servlet 默认值
*/
private void setDefaultAppAndServlet() {
setWrap(webAppNameInput, () -> FRContext.getCommonOperator().getAppName(), RemoteWorkspaceURL.DEFAULT_WEB_APP_NAME);
setWrap(servletNameInput, () -> ServerConfig.getInstance().getServletName(), RemoteWorkspaceURL.DEFAULT_SERVLET_NAME);
}
private void setWrap(final UITextField textField, final Supplier<String> supplier, final String defaultName) {
new SwingWorker<String, Void>() {
@Override
protected String doInBackground() throws Exception {
return supplier.get();
}
@Override
protected void done() {
String name = defaultName;
try {
name = get();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage() , e);
}
if (StringUtils.isEmpty(textField.getText())) {
textField.setText(name);
}
}
}.execute();
}

18
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -166,7 +166,7 @@ public class EditingMouseListener extends MouseInputAdapter {
// 获取焦点,以便获取热键
designer.requestFocus();
}
if (e.getButton() == MouseEvent.BUTTON1) {
if (e.getButton() == MouseEvent.BUTTON1 && !beyondValidArea(e)) {
Direction dir = selectionModel.getDirectionAt(e);
if (!DesignerMode.isAuthorityEditing()) {
@ -177,13 +177,10 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.isDrawLineMode()) {
designer.updateDrawLineMode(e);
} else {
int relativeX = Math.max(0, e.getX());
int relativeY = Math.max(0, e.getY());
if (selectionModel.hasSelectionComponent()
&& selectionModel.getSelection().getRelativeBounds().contains(
designer.getHorizontalScaleValue() + relativeX,
designer.getVerticalScaleValue() + relativeY)) {
designer.getHorizontalScaleValue() + e.getX(),
designer.getVerticalScaleValue() + e.getY())) {
lastPressEvent = e;
lastXCreator = selectionModel.getSelection().getSelectedCreator();
} else {
@ -197,6 +194,15 @@ public class EditingMouseListener extends MouseInputAdapter {
e.translatePoint(oldX - e.getX(), oldY - e.getY());
}
private boolean beyondValidArea(MouseEvent e) {
if (e.getX() < 0 || e.getY() < 0 ||
e.getX() > designer.getRootComponent().getWidth() ||
e.getY() > (designer.getRootComponent().getHeight() + designer.getParaHeight())) {
return true;
}
return false;
}
private void offsetEventPoint(MouseEvent e){
int x = designer.getRelativeX(e.getX());
int y = designer.getRelativeY(e.getY());

19
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -134,7 +134,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
* 编辑的对象实例
*/
private ReportComponentComposite reportComposite;
private int selectedIndex = -1;
private JPanel buttonPane;
@ -332,7 +332,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
leftButton.setEnabled(buttonEnabled);
rightButton.setEnabled(buttonEnabled);
}
/**
* 抽出来方便OEM
* @return
@ -417,10 +417,10 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
// 画两个添加sheet图标
iconLocation = isOvertakeWidth ? (int) (maxWidth) : addIconlocation + GRAP;
paintAddButton(g2d);
}
protected void paintAddButton(Graphics2D g2d){
getAddWorkSheet().paintIcon(this, g2d, iconLocation, 3);
ADD_POLY_SHEET.paintIcon(this, g2d, iconLocation + getAddWorkSheet().getIconWidth() + ICON_SEP_DISTANCE, 3);
@ -496,7 +496,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2);
g2d.setPaint(getForeground());
g2d.drawString(sheetName, (int) textX + charWidth + 14, textAscent);
// REPORT-40495 之前的g2d.drawString(),在windows下默认宋体时,无法绘制韩文字符,而GraphHelper的drawString中对韩文做了额外处理,可以绘制韩文字符
GraphHelper.drawString(g2d, sheetName, (int) textX + charWidth + 14, textAscent);
}
/**
@ -626,7 +627,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
processRightMouseButton(evtX, evtY);
}
}
private void processRightMouseButton(int evtX, int evtY){
MenuDef def = new MenuDef();
addInsertGridShortCut(def);
@ -636,14 +637,14 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
def.updateMenu();
GUICoreUtils.showPopupMenu(tabPop, this, evtX - 1, evtY - 1);
}
private void processLeftMouseButton(int evtX){
if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) {
firstInsertActionPerformed();
} else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) {
new PolyReportInsertAction().actionPerformed(null);
}
}
protected void addInsertGridShortCut(MenuDef def){
@ -847,7 +848,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
}
protected class GridReportInsertAction extends SheetInsertAction {
@Override
protected TemplateReport newTemplateReport() {
return new WorkSheet();

Loading…
Cancel
Save