From 76042b86331212db997c9a98e4d5f8815489cecb Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 22 Jul 2020 11:47:00 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-35688=20=E5=9B=BD=E9=99=85=E5=8C=96-?= =?UTF-8?q?=E9=A2=84=E5=AE=9A=E4=B9=89=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/server/StyleListAction.java | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java b/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java index ff16a33633..97b4963240 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java @@ -17,6 +17,7 @@ import com.fr.transaction.WorkerCallBack; import com.fr.transaction.WorkerFacade; import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; @@ -24,6 +25,8 @@ import java.awt.event.ActionEvent; * StyleList Action */ public class StyleListAction extends UpdateAction { + public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(710, 600); + public StyleListAction() { this.setMenuKeySet(PREDEFINED_STYLES); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); @@ -37,23 +40,23 @@ public class StyleListAction extends UpdateAction { * * @param evt 事件 */ - public void actionPerformed(ActionEvent evt) { - DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); - final StyleManagerPane styleListPane = new StyleManagerPane(); - final BasicDialog styleListDialog = styleListPane.showWindow(designerFrame); - styleListDialog.addDialogActionListener(new DialogActionAdapter() { - @Override - public void doOk() { - if (!styleListPane.isNamePermitted()) { - styleListDialog.setDoOKSucceed(false); + public void actionPerformed(ActionEvent evt) { + DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); + final StyleManagerPane styleListPane = new StyleManagerPane(); + final BasicDialog styleListDialog = styleListPane.showWindowWithCustomSize(designerFrame, null, WINDOW_CUSTOM_SIZE); + styleListDialog.addDialogActionListener(new DialogActionAdapter() { + @Override + public void doOk() { + if (!styleListPane.isNamePermitted()) { + styleListDialog.setDoOKSucceed(false); } - Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { - @Override - public void run() { - styleListPane.update(ServerPreferenceConfig.getInstance()); - } - }.addCallBack(new CallBackAdaptor(){ - @Override + Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { + @Override + public void run() { + styleListPane.update(ServerPreferenceConfig.getInstance()); + } + }.addCallBack(new CallBackAdaptor() { + @Override public void afterCommit() { DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement(); }