Browse Source

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

master
hzzz 8 years ago committed by hzzz
parent
commit
6ebd8cb293
  1. 4
      designer/src/com/fr/design/actions/file/newReport/NewPolyReportAction.java
  2. 4
      designer/src/com/fr/design/actions/file/newReport/NewWorkBookAction.java
  3. 12
      designer/src/com/fr/design/mainframe/ElementCasePane.java
  4. 2
      designer/src/com/fr/design/mainframe/FormatBrushAction.java
  5. 4
      designer_base/src/com/fr/design/actions/edit/CopyAction.java
  6. 4
      designer_base/src/com/fr/design/actions/edit/CutAction.java
  7. 4
      designer_base/src/com/fr/design/actions/edit/PasteAction.java
  8. 5
      designer_base/src/com/fr/design/gui/autocomplete/AutoCompletion.java
  9. 8
      designer_base/src/com/fr/design/gui/frpane/UIAdvancedTextPane.java
  10. 4
      designer_base/src/com/fr/design/gui/icombobox/ExtendedComboBox.java
  11. 4
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  12. 4
      designer_base/src/com/fr/design/gui/itabpane/UITabsHeaderIconPane.java
  13. 24
      designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/RTADefaultInputMap.java
  14. 8
      designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java
  15. 20
      designer_base/src/com/fr/design/menu/KeySetUtils.java
  16. 4
      designer_form/src/com/fr/design/designer/beans/actions/CopyAction.java
  17. 4
      designer_form/src/com/fr/design/designer/beans/actions/CutAction.java
  18. 4
      designer_form/src/com/fr/design/designer/beans/actions/PasteAction.java
  19. 4
      designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java
  20. 4
      designer_form/src/com/fr/design/mainframe/widget/editors/DataTableConfigPane.java

4
designer/src/com/fr/design/actions/file/newReport/NewPolyReportAction.java

@ -11,13 +11,15 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JPolyWorkBook; import com.fr.design.mainframe.JPolyWorkBook;
import com.fr.general.Inter; import com.fr.general.Inter;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class NewPolyReportAction extends UpdateAction { public class NewPolyReportAction extends UpdateAction {
public NewPolyReportAction() { public NewPolyReportAction() {
this.setName(Inter.getLocText("M-New_Multi_Report")); this.setName(Inter.getLocText("M-New_Multi_Report"));
this.setMnemonic('F'); this.setMnemonic('F');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/formExport.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/formExport.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, DEFAULT_MODIFIER));
} }
/** /**

4
designer/src/com/fr/design/actions/file/newReport/NewWorkBookAction.java

@ -12,6 +12,8 @@ import java.awt.event.ActionEvent;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class NewWorkBookAction extends UpdateAction { public class NewWorkBookAction extends UpdateAction {
public NewWorkBookAction() { public NewWorkBookAction() {
@ -47,7 +49,7 @@ public class NewWorkBookAction extends UpdateAction {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_N, DEFAULT_MODIFIER);
} }
}; };

12
designer/src/com/fr/design/mainframe/ElementCasePane.java

@ -127,6 +127,8 @@ import com.fr.stable.ColumnRow;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.unit.FU; import com.fr.stable.unit.FU;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* This class used to edit Report. * This class used to edit Report.
*/ */
@ -280,7 +282,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
} }
} }
}); });
formatBrush.registerKeyboardAction(keyListener, KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW); formatBrush.registerKeyboardAction(keyListener, KeyStroke.getKeyStroke(KeyEvent.VK_B, DEFAULT_MODIFIER), JComponent.WHEN_IN_FOCUSED_WINDOW);
formatBrush.registerKeyboardAction(escKey, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); formatBrush.registerKeyboardAction(escKey, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
} }
@ -855,7 +857,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
// clearReportPage old values. // clearReportPage old values.
inputMapAncestor.clear(); inputMapAncestor.clear();
actionMap.clear(); actionMap.clear();
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK), "cut"); inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER), "cut");
actionMap.put("cut", new AbstractAction() { actionMap.put("cut", new AbstractAction() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
if (cut()) { if (cut()) {
@ -863,13 +865,13 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
} }
} }
}); });
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK), "copy"); inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), "copy");
actionMap.put("copy", new AbstractAction() { actionMap.put("copy", new AbstractAction() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
copy(); copy();
} }
}); });
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK), "paste"); inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER), "paste");
actionMap.put("paste", new AbstractAction() { actionMap.put("paste", new AbstractAction() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
if (paste()) { if (paste()) {
@ -887,7 +889,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
} }
} }
}); });
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK), "delete_all"); inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, DEFAULT_MODIFIER), "delete_all");
actionMap.put("delete_all", new AbstractAction() { actionMap.put("delete_all", new AbstractAction() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
if (clearAll()) { if (clearAll()) {

2
designer/src/com/fr/design/mainframe/FormatBrushAction.java

File diff suppressed because one or more lines are too long

4
designer_base/src/com/fr/design/actions/edit/CopyAction.java

@ -11,6 +11,8 @@ import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* Copy. * Copy.
*/ */
@ -21,7 +23,7 @@ public class CopyAction extends TemplateComponentAction {
this.setName(Inter.getLocText("M_Edit-Copy")); this.setName(Inter.getLocText("M_Edit-Copy"));
this.setMnemonic('C'); this.setMnemonic('C');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER));
} }
@Override @Override

4
designer_base/src/com/fr/design/actions/edit/CutAction.java

@ -12,6 +12,8 @@ import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter; import com.fr.general.Inter;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* Cut. * Cut.
*/ */
@ -25,7 +27,7 @@ public class CutAction extends TemplateComponentAction {
this.setName(Inter.getLocText("M_Edit-Cut")); this.setName(Inter.getLocText("M_Edit-Cut"));
this.setMnemonic('T'); this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));
} }
@Override @Override

