From 0dbfac7719f17f4637d9f31eddfec88d8cf45e2d Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 16 Nov 2021 17:15:24 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-62398=20=20&&=20REPORT-62397=E3=80=90?= =?UTF-8?q?=E6=8E=A5=E8=A7=A6=E7=82=B9=E4=BC=98=E5=8C=96=E3=80=91=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=8E=A8=E8=8D=90=E7=BB=84=E4=BB=B6=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8;=E3=80=90?= =?UTF-8?q?=E6=8E=A5=E8=A7=A6=E7=82=B9=E4=BC=98=E5=8C=96=E3=80=91=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E9=9D=A2=E6=9D=BF=E5=AD=98=E5=9C=A8=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=BB=91=E5=8A=A8=E9=BC=A0=E6=A0=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/share/ui/block/OnlineWidgetBlock.java | 7 ++++--- .../share/ui/online/AbstractOnlineWidgetSelectPane.java | 4 ++-- .../mainframe/share/ui/online/OnlineWidgetRepoPane.java | 6 ++++++ .../mainframe/share/ui/online/OnlineWidgetTabPane.java | 7 +++++++ .../design/mainframe/share/ui/online/embed/EmbedPane.java | 2 +- .../share/ui/online/embed/OnlineEmbedFilterShowPane.java | 6 ++++++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java index 9f5873771..cd4163b4b 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java @@ -357,6 +357,9 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock { if (isUnusable) { paintUnusableMask((Graphics2D) g); } + if (this.parentPane != null) { + this.parentPane.refreshShowPaneUI(); + } } protected void paintUnusableMask(Graphics2D g2d) { @@ -393,14 +396,12 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock { g2d.setColor(oldColor); g2d.setFont(oldFont); + } @Override public void repaint() { super.repaint(); - if (this.parentPane != null) { - this.parentPane.refreshUI(); - } } class WidgetDownloadProcess implements com.fr.design.extra.Process { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetSelectPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetSelectPane.java index 4221e4b96..53239700d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetSelectPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetSelectPane.java @@ -242,7 +242,7 @@ public abstract class AbstractOnlineWidgetSelectPane extends AbstractWidgetSele return this.getParent(); } - public void refreshUI() { - OnlineWidgetRepoPane.getInstance().repaint(); + public void refreshShowPaneUI() { + OnlineWidgetRepoPane.getInstance().refreshShowPaneUI(); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java index fcc59771e..b9e430fe4 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java @@ -228,6 +228,12 @@ public class OnlineWidgetRepoPane extends BasicPane { } } + public void refreshShowPaneUI(){ + if (componentTabPane != null) { + this.componentTabPane.refreshShowPaneUI(); + } + } + public void completeEmbedFilter(){ if (componentTabPane != null) { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java index 96c3e2825..b48b74e67 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java @@ -87,6 +87,13 @@ public class OnlineWidgetTabPane extends JPanel { this.cardLayout.show(centerPane, ComponentShareUtil.needShowEmbedFilterPane() ? COMPONENT_EMBED : COMPONENT); } + public void refreshShowPaneUI(){ + if (embedFilterShowPane != null) { + this.embedFilterShowPane.refreshUI(); + } + } + + public void removeTabChangeListener(TabChangeListener listener) { tabChangeListeners.remove(listener); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/EmbedPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/EmbedPane.java index 04680753b..bf535b367 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/EmbedPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/EmbedPane.java @@ -86,7 +86,7 @@ public class EmbedPane extends JPanel { protected void paintBorder(Graphics g, UIButton b) { Color oldColor = g.getColor(); g.setColor(SEARCH_BUTTON_COLOR); - g.drawRoundRect(0, 0, b.getWidth(), b.getHeight(), 2, 2); + g.drawRoundRect(0, 0, b.getWidth() - 4, b.getHeight() - 4, 2, 2); g.setColor(oldColor); } }); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterShowPane.java index 11e39c923..9141bf98a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterShowPane.java @@ -36,6 +36,12 @@ public class OnlineEmbedFilterShowPane extends JPanel { selectPane.animate(); } + public void refreshUI(){ + if (embedPane != null) { + this.repaint(); + } + } + public void completeEmbedFilter(){ if (embedPane!= null && embedPane.isShowing()){ this.remove(embedPane);