Browse Source

Merge pull request #2721 in DESIGN/design from final/10.0 to persist/10.0

* commit '3a137da5d7d63e2b373e47fbdecaf074878793e7':
  REPORT-41855 【设计器】保留布局下图表修改选中全屏设置效果,设计器的保存按钮依然置灰 【问题原因】在不勾选body移动端属性-手机重布局时,如果修改body内的图表块的移动端属性,会造成这边的npe,体现在设计器中就是保存按钮不被触发 【改动思路】增加npe判断
  CHART-16112 富文本标记器browser在初次打开时清理缓存
  MOBILE-29857【RN】设计器上圆点指示器选中填充色设置后没有生效
  MOBILE-29820 移动端tab样式页面缺少滚动条 添加滚动条 最外层直接使用JPanel,没有布局约束导致布局异常,需要调整
  MOBILE-29820 移动端tab样式页面缺少滚动条 对齐属性面板 新增scroll属性和滚动条
persist/10.0
superman 4 years ago
parent
commit
1e7cadd795
  1. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java
  2. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  3. 38
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java
  4. 27
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

1
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java

@ -38,6 +38,7 @@ public class VanChartRichEditorPane {
.prepare(new ScriptContextAdapter() { .prepare(new ScriptContextAdapter() {
public void onScriptContextCreated(ScriptContextEvent event) { public void onScriptContextCreated(ScriptContextEvent event) {
browser = event.getBrowser(); browser = event.getBrowser();
browser.getCacheStorage().clearCache();
JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace); JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace);
ns.asObject().setProperty(variable, model); ns.asObject().setProperty(variable, model);

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -228,11 +228,14 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected());
mobileAttr.setFunctionalWhenUnactivated(!functionalWhenUnactivatedCheckBox.isSelected()); mobileAttr.setFunctionalWhenUnactivated(!functionalWhenUnactivatedCheckBox.isSelected());
} }
// 在不勾选body移动端属性-手机重布局时,如果修改body内的图表块的移动端属性,会造成这边的npe,因此加个判断
if (this.mobileCollapsedStyleEditor != null) {
MobileCollapsedStyle style = this.mobileCollapsedStyleEditor.getStyle(); MobileCollapsedStyle style = this.mobileCollapsedStyleEditor.getStyle();
if (style != null) { if (style != null) {
((ChartEditor) xCreator.toData()).setMobileCollapsedStyle(style); ((ChartEditor) xCreator.toData()).setMobileCollapsedStyle(style);
style.setCollapsedWork(this.mobileCollapsedStyleEditor.isSelectedCustom() && !FormDesignerUtils.isInAbsoluteLayout(xCreator)); style.setCollapsedWork(this.mobileCollapsedStyleEditor.isSelectedCustom() && !FormDesignerUtils.isInAbsoluteLayout(xCreator));
} }
}
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来 DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
} }
} }

38
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java

