From 4f70159da57d5a2e3731f8fa9040a5872f677b36 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Thu, 20 May 2021 15:13:14 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-51678=20=E5=90=8C=E6=AD=A5=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=8F=92=E4=BB=B6=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/share/ui/local/ToolbarPane.java | 2 +- .../share/ui/online/AbstractOnlineWidgetShowPane.java | 2 +- .../share/ui/online/OnlineWidgetShowPane.java | 2 +- .../mainframe/share/ui/widgetfilter/FilterPane.java | 10 ++++++---- .../com/fr/design/share/ui/config/ShareConfigPane.java | 2 +- .../com/fr/design/share/ui/generate/EffectContent.java | 5 +++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/ToolbarPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/ToolbarPane.java index 4a32b149ed..c720e7f9cc 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/ToolbarPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/ToolbarPane.java @@ -119,7 +119,7 @@ class ToolbarPane extends JPanel { private FilterPane createFilterPane() { filterPanel = FilterPane.createLocalFilterPane(); filterPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); - filterPanel.registerChangeListerner(e -> LocalWidgetRepoPane.getInstance().refreshShowPanel()); + filterPanel.registerChangeListener(e -> LocalWidgetRepoPane.getInstance().refreshShowPanel()); return filterPanel; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java index 5a5d432344..fc2390d619 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java @@ -138,7 +138,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel { } public void initFilterPaneListener(FilterPane filterPane) { - filterPane.registerChangeListerner(new ChangeListener() { + filterPane.registerChangeListener(new ChangeListener() { @Override public void stateChanged(final ChangeEvent e) { String filterStr = e.getSource().toString(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java index 691defde77..2325fb1300 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java @@ -90,7 +90,7 @@ public class OnlineWidgetShowPane extends AbstractOnlineWidgetShowPane { @Override public void initFilterPaneListener(FilterPane filterPane) { super.initFilterPaneListener(filterPane); - filterPane.registerChangeListerner(new ChangeListener() { + filterPane.registerChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { lastFilter = e.getSource().toString(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterPane.java index ce976e2171..4e8f9ffc5f 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterPane.java @@ -46,7 +46,7 @@ public class FilterPane extends JPanel { private Popup popup; private boolean showPopup = false; private FilterPopupPane filterPopupPane; - private ChangeListener changeListener; + private List changeListenerList = new ArrayList<>(); private final AWTEventListener awtEventListener; List listenerList = new ArrayList<>(); @@ -191,12 +191,14 @@ public class FilterPane extends JPanel { && !ComparatorUtils.equals(mv.getSource(), filterLabel); } - public void registerChangeListerner(ChangeListener changeListener) { - this.changeListener = changeListener; + public void registerChangeListener(ChangeListener changeListener) { + changeListenerList.add(changeListener); } public void fireChangeListener(ChangeEvent e) { - this.changeListener.stateChanged(e); + for (ChangeListener changeListener : changeListenerList) { + changeListener.stateChanged(e); + } } public void reset() { diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/config/ShareConfigPane.java b/designer-realize/src/main/java/com/fr/design/share/ui/config/ShareConfigPane.java index 9b55dc1220..fa5606fe8f 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/config/ShareConfigPane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/config/ShareConfigPane.java @@ -155,7 +155,7 @@ public class ShareConfigPane extends BasicPane { private JPanel createInfoPane() { JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Share_Introduce")); PlaceholderTextArea textArea = new PlaceholderTextArea(); - textArea.setText(this.widget.getDescription()); + textArea.setText(getDescription()); textArea.setPlaceholder(Toolkit.i18nText("Fine-Design_Share_No_Introduction")); textArea.setEditable(false); UIScrollPane scrollPane = new UIScrollPane(textArea); diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java index 63098ffd51..4fef5f51a4 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java @@ -17,6 +17,7 @@ import com.fr.locale.InterProviderFactory; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JPanel; +import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTree; import javax.swing.event.TreeSelectionListener; @@ -144,8 +145,8 @@ public class EffectContent extends JPanel { } private void setPaneDisabled(Component component) { - if (component instanceof UIScrollPane) { - UIScrollPane pane = (UIScrollPane) component; + if (component instanceof JScrollPane) { + JScrollPane pane = (JScrollPane) component; setPaneDisabled(pane.getViewport().getView()); return; }