From 35cd80a22ac385a2ea55a1318a6167cfd44485db Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 10 Oct 2017 14:56:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=3D>=E9=80=89=E4=B8=AD=E6=82=AC=E6=B5=AE=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E6=97=B6=EF=BC=8C=E5=8E=BB=E9=99=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E8=8F=9C=E5=8D=95=E4=B8=AD=E7=9A=84=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/cell/CellAttributeTableAction.java | 6 ++++++ .../fr/design/actions/cell/CellWidgetAttrAction.java | 6 ++++++ .../actions/cell/ConditionAttributesAction.java | 6 ++++++ .../fr/design/mainframe/EastRegionContainerPane.java | 11 +++++++++++ 4 files changed, 29 insertions(+) diff --git a/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java b/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java index 7c554ff04..70812af32 100644 --- a/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java +++ b/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java @@ -2,6 +2,7 @@ package com.fr.design.actions.cell; import com.fr.design.actions.UpdateAction; import com.fr.design.mainframe.CellElementPropertyPane; +import com.fr.design.mainframe.EastRegionContainerPane; import java.awt.event.ActionEvent; @@ -20,4 +21,9 @@ public abstract class CellAttributeTableAction extends UpdateAction { CellElementPropertyPane.getInstance().GoToPane(getID()); } + @Override + public void update() { + super.update(); + this.setEnabled(EastRegionContainerPane.getInstance().isCellAttrPaneEnabled()); + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java b/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java index 7c4ee7087..e6f0fec24 100644 --- a/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java +++ b/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java @@ -24,4 +24,10 @@ public class CellWidgetAttrAction extends UpdateAction { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } + + @Override + public void update() { + super.update(); + this.setEnabled(EastRegionContainerPane.getInstance().isWidgetSettingsPaneEnabled()); + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java b/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java index 0d5d7202c..1aecf94d5 100644 --- a/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java +++ b/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java @@ -26,4 +26,10 @@ public class ConditionAttributesAction extends UpdateAction { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR); EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } + + @Override + public void update() { + super.update(); + this.setEnabled(EastRegionContainerPane.getInstance().isConditionAttrPaneEnabled()); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index cd5a03f65..f6393add6 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -466,6 +466,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } + public boolean isConditionAttrPaneEnabled() { + return propertyItemMap.get(KEY_CONDITION_ATTR).isEnabled(); + } + + public boolean isWidgetSettingsPaneEnabled() { + return propertyItemMap.get(KEY_WIDGET_SETTINGS).isEnabled(); + } + + public boolean isCellAttrPaneEnabled() { + return propertyItemMap.get(KEY_CELL_ATTR).isEnabled(); + } class PropertyItem { From b55bc7dbc054a82137d1ba196528c40ef5414b5f Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 10 Oct 2017 17:01:41 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=3D>=E8=81=9A=E5=90=88=E8=A1=A8=3D=E3=80=8B=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=B0=BA=E5=AF=B8=E3=80=81=E5=AF=B9=E9=BD=90=E9=97=B4?= =?UTF-8?q?=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyBlockProperTable.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/src/com/fr/poly/PolyBlockProperTable.java b/designer/src/com/fr/poly/PolyBlockProperTable.java index 647427c64..91a879412 100644 --- a/designer/src/com/fr/poly/PolyBlockProperTable.java +++ b/designer/src/com/fr/poly/PolyBlockProperTable.java @@ -42,6 +42,8 @@ public class PolyBlockProperTable extends JPanel { height = new UISpinner(0, MAX_SPINNER_VALUE, 1); UIExpandablePane boundsPane = WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height); this.add(boundsPane, BorderLayout.CENTER); + + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); } private void initListener(Container parentComponent) { From 4f76749ffb991b04c87bda624d7e6b507d759265 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 10 Oct 2017 17:32:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=3D>=E8=A1=A8=E5=8D=95=3D=E3=80=8B=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormWidgetDetailPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 43c3cf4e0..83f2b057f 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -147,6 +147,7 @@ public class FormWidgetDetailPane extends FormDockView{ private void initReuWidgetPanel() { elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, false)); + downPane.setBorder(null); reuWidgetPanel.add(downPane); } @@ -429,6 +430,7 @@ public class FormWidgetDetailPane extends FormDockView{ public void refreshDownPanel(boolean isEdit) { reuWidgetPanel.remove(downPane); downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit)); + downPane.setBorder(null); reuWidgetPanel.add(downPane); repaintContainer(); From 5e7f9afa0021272231d6e3b2de8809e9fc2d964e Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 11 Oct 2017 10:08:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-4985=20=E6=96=87=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E5=88=87=E6=8D=A2=E5=B7=A5=E4=BD=9C=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=20=E4=B8=AD=E5=87=BA=E7=8E=B0=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E2=80=9C=E9=BB=98=E8=AE=A4=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 27 +++++++++++++------ .../src/com/fr/start/BaseDesigner.java | 3 ++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 568deb96d..0e7612214 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -153,6 +153,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { * DesignerEnvManager. */ public static DesignerEnvManager getEnvManager() { + return getEnvManager(true); + } + + public static DesignerEnvManager getEnvManager(boolean needCheckEnv) { if (designerEnvManager == null) { designerEnvManager = new DesignerEnvManager(); try { @@ -162,14 +166,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } // james:如果没有env定义,要设置一个默认的 - if (designerEnvManager.nameEnvMap.size() <= 0) { - String installHome = StableUtils.getInstallHome(); - if (installHome != null) { - String name = Inter.getLocText("FR-Engine_DEFAULT"); - String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME}); - designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath)); - designerEnvManager.setCurEnvName(name); - } + if (needCheckEnv) { + checkNameEnvMap(); } GeneralContext.addEnvChangedListener(new EnvChangedListener() { @@ -187,6 +185,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { return designerEnvManager; } + public static void checkNameEnvMap() { + if (designerEnvManager == null || designerEnvManager.nameEnvMap.size() > 0) { + return; + } + String installHome = StableUtils.getInstallHome(); + if (installHome != null) { + String name = Inter.getLocText("FR-Engine_DEFAULT"); + String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME}); + designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath)); + designerEnvManager.setCurEnvName(name); + } + } + /** * 添加设计器中相关的worker * diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 3f24b645a..2b8aacd62 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -171,7 +171,8 @@ public abstract class BaseDesigner extends ToolBarMenuDock { protected void initLanguage() { //这两句的位置不能随便调换,因为会影响语言切换的问题 - FRContext.setLanguage(DesignerEnvManager.getEnvManager().getLanguage()); + FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage()); + DesignerEnvManager.checkNameEnvMap(); } protected void initDefaultFont() {