Browse Source

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

master
hzzz 7 years ago
parent
commit
1f5114ede1
  1. 15
      designer/src/com/fr/grid/GridKeyListener.java

15
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;
} }
@ -200,8 +201,10 @@ public class GridKeyListener implements KeyListener {
} }
} }
} }
/** /**
* 小键盘 * 小键盘
*
* @param code * @param code
* @return * @return
*/ */

Loading…
Cancel
Save