From 1ed6a4d7e5d6cf2df7073846edc72976bc8b22c0 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 30 Jul 2018 11:40:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-9511=E3=80=90=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E3=80=91=E8=A1=A8=E5=8D=95=E4=BB=8E=E8=87=AA=E9=80=82=E5=BA=94?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E5=88=87=E6=8D=A2=E5=88=B0=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E5=B8=83=E5=B1=80=EF=BC=8C=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E5=AE=BD=E5=BA=A6=E4=B8=8D=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/FormWidgetCardPane.java | 3 ++- .../layout/FRAbsoluteBodyLayoutDefinePane.java | 11 +++++++++-- .../layout/FRAbsoluteLayoutDefinePane.java | 18 ++++++------------ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index b55f6a3e51..b1b149c2f6 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -6,6 +6,7 @@ import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWParameterLayout; @@ -79,7 +80,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { public WidgetBoundPane createWidgetBoundPane(XCreator xCreator) { XLayoutContainer xLayoutContainer = getParent(xCreator); - if (xLayoutContainer == null || xCreator.acceptType(XWParameterLayout.class) || xCreator.acceptType(XWAbsoluteLayout.class)) { + if (xLayoutContainer == null || xCreator.acceptType(XWParameterLayout.class) || xCreator.acceptType(XWAbsoluteBodyLayout.class)) { return null; } else if (xLayoutContainer.acceptType(XWAbsoluteLayout.class)) { return new WidgetAbsoluteBoundPane(xCreator); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java index 5a3ecbfd7d..9726db0409 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java @@ -19,6 +19,7 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; +import com.fr.design.widget.ui.designer.component.WidgetBoundPane; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; @@ -43,6 +44,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { private AccessibleWLayoutBorderStyleEditor borderStyleEditor; private AccessibleBodyWatermarkEditor watermarkEditor; + private WidgetBoundPane boundPane; private UIComboBox layoutCombox; private WBodyLayoutType layoutType = WBodyLayoutType.ABSOLUTE; @@ -54,6 +56,9 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { public void initComponent() { super.initComponent(); + JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + boundPane = new WidgetBoundPane(creator); + centerPane.add(boundPane, BorderLayout.CENTER); borderStyleEditor = new AccessibleWLayoutBorderStyleEditor(); watermarkEditor = new AccessibleBodyWatermarkEditor(); JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane( @@ -65,7 +70,8 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); borderPane.add(jPanel, BorderLayout.CENTER); UIExpandablePane advancedPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Advanced"), 280, 20, borderPane ); - this.add(advancedPane, BorderLayout.NORTH); + centerPane.add(advancedPane, BorderLayout.NORTH); + this.add(centerPane, BorderLayout.NORTH); } public JPanel createThirdPane() { @@ -77,7 +83,6 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Widget_Scaling_Mode")), comboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); jPanel.add(northPane, BorderLayout.NORTH); jPanel.add(centerPane, BorderLayout.CENTER); -// northPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0)); centerPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, 0, 0)); return jPanel; @@ -101,12 +106,14 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { public void populateSubPane(WAbsoluteLayout ob) { layoutCombox.setSelectedIndex(1); borderStyleEditor.setValue(ob.getBorderStyle()); + boundPane.populate(); watermarkEditor.setValue(ReportUtils.getWatermarkFromAttrMarkFile(getCurrentIOFile())); } public WAbsoluteBodyLayout updateSubPane() { WAbsoluteBodyLayout layout = (WAbsoluteBodyLayout) creator.toData(); + boundPane.update(); Item item = (Item) layoutCombox.getSelectedItem(); Object value = item.getValue(); int state = 0; diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java index 11c4ee3e20..43ab7a088b 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java @@ -12,19 +12,19 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.widget.ui.designer.AbstractDataModify; -import com.fr.design.widget.ui.designer.component.WidgetBoundPane; import com.fr.form.ui.container.WAbsoluteLayout; - -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by ibm on 2017/8/2. */ public class FRAbsoluteLayoutDefinePane extends AbstractDataModify { protected UIComboBox comboBox; - private WidgetBoundPane boundPane; public FRAbsoluteLayoutDefinePane(XCreator xCreator) { super(xCreator); @@ -34,17 +34,13 @@ public class FRAbsoluteLayoutDefinePane extends AbstractDataModify