From 17fa97308e32202996d1ddc0ea6ba9c5345cee2f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 12 Nov 2016 23:38:18 +0800 Subject: [PATCH 01/11] rt --- .../com/fr/design/mainframe/FormDesigner.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index 8422bfdb40..cd3b5b448e 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -186,14 +186,14 @@ public class FormDesigner extends TargetComponent
implements TreeSelection public void refreshParameter(){ XLayoutContainer rootContainer = this.getParaComponent(); if (rootContainer != null){ - java.util.List namelist = new ArrayList(); - rootContainer.getAllXCreatorNameList(rootContainer,namelist); - // parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名 - // 与已有的参数列表比较 如果已经存在 就除去 - Parameter[] ps = getParameterArray(); - if (ps != null) { - removeSame(ps, namelist); - } + java.util.List namelist = new ArrayList(); + rootContainer.getAllXCreatorNameList(rootContainer,namelist); + // parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名 + // 与已有的参数列表比较 如果已经存在 就除去 + Parameter[] ps = getParameterArray(); + if (ps != null) { + removeSame(ps, namelist); + } } ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( getParameterArray() == null ? new Parameter[0] : getParameterArray()); From 6ab4965da8f559fe46da188c92146e6835be96c1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 12 Nov 2016 23:40:12 +0800 Subject: [PATCH 02/11] rt --- .../gui/icontainer/UIResizableContainer.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 86945674bf..8250b8f969 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -29,6 +29,7 @@ public class UIResizableContainer extends JPanel { private VerticalToolPane verticalToolPane; private int direction; + private boolean hasParameterPane; private static final int MAX_WIDTH = 300; private static final int MIN_WIDTH = 165; @@ -89,7 +90,6 @@ public class UIResizableContainer extends JPanel { add(horizontToolPane); add(downPane); add(verticalToolPane); - add(parameterPane); } public UIResizableContainer(JComponent upPane, int direction) { @@ -102,7 +102,6 @@ public class UIResizableContainer extends JPanel { setLayout(containerLayout); add(upPane); add(horizontToolPane); - add(parameterPane); } @@ -141,7 +140,7 @@ public class UIResizableContainer extends JPanel { * @param height */ public void setParameterHeight(int height) { - paraHeight = height; + paraHeight = hasParameterPane? height : 0; refreshContainer(); } @@ -274,13 +273,18 @@ public class UIResizableContainer extends JPanel { public void addParameterPane(JComponent pane) { add(this.parameterPane = pane); + hasParameterPane = true; refreshContainer(); } public void removeParameterPane() { - remove(this.parameterPane); - setParameterHeight(0); - refreshContainer(); + if (this.parameterPane != null) { + this.remove(this.parameterPane); + setParameterHeight(0); + hasParameterPane = false; + refreshContainer(); + } + } /** From f481406411c65e3beb19a36bc808785d8e90ef95 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 12 Nov 2016 23:40:48 +0800 Subject: [PATCH 03/11] rt --- designer_form/src/com/fr/design/mainframe/JForm.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index ddaf79e5b7..4c015811c0 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -621,6 +621,7 @@ public class JForm extends JTemplate implements BaseJForm { EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign)); EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(formDesign)); + EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance(formDesign).getPreferredSize().height); if (EastRegionContainerPane.getInstance().getDownPane() == null) { new Thread() { public void run() { From ca2d69cdac53155624cc4c20c4e4c97180bad3f3 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 12 Nov 2016 23:41:23 +0800 Subject: [PATCH 04/11] rt --- designer/src/com/fr/design/mainframe/JWorkBook.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 1e27feeb58..f3722c4ac2 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -732,6 +732,7 @@ public class JWorkBook extends JTemplate { } } else { DesignerContext.getDesignerFrame().resetToolkitByPlus(JWorkBook.this); + EastRegionContainerPane.getInstance().removeParameterPane(); if (delegate4ToolbarMenuAdapter() instanceof PolyDesigner) { PolyDesigner polyDesigner = (PolyDesigner) delegate4ToolbarMenuAdapter(); if (polyDesigner.getSelectionType() == PolyDesigner.SelectionType.NONE || polyDesigner.getSelection() == null) { @@ -752,6 +753,7 @@ public class JWorkBook extends JTemplate { EastRegionContainerPane.getInstance().replaceUpPane(allowAuthorityUpPane()); EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); } + centerPane.needToShowCoverAndHidPane(); } From f5f076afe32fea2914c94c5f8541dab1797cee87 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 12 Nov 2016 23:45:42 +0800 Subject: [PATCH 05/11] rt --- .../src/com/fr/design/parameter/ParameterDefinitePane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/parameter/ParameterDefinitePane.java b/designer/src/com/fr/design/parameter/ParameterDefinitePane.java index 1a547c3e6c..4b8572b710 100644 --- a/designer/src/com/fr/design/parameter/ParameterDefinitePane.java +++ b/designer/src/com/fr/design/parameter/ParameterDefinitePane.java @@ -20,7 +20,9 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.AuthorityToolBarPane; +import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.JWorkBook; +import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.menu.*; import com.fr.design.module.DesignModuleFactory; @@ -244,7 +246,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus isdelayItem.setSelected(reportParameterAttr.isDelayPlaying()); isshowWindowItem.setSelected(reportParameterAttr.isShowWindow()); isEditing = true; - + EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance().getPreferredSize().height); ParameterBridge bridge = paraDesignEditor.getParaComponent(); if (parameterUI != null) { bridge.setDelayDisplayContent(reportParameterAttr.isDelayPlaying()); From fcc999913811032556fd3232e60f51623e6602b1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Nov 2016 14:14:11 +0800 Subject: [PATCH 06/11] rt --- .../src/com/fr/design/form/parameter/FormParaDesigner.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index a7936a8288..d5de1eb4ff 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -233,6 +233,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP } ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray()); + EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance().getPreferredSize().height); } From 0139ff5684dab701c926e408a66bb7635a94b995 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Nov 2016 15:09:06 +0800 Subject: [PATCH 07/11] rt --- .../design/mainframe/WidgetPropertyPane.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index 324ff62bb3..cc7f1d7690 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -124,15 +124,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper } componentTree = new ComponentTree(designer); - - ComponentTreeModel treeModel = (ComponentTreeModel) componentTree.getModel(); - XCreator root = (XCreator)treeModel.getRoot(); - int childCount = treeModel.getChildCount(root); - //按照节点添加para在下的,但这里需要para节点在上,调整一下位置 - if(childCount == NODE_LENGTH){ - adjustPosition(treeModel, designer); - } - widgetPropertyTables = new ArrayList(); propertyTable = new WidgetPropertyTable(designer); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); @@ -198,22 +189,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper isrefresh = false; } - - /** - * 调整结构树para和body的位置 - * - * @param treeModel - * @param formDesigner - */ - private void adjustPosition(ComponentTreeModel treeModel,FormDesigner formDesigner){ - XCreator root = (XCreator)treeModel.getRoot(); - if(treeModel.getChild(root,0) instanceof XWParameterLayout){ - return; - } - root.add((Component)(treeModel.getChild(root,0)),1); - treeModel.setRoot(root); - componentTree = new ComponentTree(formDesigner,treeModel); - } // /** * 选中的组件是否在参数面板里 From 068ca95013603719474fba8146ea1e389abe11d2 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Nov 2016 15:12:31 +0800 Subject: [PATCH 08/11] rt --- .../src/com/fr/design/parameter/ParameterToolBarPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java index d495e9c06a..e1decfe2b4 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java @@ -33,6 +33,7 @@ public class ParameterToolBarPane extends BasicBeanPane { private static final int GAP_H = 4; private static final int GAP_V = 6; private static final int GAP_BV = 4; + private static final int WIDTH = 225; private static final int L_H = 18; @@ -140,7 +141,7 @@ public class ParameterToolBarPane extends BasicBeanPane { } public void layoutContainer(Container parent) { - int width = parent.getWidth(); + int width = parent.getWidth() == 0 ? WIDTH : parent.getWidth(); int x = 0; int y = L_H + GAP_H; From dd964d2dc0605b074f7af83d1ffd7b8f347333c3 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Nov 2016 15:13:47 +0800 Subject: [PATCH 09/11] rt --- .../src/com/fr/design/gui/icontainer/UIResizableContainer.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 8250b8f969..5db23c5033 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -278,12 +278,10 @@ public class UIResizableContainer extends JPanel { } public void removeParameterPane() { - if (this.parameterPane != null) { this.remove(this.parameterPane); setParameterHeight(0); hasParameterPane = false; refreshContainer(); - } } From 546f4a6a0251cd4d08d44d107f7f2e5b51ba442d Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Nov 2016 15:15:01 +0800 Subject: [PATCH 10/11] rt --- .../src/com/fr/design/gui/icontainer/UIResizableContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 5db23c5033..c59ebb128d 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -278,7 +278,7 @@ public class UIResizableContainer extends JPanel { } public void removeParameterPane() { - this.remove(this.parameterPane); + remove(this.parameterPane); setParameterHeight(0); hasParameterPane = false; refreshContainer(); From 82f4493b82200b0e439c6db09981328155625a15 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Nov 2016 15:16:06 +0800 Subject: [PATCH 11/11] rt --- .../fr/design/gui/icontainer/UIResizableContainer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index c59ebb128d..13ea214ec5 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -278,10 +278,10 @@ public class UIResizableContainer extends JPanel { } public void removeParameterPane() { - remove(this.parameterPane); - setParameterHeight(0); - hasParameterPane = false; - refreshContainer(); + remove(this.parameterPane); + setParameterHeight(0); + hasParameterPane = false; + refreshContainer(); }