From 1b01ba03c61c4c48e096c84f6d0b5399da9bacba Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Fri, 22 Jun 2018 14:09:01 +0800 Subject: [PATCH 1/3] REPORT-8860 and REPORT-8989 --- .../com/fr/design/hyperlink/WebHyperNorthPane.java | 7 +++---- .../src/com/fr/start/module/DesignerStartup.java | 11 +++++++++++ .../fr/start/module/DesignerWorkspaceProvider.java | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java index a7a0a8077..925be16ef 100644 --- a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java +++ b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java @@ -3,6 +3,7 @@ package com.fr.design.hyperlink; import com.fr.config.ServerPreferenceConfig; import com.fr.design.constants.LayoutConstants; +import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -23,7 +24,7 @@ import java.awt.BorderLayout; public class WebHyperNorthPane extends AbstractHyperNorthPane { private UITextField itemNameTextField; private boolean needRenamePane = false; - private UITextField urlTextField; + private UITextArea urlTextField; public WebHyperNorthPane(boolean needRenamePane) { this.needRenamePane = needRenamePane; @@ -47,11 +48,9 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane { protected JPanel setHeaderPanel() { JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - urlTextField = new UITextField(43); + urlTextField = new UITextArea(1,headerPane.getWidth()); urlTextField.setText(ProductConstants.WEBSITE_URL); - - //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:"); if (this.needRenamePane) { diff --git a/designer-realize/src/com/fr/start/module/DesignerStartup.java b/designer-realize/src/com/fr/start/module/DesignerStartup.java index c78905c7e..b5619df02 100644 --- a/designer-realize/src/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/com/fr/start/module/DesignerStartup.java @@ -1,11 +1,14 @@ package com.fr.start.module; +import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.DesignerContext; import com.fr.event.Event; import com.fr.event.Listener; +import com.fr.general.ComparatorUtils; import com.fr.module.Activator; import com.fr.start.Designer; import com.fr.start.EnvSwitcher; +import com.fr.start.ServerStarter; import com.fr.start.SplashContext; import com.fr.startup.activators.BasicActivator; import com.fr.workspace.Workspace; @@ -43,6 +46,14 @@ public class DesignerStartup extends Activator { DesignerContext.getDesignerFrame().setVisible(true); //启动画面结束 SplashContext.getInstance().hide(); + + //启动画面结束后,启动tip小窗口并打开决策页面 + for (String arg : args) { + if (ComparatorUtils.equals(arg, "demo")) { + ServerStarter.browserDemoURL(); + break; + } + } DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true); startSub(StartFinishActivator.class); } diff --git a/designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java b/designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java index d95e00aed..d9107109a 100644 --- a/designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java +++ b/designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java @@ -20,11 +20,12 @@ public class DesignerWorkspaceProvider extends Activator { for (String arg : args) { if (ComparatorUtils.equals(arg, "demo")) { DesignerEnvManager.getEnvManager().setCurrentEnv2Default(); - ServerStarter.browserDemoURL(); + // ServerStarter.browserDemoURL(); break; } } } + getRoot().setSingleton(EnvSwitcher.class, new EnvSwitcher()); //设置好环境即可,具体跟环境有关的模块会自动调用 getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv(); From a0883aed7f16bddc40d113e268aafac2d4f3ae0b Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 22 Jun 2018 14:11:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-8813=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=A2=9E=E5=8A=A0=E5=8A=A0=E8=BD=BD=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E7=9A=84loading=20,=E5=8D=95=E4=BE=8B=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E8=A6=81=E6=94=BE=E5=88=B0=E5=9F=BA=E7=A1=80=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B9=8B=E5=90=8E=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/iprogressbar/UIProgressBorder.java | 5 +- .../src/com/fr/start/Designer.java | 19 -------- .../com/fr/start/module/DesignerStartup.java | 46 +++++++++++++++---- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/designer-base/src/com/fr/design/gui/iprogressbar/UIProgressBorder.java b/designer-base/src/com/fr/design/gui/iprogressbar/UIProgressBorder.java index fb0207078..c4df50e82 100644 --- a/designer-base/src/com/fr/design/gui/iprogressbar/UIProgressBorder.java +++ b/designer-base/src/com/fr/design/gui/iprogressbar/UIProgressBorder.java @@ -1,6 +1,7 @@ package com.fr.design.gui.iprogressbar; import com.fr.design.border.UIRoundedBorder; +import com.fr.stable.OperatingSystem; import java.awt.AlphaComposite; import java.awt.BasicStroke; @@ -62,7 +63,9 @@ public class UIProgressBorder extends UIRoundedBorder { g2d.fill(new RoundRectangle2D.Double(x, y, width, height, 0, 0)); g2d.setColor(oldColor); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); - paintBorderShadow(g2d, 7, x, y, width, height); + if(OperatingSystem.isWindows()){//mac下自带阴影 + paintBorderShadow(g2d, 7, x, y, width, height); + } g2d.setColor(oldColor); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 1f)); diff --git a/designer-realize/src/com/fr/start/Designer.java b/designer-realize/src/com/fr/start/Designer.java index a2ef7df4f..553b580d7 100644 --- a/designer-realize/src/com/fr/start/Designer.java +++ b/designer-realize/src/com/fr/start/Designer.java @@ -137,25 +137,6 @@ public class Designer extends BaseDesigner { TemplateInfoCollector.getInstance(); } }); - - service.submit(new Runnable() { - @Override - public void run() { - CellElementPropertyPane.getInstance(); - } - }); - service.submit(new Runnable() { - @Override - public void run() { - DesignerFrameFileDealerPane.getInstance();//这边会涉及到TemplateTreePane - } - }); - service.submit(new Runnable() { - @Override - public void run() { - WidgetInfoConfig.getInstance(); - } - }); service.shutdown(); } diff --git a/designer-realize/src/com/fr/start/module/DesignerStartup.java b/designer-realize/src/com/fr/start/module/DesignerStartup.java index c78905c7e..5a2ed7faa 100644 --- a/designer-realize/src/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/com/fr/start/module/DesignerStartup.java @@ -1,8 +1,11 @@ package com.fr.start.module; +import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.event.Event; import com.fr.event.Listener; +import com.fr.form.ui.WidgetInfoConfig; import com.fr.module.Activator; import com.fr.start.Designer; import com.fr.start.EnvSwitcher; @@ -26,6 +29,7 @@ public class DesignerStartup extends Activator { startSub(BasicActivator.class); final String[] args = getModule().upFindSingleton(StartupArgs.class).get(); final Designer designer = new Designer(args); + preLoadSomething(); //启动env startSub(DesignerWorkspaceProvider.class); startSub(EnvBasedModule.class); @@ -46,31 +50,57 @@ public class DesignerStartup extends Activator { DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true); startSub(StartFinishActivator.class); } - + + /** + * 基础模块结束后可以提前加载一部分依赖基础模块(国际化,图标样式之类)的东西 + */ + private void preLoadSomething(){ + ExecutorService service = Executors.newCachedThreadPool(); + service.submit(new Runnable() { + @Override + public void run() { + CellElementPropertyPane.getInstance(); + } + }); + service.submit(new Runnable() { + @Override + public void run() { + DesignerFrameFileDealerPane.getInstance();//这边会涉及到TemplateTreePane + } + }); + service.submit(new Runnable() { + @Override + public void run() { + WidgetInfoConfig.getInstance(); + } + }); + service.shutdown(); + } + /** * 切换环境时,重新启动所有相关模块 */ private void registerEnvListener() { - + listenEvent(WorkspaceEvent.BeforeSwitch, new Listener() { - + @Override public void on(Event event, Workspace param) { - + getSub(EnvBasedModule.class).stop(); } }); listenEvent(WorkspaceEvent.AfterSwitch, new Listener() { - + @Override public void on(Event event, Workspace param) { - + getSub(EnvBasedModule.class).start(); } }); } - - + + @Override public void stop() { From 39696b120717f50fa3a5f96c28ea3c30cbd3d226 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Fri, 22 Jun 2018 15:37:15 +0800 Subject: [PATCH 3/3] fix conflict --- .../src/com/fr/start/module/DesignerStartup.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/designer-realize/src/com/fr/start/module/DesignerStartup.java b/designer-realize/src/com/fr/start/module/DesignerStartup.java index b5619df02..68503079c 100644 --- a/designer-realize/src/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/com/fr/start/module/DesignerStartup.java @@ -1,10 +1,8 @@ package com.fr.start.module; -import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.DesignerContext; import com.fr.event.Event; import com.fr.event.Listener; -import com.fr.general.ComparatorUtils; import com.fr.module.Activator; import com.fr.start.Designer; import com.fr.start.EnvSwitcher; @@ -47,13 +45,6 @@ public class DesignerStartup extends Activator { //启动画面结束 SplashContext.getInstance().hide(); - //启动画面结束后,启动tip小窗口并打开决策页面 - for (String arg : args) { - if (ComparatorUtils.equals(arg, "demo")) { - ServerStarter.browserDemoURL(); - break; - } - } DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true); startSub(StartFinishActivator.class); }