Browse Source

Pull request #12106: REPORT-94476 设计器中按上方向键后上面的单元格被清空

Merge in DESIGN/design from ~JOHN.YING/design:final/11.0 to final/11.0

* commit 'a96940ccd83d40ea040d1fb300e77bc893f12811':
  REPORT-94476 设计器中按上方向键后上面的单元格被清空--注释
  REPORT-94476 设计器中按上方向键后上面的单元格被清空
new-design
John.Ying-应志浩 2 years ago
parent
commit
6dbb2ba38f
  1. 24
      designer-realize/src/main/java/com/fr/grid/GridKeyAction.java

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