Browse Source

REPORT-2773 mac中复制快捷键的修复

master
hzzz 8 years ago
parent
commit
419dfc1423
  1. 19
      designer/src/com/fr/grid/GridKeyListener.java
  2. 2
      designer_base/src/com/fr/design/actions/help/AboutPane.java

19
designer/src/com/fr/grid/GridKeyListener.java

@ -1,17 +1,17 @@
package com.fr.grid; package com.fr.grid;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.ElementCase;
import com.fr.stable.OperatingSystem;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
/** /**
*
* @editor zhou * @editor zhou
* @since 2012-3-23上午10:55:36 * @since 2012-3-23上午10:55:36
*/ */
@ -70,7 +70,8 @@ public class GridKeyListener implements KeyListener {
} }
// Richie:Ctrl + A全选单元格 // Richie:Ctrl + A全选单元格
case KeyEvent.VK_A: case KeyEvent.VK_A:
if (code == KeyEvent.VK_A && evt.isControlDown()) { if ((OperatingSystem.isWindows() && evt.isControlDown())
|| OperatingSystem.isMacOS() && evt.isMetaDown()) {
reportPane.setSelection(new CellSelection(0, 0, report.getColumnCount(), report.getRowCount())); reportPane.setSelection(new CellSelection(0, 0, report.getColumnCount(), report.getRowCount()));
isNeedRepaint = true; isNeedRepaint = true;
} }
@ -91,7 +92,7 @@ public class GridKeyListener implements KeyListener {
*/ */
private void dealWithFloatSelection(ElementCasePane reportPane, int code) { private void dealWithFloatSelection(ElementCasePane reportPane, int code) {
boolean isContentChanged = false; boolean isContentChanged = false;
FloatSelection floatselection = (FloatSelection)reportPane.getSelection(); FloatSelection floatselection = (FloatSelection) reportPane.getSelection();
switch (code) { switch (code) {
case KeyEvent.VK_LEFT: {// left case KeyEvent.VK_LEFT: {// left
@ -200,12 +201,14 @@ public class GridKeyListener implements KeyListener {
} }
} }
} }
/** /**
* 小键盘 * 小键盘
*
* @param code * @param code
* @return * @return
*/ */
private static boolean IS_NUM_PAD_KEY(int code){ private static boolean IS_NUM_PAD_KEY(int code) {
return code == KeyEvent.VK_NUMPAD0 || code == KeyEvent.VK_NUMPAD1 return code == KeyEvent.VK_NUMPAD0 || code == KeyEvent.VK_NUMPAD1
|| code == KeyEvent.VK_NUMPAD2 || code == KeyEvent.VK_NUMPAD2
|| code == KeyEvent.VK_NUMPAD3 || code == KeyEvent.VK_NUMPAD3

2
designer_base/src/com/fr/design/actions/help/AboutPane.java

@ -47,7 +47,7 @@ public class AboutPane extends JPanel {
BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane( BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane(
getBuildTitle(), getBuildTitle(),
GeneralUtils.readFullBuildNO(), GeneralUtils.readBuildNO(),
new String[]{ new String[]{
Inter.getLocText("FR-Designer-Basic_Copy_Build_NO"), Inter.getLocText("FR-Designer-Basic_Copy_Build_NO"),
Inter.getLocText("FR-Designer-Basic_Copy_Build_NO_OK") Inter.getLocText("FR-Designer-Basic_Copy_Build_NO_OK")

Loading…
Cancel
Save