Browse Source

Merge pull request #1443 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'a8f8977f9a0353881c5127abad715edabe14af73':
  MOBILE-25614 && MOBILE-25605
feature/big-screen
Hades 5 years ago
parent
commit
50de08b80d
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileCollapsedStylePane.java
  2. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

11
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileCollapsedStylePane.java

@ -54,11 +54,12 @@ public class MobileCollapsedStylePane extends BasicBeanPane<MobileCollapsedStyle
} }
private JPanel createSettingPane() { private JPanel createSettingPane() {
JPanel settingPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel settingPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 0);
UITitleSplitLine splitLine = new UITitleSplitLine(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button"), 520); UITitleSplitLine splitLine = new UITitleSplitLine(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button"), 520);
splitLine.setPreferredSize(new Dimension(520, 20)); splitLine.setPreferredSize(new Dimension(520, 20));
UILabel showButtonLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button")); UILabel showButtonLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button"));
showButtonCheck = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button_On_Right")); showButtonCheck = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button_On_Right"));
showButtonCheck.setPreferredSize(new Dimension(140, 24));
UILabel buttonColorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button_Color")); UILabel buttonColorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button_Color"));
buttonColorBox = new NewColorSelectBox(137); buttonColorBox = new NewColorSelectBox(137);
UILabel foldedLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Folded_Hint")); UILabel foldedLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Folded_Hint"));
@ -91,15 +92,15 @@ public class MobileCollapsedStylePane extends BasicBeanPane<MobileCollapsedStyle
new Component[] {foldedLabel, foldedTextFiled}, new Component[] {foldedLabel, foldedTextFiled},
new Component[] {unfoldedLabel, unfoldedTextFiled}, new Component[] {unfoldedLabel, unfoldedTextFiled},
}; };
JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(northComponents, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(northComponents, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1);
JPanel southPane = TableLayoutHelper.createGapTableLayoutPane(southComponents, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel southPane = TableLayoutHelper.createGapTableLayoutPane(southComponents, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
final JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, colSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); final JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, colSize, rowCount, LayoutConstants.HGAP_LARGE, LayoutConstants.VGAP_SMALL);
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.add(northPane, BorderLayout.NORTH); panel.add(northPane, BorderLayout.NORTH);
panel.add(centerPane, BorderLayout.CENTER); panel.add(centerPane, BorderLayout.CENTER);
panel.add(southPane, BorderLayout.SOUTH); panel.add(southPane, BorderLayout.SOUTH);
settingPane.add(splitLine, BorderLayout.NORTH); settingPane.add(splitLine);
settingPane.add(panel, BorderLayout.CENTER); settingPane.add(panel);
showButtonCheck.addChangeListener(new ChangeListener() { showButtonCheck.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {

18
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

@ -3,6 +3,8 @@ package com.fr.design.widget.ui.designer.mobile;
import com.fr.base.mobile.MobileFitAttrState; import com.fr.base.mobile.MobileFitAttrState;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWAbsoluteBodyLayout;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.properties.items.Item; import com.fr.design.designer.properties.items.Item;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.form.util.FormDesignerUtils; import com.fr.design.form.util.FormDesignerUtils;
@ -28,8 +30,7 @@ import javax.swing.BorderFactory;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Component;
/** /**
* 报表块-移动端属性面板 * 报表块-移动端属性面板
@ -128,11 +129,22 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane {
} }
private Component[] createComponents() { private Component[] createComponents() {
return FormDesignerUtils.isAppRelayout(designer) ? return FormDesignerUtils.isAppRelayout(designer) && !isInAbsoluteLayout() ?
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Collapse_Expand")), mobileCollapsedStyleEditor} : new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Collapse_Expand")), mobileCollapsedStyleEditor} :
new Component[0]; new Component[0];
} }
private boolean isInAbsoluteLayout() {
Container parent = xCreator.getParent();
while (parent != null) {
if (parent instanceof XWAbsoluteLayout && !(parent instanceof XWAbsoluteBodyLayout)) {
return true;
}
parent = parent.getParent();
}
return false;
}
private void bingListeners2Widgets() { private void bingListeners2Widgets() {
reInitAllListeners(); reInitAllListeners();
this.changeListener = new AttributeChangeListener() { this.changeListener = new AttributeChangeListener() {

Loading…
Cancel
Save