Browse Source

REPORT-59948 && REPORT-59948

research/11.0
kerry 3 years ago
parent
commit
f88caa05f1
  1. 6
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java
  2. 7
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

6
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -29,7 +29,9 @@ import com.fr.design.scrollruler.VerticalRuler;
import com.fr.design.utils.ComponentUtils;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.main.mobile.FormMobileAttr;
import com.fr.form.ui.container.WBodyLayoutType;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WFitLayout;
import com.fr.general.IOUtils;
import com.fr.stable.AssistUtils;
@ -209,7 +211,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
GUICoreUtils.showPopupMenu(popupMenu, fixLayoutSwitchButton, 0, -59);
}
});
button.setVisible(((WFitLayout) designer.getRootComponent().toData()).getBodyLayoutType() != WBodyLayoutType.ABSOLUTE);
return button;
}
@ -258,7 +260,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
public void switchBodyLayout(XLayoutContainer xLayoutContainer) {
this.fixLayoutSwitchButton.setVisible(xLayoutContainer.supportFixLayout());
this.switchLayout(true);
this.switchLayout(false);
}
private void switchLayout(boolean isFixLayout) {

7
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -4,11 +4,9 @@ import com.fr.base.io.IOFile;
import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.settings.ThemedComponentStyle;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.properties.items.FRLayoutTypeItems;
import com.fr.design.designer.properties.items.Item;
@ -23,7 +21,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor;
import com.fr.design.widget.FRWidgetFactory;
@ -41,9 +38,6 @@ import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import static javax.swing.JOptionPane.OK_CANCEL_OPTION;
import static javax.swing.JOptionPane.OK_OPTION;
import static javax.swing.JOptionPane.WARNING_MESSAGE;
@ -170,7 +164,6 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
stylePane.populateBean((LayoutBorderStyle) ob.getBorderStyle());
boundPane.populate();
watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplate(getCurrentIOFile()));
WidgetPropertyPane.getInstance().getEditingFormDesigner().switchBodyLayout((XLayoutContainer) creator);
}
public WAbsoluteBodyLayout updateSubPane() {

Loading…
Cancel
Save