|
|
@ -69,28 +69,21 @@ 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() { |
|
|
|
private void directKeyPressed(int direction) { |
|
|
|
if (grid.isCellEditing()) { |
|
|
|
if (grid.isCellEditing()) { |
|
|
|
grid.stopEditing(); |
|
|
|
grid.stopEditing(); |
|
|
|
} |
|
|
|
} |
|
|
|
selectionMove(ReportConstants.MOVE_DIRECTION_DOWN); |
|
|
|
selectionMove(direction); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void tabKeyPressed() { |
|
|
|
|
|
|
|
if (grid.isCellEditing()) { |
|
|
|
|
|
|
|
grid.stopEditing(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
selectionMove(ReportConstants.MOVE_DIRECTION_RIGHT); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|