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. 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-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 && e.getX() > 0 && e.getY() > 0) {
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 {

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