From a8549ed8ae61dc7cb54f020b3de34254897d8991 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Fri, 13 Oct 2017 23:13:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-4851=20alphafine=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=92=8C=E5=85=B3=E9=97=AD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/mainframe/DesignerFrame.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 66813b6d6d..279873f0b4 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -333,8 +333,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (processor != null) { processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); } - if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { - northEastPane.add(ad.createAlphaFinePane()); + northEastPane.add(ad.createAlphaFinePane()); + if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { + ad.createAlphaFinePane().setVisible(false); } northEastPane.add(ad.createBBSLoginPane()); } From 88388b813708e1f47596e60b95f55930728de99c Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 14 Oct 2017 14:10:46 +0800 Subject: [PATCH 2/3] rt --- .../mainframe/alphafine/component/AlphaFinePane.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index e6fb646344..5c1cb67e48 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe.alphafine.component; import com.bulenkov.iconloader.IconLoader; -import com.fr.design.DesignerEnvManager; import com.fr.design.actions.help.alphafine.AlphaFineContext; import com.fr.design.actions.help.alphafine.AlphaFineListener; import com.fr.design.dialog.BasicPane; @@ -20,12 +19,13 @@ import java.awt.event.ActionListener; public class AlphaFinePane extends BasicPane { private static AlphaFinePane alphaFinePane; + static { + Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK); + } + public AlphaFinePane() { - setPreferredSize(new Dimension(24,24)); + setPreferredSize(new Dimension(24, 24)); setLayout(new BorderLayout()); - if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { - Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK); - } UIButton refreshButton = new UIButton(); refreshButton.setIcon(IconLoader.getIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png")); refreshButton.setToolTipText(Inter.getLocText("FR-Designer_AlphaFine")); From 9ffcfb3371eb6ff54620f02cc73d617441c196a5 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 14 Oct 2017 14:16:39 +0800 Subject: [PATCH 3/3] rt --- .../design/mainframe/alphafine/component/AlphaFineDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index e712edb478..f94c35a9a5 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -4,6 +4,7 @@ import com.bulenkov.iconloader.IconLoader; import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; +import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.dialog.UIDialog; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; @@ -123,7 +124,7 @@ public class AlphaFineDialog extends UIDialog { KeyEvent e = (KeyEvent) event; KeyStroke keyStroke = (KeyStroke) KeyStroke.getAWTKeyStrokeForEvent(e); KeyStroke storeKeyStroke = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortCutKeyStore(); - if (ComparatorUtils.equals(keyStroke.toString(), storeKeyStroke.toString()) && AlphaFinePane.getAlphaFinePane().isVisible()) { + if (ComparatorUtils.equals(keyStroke.toString(), storeKeyStroke.toString()) && AlphaFineConfigManager.isALPHALicAvailable() && AlphaFinePane.getAlphaFinePane().isVisible()) { doClickAction(); }