Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Yyming 4 years ago
parent
commit
5ab88bc56c
  1. 6
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  2. 9
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  3. 3
      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() { private void showDownLoadInfo() {
//形如 Build#release-2018.07.31.03.03.52.80 //形如 Build#release-2018.07.31.03.03.52.80
String buildNO = downloadFileConfig.optString("buildNO"); 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 serverVersionNO = downloadFileConfig.optString("versionNO");
String currentVersionNO = ProductConstants.RELEASE_VERSION; String currentVersionNO = ProductConstants.RELEASE_VERSION;
String[] serverVersionSplitStr = serverVersionNO.split("\\."); String[] serverVersionSplitStr = serverVersionNO.split("\\.");
@ -556,8 +556,8 @@ public class UpdateMainDialog extends UIDialog {
//形如 Build#release-2018.07.31.03.03.52.80 //形如 Build#release-2018.07.31.03.03.52.80
String currentNO = GeneralUtils.readBuildNO(); String currentNO = GeneralUtils.readBuildNO();
if (!".".equals(StableUtils.getInstallHome())) { if (!".".equals(StableUtils.getInstallHome())) {
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.DAY) > 0) { if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) {
updateButton.setEnabled(true); updateButton.setEnabled(true);
updateLabel.setVisible(true); updateLabel.setVisible(true);
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO); loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO);

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

@ -166,7 +166,7 @@ public class EditingMouseListener extends MouseInputAdapter {
// 获取焦点,以便获取热键 // 获取焦点,以便获取热键
designer.requestFocus(); designer.requestFocus();
} }
if (e.getButton() == MouseEvent.BUTTON1) { if (e.getButton() == MouseEvent.BUTTON1 && e.getX() > 0 && e.getY() > 0) {
Direction dir = selectionModel.getDirectionAt(e); Direction dir = selectionModel.getDirectionAt(e);
if (!DesignerMode.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
@ -177,13 +177,10 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.isDrawLineMode()) { if (designer.isDrawLineMode()) {
designer.updateDrawLineMode(e); designer.updateDrawLineMode(e);
} else { } else {
int relativeX = Math.max(0, e.getX());
int relativeY = Math.max(0, e.getY());
if (selectionModel.hasSelectionComponent() if (selectionModel.hasSelectionComponent()
&& selectionModel.getSelection().getRelativeBounds().contains( && selectionModel.getSelection().getRelativeBounds().contains(
designer.getHorizontalScaleValue() + relativeX, designer.getHorizontalScaleValue() + e.getX(),
designer.getVerticalScaleValue() + relativeY)) { designer.getVerticalScaleValue() + e.getY())) {
lastPressEvent = e; lastPressEvent = e;
lastXCreator = selectionModel.getSelection().getSelectedCreator(); lastXCreator = selectionModel.getSelection().getSelectedCreator();
} else { } else {

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

@ -496,7 +496,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2); sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2);
g2d.setPaint(getForeground()); 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);
} }
/** /**

Loading…
Cancel
Save