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