Browse Source

快捷键设置优化

master
XiaXiang 8 years ago
parent
commit
4fb6b8c56d
  1. 27
      designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
  2. 1
      designer_base/src/com/fr/design/locale/designer.properties
  3. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  4. 2
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  5. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties

27
designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java

@ -13,10 +13,7 @@ import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.*;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
/** /**
* Created by XiaXiang on 2017/4/6. * Created by XiaXiang on 2017/4/6.
@ -100,7 +97,25 @@ public class AlphaFineConfigPane extends BasicPane {
private void createShortcutsPane(JPanel contentPane) { private void createShortcutsPane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Shortcut_Config")); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Shortcut_Config"));
shortcutsField = new UITextField(); shortcutsField = new UITextField();
shortcutsField.setEditable(false);
shortcutsField.selectAll();
shortcutsField.setPreferredSize(new Dimension(100, 20)); shortcutsField.setPreferredSize(new Dimension(100, 20));
initFieldListener();
northPane.add(new UILabel(Inter.getLocText("FR-Designer_Open") + ":"));
northPane.add(shortcutsField);
UILabel label = new UILabel(Inter.getLocText("FR-Designer-AlphaFine_SetShortcuts"));
label.setForeground(Color.RED);
northPane.add(label);
contentPane.add(northPane);
}
private void initFieldListener() {
shortcutsField.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
shortcutsField.selectAll();
}
});
shortcutsField.addKeyListener(new KeyAdapter() { shortcutsField.addKeyListener(new KeyAdapter() {
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
@ -112,11 +127,9 @@ public class AlphaFineConfigPane extends BasicPane {
shortCutKeyStore = KeyStroke.getKeyStroke(keyCode, modifier); shortCutKeyStore = KeyStroke.getKeyStroke(keyCode, modifier);
String str = shortCutKeyStore.toString(); String str = shortCutKeyStore.toString();
shortcutsField.setText(getDisplayShortCut(str)); shortcutsField.setText(getDisplayShortCut(str));
shortcutsField.selectAll();
} }
}); });
northPane.add(new UILabel(Inter.getLocText("FR-Designer_Open") + ":"));
northPane.add(shortcutsField);
contentPane.add(northPane);
} }
private void createOnlinePane(JPanel contentPane) { private void createOnlinePane(JPanel contentPane) {

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2078,3 +2078,4 @@ FR-Designer-Plugin-Store_Disconnected=
FR-Designer_AlphaFine_NoResult=no results FR-Designer_AlphaFine_NoResult=no results
FR-Designer_ConnectionFailed=connection failed FR-Designer_ConnectionFailed=connection failed
FR-Designer_NoResult=No results FR-Designer_NoResult=No results
FR-Designer-AlphaFine_SetShortcuts=

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2078,3 +2078,4 @@ FR-Designer_ConnectionFailed=Connection failed
FR-Designer_AlphaFine_EnableAlphaFine=Enable AlphaFine FR-Designer_AlphaFine_EnableAlphaFine=Enable AlphaFine
FR-Designer_AlphaFine_EnableInternet=Internet FR-Designer_AlphaFine_EnableInternet=Internet
FR-Designer_NoResult=No results FR-Designer_NoResult=No results
FR-Designer-AlphaFine_SetShortcuts=please press two key to set shortcut

2
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2075,4 +2075,4 @@ FR-Designer-Plugin-Store_Disconnected=\u65E0\u6CD5\u8FDE\u63A5\u5E94\u7528\u4E2D
FR-Designer_AlphaFine_NoResult=\u6682\u65E0\u76F8\u5173\u5185\u5BB9 FR-Designer_AlphaFine_NoResult=\u6682\u65E0\u76F8\u5173\u5185\u5BB9
FR-Designer_ConnectionFailed=\u94FE\u63A5\u5931\u8D25 FR-Designer_ConnectionFailed=\u94FE\u63A5\u5931\u8D25
FR-Designer_NoResult=\u6682\u4E0D\u652F\u6301\u663E\u793A FR-Designer_NoResult=\u6682\u4E0D\u652F\u6301\u663E\u793A
>>>>>>> d2de164e77196e797f514ec75b52974b32b99ac5 FR-Designer-AlphaFine_SetShortcuts=\u8BF7\u76F4\u63A5\u5728\u952E\u76D8\u4E0A\u6309\u4E24\u4E2A\u7EC4\u5408\u952E

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2076,3 +2076,4 @@ FR-Designer-Plugin-Store_Disconnected=
FR-Designer_AlphaFine_NoResult=\u66AB\u7121\u76F8\u95DC\u5167\u5BB9 FR-Designer_AlphaFine_NoResult=\u66AB\u7121\u76F8\u95DC\u5167\u5BB9
FR-Designer_ConnectionFailed=\u93C8\u63A5\u5931\u6557 FR-Designer_ConnectionFailed=\u93C8\u63A5\u5931\u6557
FR-Designer_NoResult=\u66AB\u4E0D\u652F\u6301\u986F\u793A FR-Designer_NoResult=\u66AB\u4E0D\u652F\u6301\u986F\u793A
FR-Designer-AlphaFine_SetShortcuts=\u8ACB\u76F4\u63A5\u5728\u9375\u76E4\u4E0A\u6309\u5169\u500B\u7D44\u5408\u9375

Loading…
Cancel
Save