4
designer_base/src/com/fr/design/actions/edit/PasteAction.java

@ -12,6 +12,8 @@ import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter; import com.fr.general.Inter;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* Paste. * Paste.
*/ */
@ -25,7 +27,7 @@ public class PasteAction extends TemplateComponentAction {
this.setName(Inter.getLocText("M_Edit-Paste")); this.setName(Inter.getLocText("M_Edit-Paste"));
this.setMnemonic('P'); this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
} }
@Override @Override

5
designer_base/src/com/fr/design/gui/autocomplete/AutoCompletion.java

@ -20,6 +20,8 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.text.*; import javax.swing.text.*;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* Adds auto-completion to a text component. Provides a popup window with a * Adds auto-completion to a text component. Provides a popup window with a
@ -308,8 +310,7 @@ public class AutoCompletion {
*/ */
public static KeyStroke getDefaultTriggerKey() { public static KeyStroke getDefaultTriggerKey() {
// Default to CTRL, even on Mac, since Ctrl+Space activates Spotlight // Default to CTRL, even on Mac, since Ctrl+Space activates Spotlight
int mask = InputEvent.CTRL_MASK; return KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, DEFAULT_MODIFIER);
return KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, mask);
} }

8
designer_base/src/com/fr/design/gui/frpane/UIAdvancedTextPane.java

@ -20,6 +20,8 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* p:这是一个增强的JTextPane,支持很多Action * p:这是一个增强的JTextPane,支持很多Action
*/ */
@ -143,7 +145,7 @@ public class UIAdvancedTextPane extends UITextPane {
setName(Inter.getLocText("M_Edit-Cut")); setName(Inter.getLocText("M_Edit-Cut"));
setMnemonic('T'); setMnemonic('T');
setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png")); setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_MASK)); setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));
} }
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -162,7 +164,7 @@ public class UIAdvancedTextPane extends UITextPane {
this.setName(Inter.getLocText("M_Edit-Copy")); this.setName(Inter.getLocText("M_Edit-Copy"));
this.setMnemonic('C'); this.setMnemonic('C');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER));
} }
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -181,7 +183,7 @@ public class UIAdvancedTextPane extends UITextPane {
this.setName(Inter.getLocText("M_Edit-Paste")); this.setName(Inter.getLocText("M_Edit-Paste"));
this.setMnemonic('P'); this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
} }
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {

4
designer_base/src/com/fr/design/gui/icombobox/ExtendedComboBox.java

@ -17,6 +17,8 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicComboPopup; import javax.swing.plaf.basic.BasicComboPopup;
import javax.swing.plaf.basic.ComboPopup; import javax.swing.plaf.basic.ComboPopup;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class ExtendedComboBox extends UIComboBox { public class ExtendedComboBox extends UIComboBox {
private static final int VALUE120 = 120; private static final int VALUE120 = 120;
@ -79,7 +81,7 @@ public class ExtendedComboBox extends UIComboBox {
// Key from the list. // Key from the list.
// ie., don't allow CTRL key deselection. // ie., don't allow CTRL key deselection.
e = new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers() e = new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers()
^ InputEvent.CTRL_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); ^ DEFAULT_MODIFIER, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger());
} }
super.processMouseEvent(e); super.processMouseEvent(e);
} }