@ -4,6 +4,8 @@ import com.fr.base.iofile.attr.FormTabPaddingAttrMark;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicScrollPane;
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;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
@ -15,7 +17,6 @@ import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.accessibles.AccessibleTemplateStyleEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleTemplateStyleEditor;
import com.fr.design.mainframe.widget.accessibles.MobileTemplateStylePane; import com.fr.design.mainframe.widget.accessibles.MobileTemplateStylePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileAdvanceInnerPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane; import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentMarginPane; import com.fr.design.widget.ui.designer.mobile.component.MobileComponentMarginPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentLayoutIntervalPane; import com.fr.design.widget.ui.designer.mobile.component.MobileComponentLayoutIntervalPane;
@ -23,7 +24,9 @@ import com.fr.design.widget.ui.designer.mobile.component.MobileTabCommonSettingP
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import java.awt.Dimension;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.BorderFactory;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
@ -36,9 +39,22 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
private MobileComponentLayoutIntervalPane intervalPane; private MobileComponentLayoutIntervalPane intervalPane;
private MobileBookMarkUsePane mobileBookMarkUsePane; private MobileBookMarkUsePane mobileBookMarkUsePane;
private MobileTabCommonSettingPane mobileTabCommonSettingPane; private MobileTabCommonSettingPane mobileTabCommonSettingPane;
private JPanel contentJPanel;
private BasicScrollPane scrollPane;
private JPanel holder;
private Dimension dimension;
public TabMobileWidgetDefinePane(XCreator xCreator) { public TabMobileWidgetDefinePane(XCreator xCreator) {
this.xCreator = xCreator; this.xCreator = xCreator;
contentJPanel = FRGUIPaneFactory.createCenterFlowZeroGapBorderPane();
scrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return contentJPanel;
}
};
scrollPane.setBorder(null);
} }
private void bindListeners2Widgets() { private void bindListeners2Widgets() {
@ -61,11 +77,23 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
@Override @Override
public void initPropertyGroups(Object source) { public void initPropertyGroups(Object source) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template")); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template"));
templateStyleEditor = new AccessibleTemplateStyleEditor(new MobileTemplateStylePane((WCardTagLayout) xCreator.toData())); templateStyleEditor = new AccessibleTemplateStyleEditor(new MobileTemplateStylePane((WCardTagLayout) xCreator.toData()));
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE); JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE);
JPanel holder = FRGUIPaneFactory.createBorderLayout_S_Pane(); holder = new JPanel(new BorderLayout()) {
@Override
public Dimension getPreferredSize() {
if (dimension == null) {
return super.getPreferredSize();
} else {
Dimension defaultDimension = super.getPreferredSize();
defaultDimension.width = dimension.width;
return defaultDimension;
}
}
};
holder.add(jPanel, BorderLayout.NORTH); holder.add(jPanel, BorderLayout.NORTH);
JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
if (!shouldHidePadding(designer)) { if (!shouldHidePadding(designer)) {
@ -89,13 +117,17 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
//高级 //高级
holder.add(advancePane, BorderLayout.CENTER); holder.add(advancePane, BorderLayout.CENTER);
this.add(holder, BorderLayout.NORTH); contentJPanel.add(holder, BorderLayout.CENTER);
this.add(scrollPane, BorderLayout.CENTER);
} }
@Override @Override
public void populate(FormDesigner designer) { public void populate(FormDesigner designer) {
WCardTagLayout wCardTagLayout = (WCardTagLayout) xCreator.toData(); WCardTagLayout wCardTagLayout = (WCardTagLayout) xCreator.toData();
MobileTemplateStyle mobileTemplateStyle = wCardTagLayout.getMobileTemplateStyle(); MobileTemplateStyle mobileTemplateStyle = wCardTagLayout.getMobileTemplateStyle();
if (dimension == null) {
dimension = holder.getPreferredSize();
}
templateStyleEditor.setValue(mobileTemplateStyle); templateStyleEditor.setValue(mobileTemplateStyle);
// 数据 populate 完成后,再设置监听 // 数据 populate 完成后,再设置监听
this.bindListeners2Widgets(); this.bindListeners2Widgets();

27
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

@ -35,6 +35,7 @@ public class MobileTabCommonSettingPane extends BasicPane {
private ModeButtonGroup<Integer> buttonGroup; private ModeButtonGroup<Integer> buttonGroup;
private NewColorSelectBox initDotColorBox; private NewColorSelectBox initDotColorBox;
private NewColorSelectBox selectDotColorBox; private NewColorSelectBox selectDotColorBox;
private boolean isPopulate;
public MobileTabCommonSettingPane(boolean isTopComponent) { public MobileTabCommonSettingPane(boolean isTopComponent) {
initComponent(isTopComponent); initComponent(isTopComponent);
@ -89,23 +90,27 @@ public class MobileTabCommonSettingPane extends BasicPane {
initDotColorBox = new NewColorSelectBox(0){ initDotColorBox = new NewColorSelectBox(0){
@Override @Override
protected void iniListener() { protected void iniListener() {
} this.addSelectChangeListener(new ChangeListener() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void stateChanged(ChangeEvent e) {
super.mouseClicked(e); if (!isPopulate) {
this.attributeChange(); attributeChange();
}
}
});
} }
}; };
selectDotColorBox = new NewColorSelectBox(0){ selectDotColorBox = new NewColorSelectBox(0){
@Override @Override
protected void iniListener() { protected void iniListener() {
} this.addSelectChangeListener(new ChangeListener() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void stateChanged(ChangeEvent e) {
super.mouseClicked(e); if (!isPopulate) {
this.attributeChange(); attributeChange();
}
}
});
} }
}; };
JPanel initDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initColorLabel, initDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); JPanel initDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initColorLabel, initDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
@ -189,7 +194,9 @@ public class MobileTabCommonSettingPane extends BasicPane {
color = defaultColor; color = defaultColor;
} }
if (color != colorBox.getSelectObject()) { if (color != colorBox.getSelectObject()) {
isPopulate = true;
colorBox.setSelectObject(color); colorBox.setSelectObject(color);
isPopulate = false;
} }
} }

Loading…
Cancel
Save