From a9e769c86332b36acf324d042239a580b27bd75f Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 15 Jun 2021 15:56:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-51958=20=E8=BF=9C=E7=A8=8B=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=A3=80=E6=B5=8B=E5=8F=8A=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/env/RemoteWorkspace.java | 17 ++++++++++------- .../ui/NotificationCenterDialog.java | 2 +- .../ui/NotificationCenterPane.java | 2 +- .../com/fr/env/SyncFailedPluginsDialog.java | 6 +++++- .../mainframe/alphafine/images/smallsearch.png | Bin 299 -> 546 bytes .../mainframe/notificationCenter/normal.png | Bin 423 -> 0 bytes .../notificationCenterDot.png | Bin 0 -> 491 bytes 7 files changed, 17 insertions(+), 10 deletions(-) delete mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/normal.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/notificationCenterDot.png diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index f319549640..24b79e418c 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -34,11 +34,20 @@ public class RemoteWorkspace implements Workspace { private volatile Boolean warDeploy; + private final SwingWorker swingWorker; + RemoteWorkspace(WorkspaceClient client, WorkspaceConnectionInfo connection) { this.client = client; this.address = connection.getUrl(); this.connection = connection; + this.swingWorker = new SwingWorker() { + @Override + protected Void doInBackground() throws Exception { + client.close(); + return null; + } + }; } @Override @@ -125,13 +134,7 @@ public class RemoteWorkspace implements Workspace { @Override public void close() { - new SwingWorker() { - @Override - protected Void doInBackground() throws Exception { - client.close(); - return null; - } - }.execute(); + swingWorker.execute(); } @Override diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java index 789a02fa94..3048959c57 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java @@ -147,7 +147,7 @@ public class NotificationCenterDialog extends JDialog { deleteLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotificationsCount() + ")"); pack(); if (notificationNeedShow.size() == 0) { - centerWindow(); + hideDialog(); } NotificationCenterPane.getNotificationCenterPane().refreshButton(); } diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java index 6ed74782b1..d0f09df00f 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java @@ -41,7 +41,7 @@ public class NotificationCenterPane extends BasicPane { public void refreshButton() { if (NotificationCenter.getInstance().getNotificationsCount() > 0) { - notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/normal.png")); + notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/notificationCenterDot.png")); } else { notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/notificationCenter.png")); } diff --git a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java index 7e053db424..a93ea0460d 100644 --- a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java +++ b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java @@ -18,7 +18,6 @@ import com.fr.json.JSONObject; import com.fr.stable.StringUtils; import java.awt.BorderLayout; import java.awt.Dimension; -import java.awt.Frame; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; @@ -138,9 +137,14 @@ public class SyncFailedPluginsDialog extends JDialog { return !restartButton.isEnabled(); } + private void hideDialog(){ + this.dispose(); + } + private MouseListener restartButtonClickListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { + hideDialog(); restartButton.setEnabled(false); restartHelper.restartForUpdate(frame); } diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/smallsearch.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/smallsearch.png index 63012b2823fc4ab56fe25c23bea5c7da2238f497..3daece322668a362c0316b0add12db62f7ca2cdc 100644 GIT binary patch literal 546 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyz1&TfmH9gB0%lVEGHEtjE*EF+@YO zHgLZ;v!RGz&;}2|Rn04W7v4C#_Sw3k@~a!YyEo5{j+Ob#Y_;R1o<%1I*LIC2i>b_- zO-p6xbTuWM=5>k{S-LIeQMc-(dF_(#_SV=>Dvvj~G%fMTb^#$)#g<0Hx`utS{m08+ zfBm&v?RRGKr)V89;ge6kFeIBOvy>T%{caJE|5YNu!an8FtoOh56OEJ3tT0S__g9f2 zK_{Lm?#4D->tm-s9w@P8YcpGx`L5wvP&;RijMIggd~Ma|gx!OdKX&2BbCTF@CGl>y z?|SwK{=B#lnTanQ1-!XBR!vLwbvm@tNA2^P3W?AymhRJ-7QHIa2opHeZ`Ce)eCDg~ z`|oiaeBJAotizyr=4lak%aI3}C!$uDmM=cDF>kxI$MTn!&mVPNy5ep&yY^Ly)%>D8 zJ1wIcw(n&(Y-do{ntH1Bd8N~=jaH2tuU5AFYFF6O>ahOPe7DCFb9GM#)Y#J-86fmF7aHJIUI62@X!7mFERywu@%I$?4R&| R8Yd`zJYD@<);T3K0RT*h)Or8_ literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0px|9k z7sn8b(`zSh&6gE1RVU0>6SpekywRA%AhO*-vz|TRP_JmZfO+JW*;>SOCzY44$rjF6*2UngAQzZx;Xn diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/normal.png b/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/normal.png deleted file mode 100644 index 5ee1816682bcf905486879dfbd13663e692391da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 423 zcmV;Y0a*TtP)*v|#Day&iS-|+8(U*aNK@}>0`#(r@P9rd z0|Os6hy7<@_{7M-nE1+m%{rJo+yJm<#{a7s|1&V*^VNSwhJTFz8AD-)fDHgUo15zn zE}PK}{LjGf@%z_rsvz%x4G=vP)XMmuu?obFm2hFGRg7Wy@aHQ--pwgsy_3{)7z9|j z8Jg}dVOa8F4_NF!k@Z**JT22%LKpIk{yck-P6B!s8 zQDgZ3|Njg%cjq(AdA1E^E{XwQFTi9nq1Jd{A-sSbi0FoZ z_*gWf1|qI#1i1tR&}?P^C8+OTzp22Z5fT#=BqW%#DN4#PLnz8j`0@ZQIRI9{wh`a7 R`QiWo002ovPDHLkV1n=4#R32T diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/notificationCenterDot.png b/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/notificationCenterDot.png new file mode 100644 index 0000000000000000000000000000000000000000..599a9ba64a964afce0945f8bae181361032856e6 GIT binary patch literal 491 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#j7V7EZ7-Auq zoT4D~=lZp@>fb-JFW0yIFI3R&;pypasoeQm;^RwmGqbtpPn@V3Xk?oR>JPsvzaj~>a`057jB#sDAj$Upz<*$$tc z^F}i7e*GUtsg*oO;v4?WZxig`wli{$i6&GF^;4J@uSY z4eQvBG9)A%Ri529_bi8Br-9{`k`MpI4X&*_sIu|mffs)}edpvD&Z#_jmdWwX@&X04r>mdK II;Vst0MRVIG5`Po literal 0 HcmV?d00001