4
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -24,6 +24,8 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* @author zhou F * @author zhou F
* @since 2012-5-9下午4:33:07 * @since 2012-5-9下午4:33:07
@ -208,7 +210,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
@Override @Override
public void processMouseEvent(MouseEvent e) { public void processMouseEvent(MouseEvent e) {
if (e.isControlDown()) { if (e.isControlDown()) {
e = new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers() ^ InputEvent.CTRL_MASK, e.getX(), e.getY(), e.getClickCount(), e = new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers() ^ DEFAULT_MODIFIER, e.getX(), e.getY(), e.getClickCount(),
e.isPopupTrigger()); e.isPopupTrigger());
} }
super.processMouseEvent(e); super.processMouseEvent(e);

4
designer_base/src/com/fr/design/gui/itabpane/UITabsHeaderIconPane.java

@ -32,6 +32,8 @@ import com.fr.design.gui.core.UITabComponent;
import com.fr.design.gui.ibutton.UITabButton; import com.fr.design.gui.ibutton.UITabButton;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* 本来想弄个延迟加载的发现在单元格属性表那边没有意义就算了.这个面板是纯粹的没有与模板的任何交互操作(比如说populate() update()) * 本来想弄个延迟加载的发现在单元格属性表那边没有意义就算了.这个面板是纯粹的没有与模板的任何交互操作(比如说populate() update())
* *
@ -125,7 +127,7 @@ public class UITabsHeaderIconPane extends JPanel implements UITabComponent {
inputMapAncestor.clear(); inputMapAncestor.clear();
actionMap.clear(); actionMap.clear();
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, KeyEvent.CTRL_MASK), "switch"); inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, DEFAULT_MODIFIER), "switch");
actionMap.put("switch", new AbstractAction() { actionMap.put("switch", new AbstractAction() {
/** /**

24
designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/RTADefaultInputMap.java

@ -41,6 +41,14 @@ import javax.swing.text.DefaultEditorKit;
public class RTADefaultInputMap extends InputMap { public class RTADefaultInputMap extends InputMap {
/**
* Returns the default modifier key for a system. For example, on Windows
* this would be the CTRL key (<code>InputEvent.CTRL_MASK</code>).
*
* @return The default modifier key.
*/
public static final int DEFAULT_MODIFIER = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
/** /**
* Constructs the default input map for an <code>RTextArea</code>. * Constructs the default input map for an <code>RTextArea</code>.
*/ */
@ -48,7 +56,7 @@ public class RTADefaultInputMap extends InputMap {
super(); super();
int defaultModifier = getDefaultModifier(); int defaultModifier = DEFAULT_MODIFIER;
//int ctrl = InputEvent.CTRL_MASK; //int ctrl = InputEvent.CTRL_MASK;
int alt = InputEvent.ALT_MASK; int alt = InputEvent.ALT_MASK;
int shift = InputEvent.SHIFT_MASK; int shift = InputEvent.SHIFT_MASK;
@ -134,18 +142,4 @@ public class RTADefaultInputMap extends InputMap {
*/ */
} }
/**
* Returns the default modifier key for a system. For example, on Windows
* this would be the CTRL key (<code>InputEvent.CTRL_MASK</code>).
*
* @return The default modifier key.
*/
protected static final int getDefaultModifier() {
return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
}
} }

8
designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java

@ -24,6 +24,8 @@ import java.util.Date;
import java.util.logging.Handler; import java.util.logging.Handler;
import java.util.logging.LogRecord; import java.util.logging.LogRecord;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class DesignerLogHandler { public class DesignerLogHandler {
protected static final int INFO_INT = FRLogLevel.INFO.intValue(); protected static final int INFO_INT = FRLogLevel.INFO.intValue();
protected static final int ERRO_INT = FRLogLevel.ERROR.intValue(); protected static final int ERRO_INT = FRLogLevel.ERROR.intValue();
@ -158,9 +160,9 @@ public class DesignerLogHandler {
clear.setIcon(BaseUtils.readIcon("/com/fr/design/images/log/clear.png")); clear.setIcon(BaseUtils.readIcon("/com/fr/design/images/log/clear.png"));
popup.add(clear); popup.add(clear);
selectAll.setAccelerator(KeyStroke.getKeyStroke('A', InputEvent.CTRL_MASK)); selectAll.setAccelerator(KeyStroke.getKeyStroke('A', DEFAULT_MODIFIER));
copy.setAccelerator(KeyStroke.getKeyStroke('C', InputEvent.CTRL_MASK)); copy.setAccelerator(KeyStroke.getKeyStroke('C', DEFAULT_MODIFIER));
clear.setAccelerator(KeyStroke.getKeyStroke('L', InputEvent.CTRL_MASK)); clear.setAccelerator(KeyStroke.getKeyStroke('L', DEFAULT_MODIFIER));
jTextArea.addMouseListener(new MouseAdapter() { jTextArea.addMouseListener(new MouseAdapter() {
// check for right click // check for right click

20
designer_base/src/com/fr/design/menu/KeySetUtils.java

@ -12,6 +12,8 @@ import javax.swing.*;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.util.Locale; import java.util.Locale;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
/** /**
* Created by IntelliJ IDEA. * Created by IntelliJ IDEA.
* Author : daisy * Author : daisy
@ -36,7 +38,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_O, DEFAULT_MODIFIER);
} }
}; };
@ -71,7 +73,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_W, DEFAULT_MODIFIER);
} }
}; };
@ -88,7 +90,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_S, DEFAULT_MODIFIER);
} }
}; };
@ -122,7 +124,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_Z, DEFAULT_MODIFIER);
} }
}; };
@ -139,7 +141,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_Y, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_Y, DEFAULT_MODIFIER);
} }
}; };
@ -156,7 +158,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_E, DEFAULT_MODIFIER);
} }
}; };
@ -353,7 +355,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_M, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_M, DEFAULT_MODIFIER);
} }
}; };
@ -370,7 +372,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_E, DEFAULT_MODIFIER);
} }
}; };
@ -387,7 +389,7 @@ public class KeySetUtils {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_E, DEFAULT_MODIFIER);
} }
}; };

4
designer_form/src/com/fr/design/designer/beans/actions/CopyAction.java

@ -8,6 +8,8 @@ import javax.swing.*;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class CopyAction extends FormEditAction { public class CopyAction extends FormEditAction {
public CopyAction(FormDesigner t) { public CopyAction(FormDesigner t) {
@ -15,7 +17,7 @@ public class CopyAction extends FormEditAction {
this.setName(Inter.getLocText("M_Edit-Copy")); this.setName(Inter.getLocText("M_Edit-Copy"));
this.setMnemonic('C'); this.setMnemonic('C');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER));
} }
@Override @Override

4
designer_form/src/com/fr/design/designer/beans/actions/CutAction.java

@ -9,6 +9,8 @@ import com.fr.base.BaseUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class CutAction extends FormEditAction { public class CutAction extends FormEditAction {
public CutAction(FormDesigner t) { public CutAction(FormDesigner t) {
@ -16,7 +18,7 @@ public class CutAction extends FormEditAction {
this.setName(Inter.getLocText("M_Edit-Cut")); this.setName(Inter.getLocText("M_Edit-Cut"));
this.setMnemonic('T'); this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));
} }
@Override @Override

4
designer_form/src/com/fr/design/designer/beans/actions/PasteAction.java

@ -9,6 +9,8 @@ import com.fr.base.BaseUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class PasteAction extends FormEditAction { public class PasteAction extends FormEditAction {
public PasteAction(FormDesigner t) { public PasteAction(FormDesigner t) {
@ -16,7 +18,7 @@ public class PasteAction extends FormEditAction {
this.setName(Inter.getLocText("M_Edit-Paste")); this.setName(Inter.getLocText("M_Edit-Paste"));
this.setMnemonic('P'); this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
} }
@Override @Override

4
designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java

@ -14,6 +14,8 @@ import java.awt.event.ActionEvent;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class NewFormAction extends UpdateAction { public class NewFormAction extends UpdateAction {
public NewFormAction() { public NewFormAction() {
@ -48,7 +50,7 @@ public class NewFormAction extends UpdateAction {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.CTRL_MASK); return KeyStroke.getKeyStroke(KeyEvent.VK_F, DEFAULT_MODIFIER);
} }
}; };
} }

4
designer_form/src/com/fr/design/mainframe/widget/editors/DataTableConfigPane.java

@ -21,6 +21,8 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class DataTableConfigPane extends JComponent implements PropertyChangeListener { public class DataTableConfigPane extends JComponent implements PropertyChangeListener {
private DataEditingTable table; private DataEditingTable table;
@ -183,7 +185,7 @@ public class DataTableConfigPane extends JComponent implements PropertyChangeLis
this.setName(Inter.getLocText("M_Edit-Cut")); this.setName(Inter.getLocText("M_Edit-Cut"));
this.setMnemonic('T'); this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_MASK)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));
} }
@Override @Override

Loading…
Cancel
Save