Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

master
ju 7 years ago
parent
commit
1498bbb8e6
  1. 5
      designer-base/src/com/fr/design/gui/iprogressbar/UIProgressBorder.java
  2. 7
      designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java
  3. 19
      designer-realize/src/com/fr/start/Designer.java
  4. 48
      designer-realize/src/com/fr/start/module/DesignerStartup.java
  5. 3
      designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java

5
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));

7
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<WebHyperlink> {
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<WebHyperlink> {
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) {

19
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();
}

48
designer-realize/src/com/fr/start/module/DesignerStartup.java

@ -1,11 +1,15 @@
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;
import com.fr.start.ServerStarter;
import com.fr.start.SplashContext;
import com.fr.startup.activators.BasicActivator;
import com.fr.workspace.Workspace;
@ -26,6 +30,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);
@ -43,34 +48,61 @@ public class DesignerStartup extends Activator {
DesignerContext.getDesignerFrame().setVisible(true);
//启动画面结束
SplashContext.getInstance().hide();
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<Workspace>() {
@Override
public void on(Event event, Workspace param) {
getSub(EnvBasedModule.class).stop();
}
});
listenEvent(WorkspaceEvent.AfterSwitch, new Listener<Workspace>() {
@Override
public void on(Event event, Workspace param) {
getSub(EnvBasedModule.class).start();
}
});
}
@Override
public void stop() {

3
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();

Loading…
Cancel
Save