From 99be8cc93a34dbd415558c980a27a22bf90f5eda Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 27 Dec 2019 10:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1,=20=E5=86=B2?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIControlPane.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index 27934efb79..6ab6bce56f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -9,19 +9,10 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.ShortCut; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; - import com.fr.stable.os.OperatingSystem; -import javax.swing.BorderFactory; -import javax.swing.JComponent; -import javax.swing.JDialog; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSplitPane; -import javax.swing.border.EmptyBorder; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; @@ -35,6 +26,14 @@ import java.awt.Point; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.Window; +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JSplitPane; +import javax.swing.border.EmptyBorder; + import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; @@ -73,7 +72,6 @@ abstract class UIControlPane extends JControlPane { this.creators = this.createNameableCreators(); initCardPane(); - if (isNewStyle()) { getPopupEditDialog(cardPane); this.add(getLeftPane(), BorderLayout.CENTER); @@ -149,9 +147,7 @@ abstract class UIControlPane extends JControlPane { topToolBar.setLayout(new BorderLayout()); ShortCut addItem = shortCutFactory.addItemShortCut().getShortCut(); addItem.intoJToolBar(topToolBar); - JPanel leftTopPane = getLeftTopPane(topToolBar); - leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); leftPane.add(leftTopPane, BorderLayout.NORTH); @@ -172,7 +168,6 @@ abstract class UIControlPane extends JControlPane { JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); leftTopPane.add(toolBarPane, BorderLayout.EAST); leftTopPane.add(addItemLabel, BorderLayout.CENTER); - return leftTopPane; } @@ -203,7 +198,6 @@ abstract class UIControlPane extends JControlPane { topToolBar.validate(); this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板 cardPane.add(controlUpdatePane, "EDIT"); - this.repaint(); } @@ -249,7 +243,6 @@ abstract class UIControlPane extends JControlPane { return; } } - // 要隐藏 先检查有没有非法输入 // 非法输入检查放在最后,因为可能出现面板弹出新弹框而失去焦点的情况,比如 输入公式时,弹出公式编辑对话框 try { @@ -269,7 +262,8 @@ abstract class UIControlPane extends JControlPane { addWindowFocusListener(new WindowAdapter() { @Override public void windowLostFocus(WindowEvent e) { - if (OperatingSystem.isLinux()) { + //在Linux上拉回焦点,不然导致一些面板关不掉 + if(OperatingSystem.isLinux()) { requestFocus(); } hideDialog();