From 71b44df358a306fc07d006a0d6f39f73c78b51a9 Mon Sep 17 00:00:00 2001 From: hzzz Date: Sat, 27 May 2017 10:37:34 +0800 Subject: [PATCH] back 1 --- .../mainframe/AuthorityToolBarPane.java | 5 ++-- designer/src/com/fr/grid/GridKeyListener.java | 5 ++-- .../src/com/fr/grid/GridMouseAdapter.java | 5 ++-- .../common/inputevent/InputEventBaseOnOS.java | 21 ------------- .../gui/icombobox/ExtendedComboBox.java | 21 ++++--------- .../fr/design/gui/icombobox/UIComboBoxUI.java | 30 +++++++------------ .../com/fr/design/gui/itable/TableSorter.java | 3 +- .../UserObjectRefreshJTree.java | 3 +- .../fr/design/roleAuthority/UIRoleTreeUI.java | 3 +- .../designer/beans/models/SelectionModel.java | 5 ++-- 10 files changed, 26 insertions(+), 75 deletions(-) delete mode 100644 designer_base/src/com/fr/common/inputevent/InputEventBaseOnOS.java diff --git a/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java b/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java index fcb6988b95..da856173a7 100644 --- a/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java +++ b/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe; import com.fr.base.ConfigManager; import com.fr.base.ConfigManagerProvider; import com.fr.base.FRContext; -import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.icombobox.UIComboBox; @@ -68,7 +67,7 @@ public class AuthorityToolBarPane extends BasicBeanPane extends BasicBeanPane> extends } } // marks:鼠标在上次选中的paths上,则将上次的paths设为的树的路径,否则将鼠标所在的节点设为选中的节点 - if (!(e.isShiftDown() || InputEventBaseOnOS.isControlDown(e))) { + if (!(e.isShiftDown() || e.isControlDown())) { if (isFind) { setSelectionPaths(oldPaths); } else { diff --git a/designer_base/src/com/fr/design/roleAuthority/UIRoleTreeUI.java b/designer_base/src/com/fr/design/roleAuthority/UIRoleTreeUI.java index 9b996410ac..e6b049b33b 100644 --- a/designer_base/src/com/fr/design/roleAuthority/UIRoleTreeUI.java +++ b/designer_base/src/com/fr/design/roleAuthority/UIRoleTreeUI.java @@ -1,6 +1,5 @@ package com.fr.design.roleAuthority; -import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.gui.itree.UITreeUI; import javax.swing.tree.TreePath; @@ -16,7 +15,7 @@ import java.awt.event.MouseEvent; public class UIRoleTreeUI extends UITreeUI { protected void selectPathForEvent(TreePath path, MouseEvent event) { /* Adjust from the anchor point. */ - if (InputEventBaseOnOS.isControlDown(event) && tree.isPathSelected(path)) { + if (event.isControlDown() && tree.isPathSelected(path)) { tree.removeSelectionPath(path); } else if (event.isShiftDown()) { tree.setAnchorSelectionPath(null); diff --git a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java index 2fde27019b..13eaa18ac3 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java @@ -1,6 +1,5 @@ package com.fr.design.designer.beans.models; -import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.events.DesignerEvent; @@ -62,7 +61,7 @@ public class SelectionModel { * @param e 鼠标事件 */ public void selectACreatorAtMouseEvent(MouseEvent e) { - if (!InputEventBaseOnOS.isControlDown(e) && !e.isShiftDown()) { + if (!e.isControlDown() && !e.isShiftDown()) { // 如果Ctrl或者Shift键盘没有按下,则清除已经选择的组件 selection.reset(); } @@ -373,7 +372,7 @@ public class SelectionModel { public Direction getDirectionAt(MouseEvent e) { Direction dir; - if (InputEventBaseOnOS.isControlDown(e) || e.isShiftDown()) { + if (e.isControlDown() || e.isShiftDown()) { XCreator creator = designer.getComponentAt(e.getX(), e.getY(), selection.getSelectedCreators()); if (creator != designer.getRootComponent() && selection.addedable(creator)) { return Location.add;