Browse Source

Merge remote-tracking branch 'upstream/final/11.0' into final/11.0

new-design
Sky.Luo 2 years ago
parent
commit
4687d38eff
  1. 6
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  2. 24
      designer-realize/src/main/java/com/fr/grid/GridKeyAction.java

6
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -589,7 +589,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
} else { } else {
path = driverPath; path = driverPath;
} }
if(JarFileParseUtil.hasDuplicateDriver(con.getDriver(), path)) { if(hasDuplicateDriver(con.getDriver(), path)) {
testResult.setForeground(Color.RED); testResult.setForeground(Color.RED);
testResult.setText(Toolkit.i18nText("Fine_Designer_Driver_Conflict")); testResult.setText(Toolkit.i18nText("Fine_Designer_Driver_Conflict"));
} else { } else {
@ -605,7 +605,9 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
return xBorderPanel; return xBorderPanel;
} }
private boolean hasDuplicateDriver(String driver, String folder) {
return JarFileParseUtil.hasDuplicateDriver(driver, folder);
}
} }
} }

24
designer-realize/src/main/java/com/fr/grid/GridKeyAction.java

@ -69,28 +69,26 @@ public class GridKeyAction extends AbstractAction {
} else if ("right".equals(actionKey)) { } else if ("right".equals(actionKey)) {
selectionMove(ReportConstants.MOVE_DIRECTION_RIGHT); selectionMove(ReportConstants.MOVE_DIRECTION_RIGHT);
} else if ("up".equals(actionKey)) { } else if ("up".equals(actionKey)) {
selectionMove(ReportConstants.MOVE_DIRECTION_UP); directKeyPressed(ReportConstants.MOVE_DIRECTION_UP);
} else if ("down".equals(actionKey)) { } else if ("down".equals(actionKey)) {
selectionMove(ReportConstants.MOVE_DIRECTION_DOWN); directKeyPressed(ReportConstants.MOVE_DIRECTION_DOWN);
} else if ("enter".equals(actionKey)) { } else if ("enter".equals(actionKey)) {
enterKeyPressed(); directKeyPressed(ReportConstants.MOVE_DIRECTION_DOWN);
} else if ("tab".equals(actionKey)) { } else if ("tab".equals(actionKey)) {
tabKeyPressed(); directKeyPressed(ReportConstants.MOVE_DIRECTION_RIGHT);
} }
} }
private void enterKeyPressed() { /**
if (grid.isCellEditing()) { * 传入方向进行单元格的方向移动
grid.stopEditing(); *
} * @param direction 方向
selectionMove(ReportConstants.MOVE_DIRECTION_DOWN); */
} private void directKeyPressed(int direction) {
private void tabKeyPressed() {
if (grid.isCellEditing()) { if (grid.isCellEditing()) {
grid.stopEditing(); grid.stopEditing();
} }
selectionMove(ReportConstants.MOVE_DIRECTION_RIGHT); selectionMove(direction);
} }
/** /**

Loading…
Cancel
Save