From 2cbcd97fd70e27fb817e4f24a91449d3baf5f1bf Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 21 Oct 2020 11:08:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?CHART-16330=20=E4=BF=AE=E6=94=B9=E7=94=98?= =?UTF-8?q?=E7=89=B9=E5=9B=BE=E3=80=81=E6=A1=86=E6=9E=B6=E5=9B=BE=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=B1=9E=E6=80=A7=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/VanChartGanttConditionPane.java | 4 +-- .../VanChartGanttLabelConditionPane.java | 17 +++++++++++++ .../VanChartGanttPlotLabelNoCheckPane.java | 25 +++++++++++++++++++ .../other/VanChartStructureConditionPane.java | 4 +-- .../VanChartStructureLabelConditionPane.java | 17 +++++++++++++ ...VanChartStructurePlotLabelNoCheckPane.java | 25 +++++++++++++++++++ 6 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelConditionPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttPlotLabelNoCheckPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelConditionPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructurePlotLabelNoCheckPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java index 24a5d45fe..09d7a4b81 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java @@ -13,11 +13,11 @@ import com.fr.plugin.chart.gantt.attr.AttrGanttTooltip; import com.fr.plugin.chart.gantt.attr.AttrGanttTooltipContent; import com.fr.plugin.chart.type.ConditionKeyType; import com.fr.van.chart.designer.PlotFactory; -import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane; import com.fr.van.chart.designer.other.condition.item.VanChartSeriesColorConditionPane; import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipNoCheckPane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; +import com.fr.van.chart.gantt.designer.style.label.VanChartGanttLabelConditionPane; import java.awt.Dimension; @@ -42,7 +42,7 @@ public class VanChartGanttConditionPane extends DataSeriesConditionPane { classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this)); classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); if (!PlotFactory.largeDataModel(plot)) { - classPaneMap.put(AttrGanttLabel.class, new VanChartLabelConditionPane(this, plot)); + classPaneMap.put(AttrGanttLabel.class, new VanChartGanttLabelConditionPane(this, plot)); } classPaneMap.put(AttrGanttTooltip.class, new VanChartTooltipConditionPane(this, plot) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelConditionPane.java new file mode 100644 index 000000000..86c3ba942 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.van.chart.gantt.designer.style.label; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane; +import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; + +public class VanChartGanttLabelConditionPane extends VanChartLabelConditionPane { + + public VanChartGanttLabelConditionPane(ConditionAttributesPane conditionAttributesPane, Plot plot) { + super(conditionAttributesPane, plot); + } + + protected VanChartPlotLabelPane createLabelPane() { + return new VanChartGanttPlotLabelNoCheckPane(getPlot(), null); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttPlotLabelNoCheckPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttPlotLabelNoCheckPane.java new file mode 100644 index 000000000..4743a545d --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttPlotLabelNoCheckPane.java @@ -0,0 +1,25 @@ +package com.fr.van.chart.gantt.designer.style.label; + +import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrLabel; +import com.fr.van.chart.designer.style.VanChartStylePane; + +import java.awt.BorderLayout; + +public class VanChartGanttPlotLabelNoCheckPane extends VanChartGanttPlotLabelPane { + + public VanChartGanttPlotLabelNoCheckPane(Plot plot, VanChartStylePane parent) { + super(plot, parent); + } + + protected void addComponents() { + this.setLayout(new BorderLayout()); + this.add(getLabelPane(), BorderLayout.CENTER); + } + + public void populate(AttrLabel attr) { + super.populate(attr); + getLabelShowCheckBox().setSelected(true); + getLabelPane().setVisible(true); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/other/VanChartStructureConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/other/VanChartStructureConditionPane.java index 7fac3034b..9a8cf4e45 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/other/VanChartStructureConditionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/other/VanChartStructureConditionPane.java @@ -11,10 +11,10 @@ import com.fr.plugin.chart.base.AttrTooltip; import com.fr.plugin.chart.structure.VanChartStructurePlot; import com.fr.plugin.chart.type.ConditionKeyType; import com.fr.van.chart.designer.other.condition.item.VanChartFloatColorConditionPane; -import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane; import com.fr.van.chart.designer.other.condition.item.VanChartSeriesColorConditionPane; import com.fr.van.chart.designer.other.condition.item.VanChartStructureNodeConditionPane; import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPane; +import com.fr.van.chart.structure.desinger.style.VanChartStructureLabelConditionPane; import java.awt.Dimension; @@ -47,7 +47,7 @@ public class VanChartStructureConditionPane extends DataSeriesConditionPane { protected void addBasicAction() { classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this)); classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot)); - classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot)); + classPaneMap.put(AttrLabel.class, new VanChartStructureLabelConditionPane(this, plot)); classPaneMap.put(AttrFloatColor.class, new VanChartFloatColorConditionPane(this)); classPaneMap.put(AttrNode.class, new VanChartStructureNodeConditionPane(this)); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelConditionPane.java new file mode 100644 index 000000000..c5c9cf320 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.van.chart.structure.desinger.style; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane; +import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; + +public class VanChartStructureLabelConditionPane extends VanChartLabelConditionPane { + + public VanChartStructureLabelConditionPane(ConditionAttributesPane conditionAttributesPane, Plot plot) { + super(conditionAttributesPane, plot); + } + + protected VanChartPlotLabelPane createLabelPane() { + return new VanChartStructurePlotLabelNoCheckPane(getPlot(), null); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructurePlotLabelNoCheckPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructurePlotLabelNoCheckPane.java new file mode 100644 index 000000000..e7dfb1873 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructurePlotLabelNoCheckPane.java @@ -0,0 +1,25 @@ +package com.fr.van.chart.structure.desinger.style; + +import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrLabel; +import com.fr.van.chart.designer.style.VanChartStylePane; + +import java.awt.BorderLayout; + +public class VanChartStructurePlotLabelNoCheckPane extends VanChartStructurePlotLabelPane { + + public VanChartStructurePlotLabelNoCheckPane(Plot plot, VanChartStylePane parent) { + super(plot, parent); + } + + protected void addComponents() { + this.setLayout(new BorderLayout()); + this.add(getLabelPane(), BorderLayout.CENTER); + } + + public void populate(AttrLabel attr) { + super.populate(attr); + getLabelShowCheckBox().setSelected(true); + getLabelPane().setVisible(true); + } +} From d8576dcefca8b06713c0cdb375c6113fb0e9a43a Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 21 Oct 2020 14:52:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?MOBILE-29857=E3=80=90RN=E3=80=91=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=B8=8A=E5=9C=86=E7=82=B9=E6=8C=87=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E9=80=89=E4=B8=AD=E5=A1=AB=E5=85=85=E8=89=B2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=90=8E=E6=B2=A1=E6=9C=89=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/MobileTabCommonSettingPane.java | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java index 4670456ae..def9cf795 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java +++ b/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 buttonGroup; private NewColorSelectBox initDotColorBox; private NewColorSelectBox selectDotColorBox; + private boolean isPopulate; public MobileTabCommonSettingPane(boolean isTopComponent) { initComponent(isTopComponent); @@ -89,23 +90,27 @@ public class MobileTabCommonSettingPane extends BasicPane { initDotColorBox = new NewColorSelectBox(0){ @Override protected void iniListener() { - } - - @Override - public void mouseClicked(MouseEvent e) { - super.mouseClicked(e); - this.attributeChange(); + this.addSelectChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + if (!isPopulate) { + attributeChange(); + } + } + }); } }; selectDotColorBox = new NewColorSelectBox(0){ @Override protected void iniListener() { - } - - @Override - public void mouseClicked(MouseEvent e) { - super.mouseClicked(e); - this.attributeChange(); + this.addSelectChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + if (!isPopulate) { + attributeChange(); + } + } + }); } }; 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; } if (color != colorBox.getSelectObject()) { + isPopulate = true; colorBox.setSelectObject(color); + isPopulate = false; } } From debdd3bcf71354f617e435b263aabac643d40ea2 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 21 Oct 2020 15:21:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?MOBILE-29626=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=86=BB=E7=BB=93=E3=80=91=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E3=80=8Bchart1=E8=AE=BE=E7=BD=AE=E4=BA=86=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=B6=E9=83=A8=E5=86=BB=E7=BB=93=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9chart1=E7=9A=84=E6=8E=A7=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=EF=BC=8C=E5=86=8D=E6=AC=A1=E6=9F=A5=E7=9C=8B=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=B6=E9=83=A8=E5=86=BB=E7=BB=93=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E8=AF=A5=E7=BB=84=E4=BB=B6=E6=9C=AA?= =?UTF-8?q?=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/MobileComponentFrozenPane.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java index de86a07f2..0dd2fcc15 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java @@ -92,6 +92,7 @@ public class MobileComponentFrozenPane extends BasicPane { WSortLayout wSortLayout = ((WSortLayout) xCreator.toData()); List all = wSortLayout.getNonContainerWidgetList(); List selected = wSortLayout.getFrozenWidgets(); + selected = fixRename(all, selected, wSortLayout); Map map = new LinkedHashMap<>(); for (String value : selected) { map.put(value, true); @@ -103,6 +104,24 @@ public class MobileComponentFrozenPane extends BasicPane { uiComboCheckBox.setSelectedValues(map); } + private List fixRename(List all, List selected, WSortLayout wSortLayout) { + // 存在重命名 + if (!selected.isEmpty() && !all.containsAll(selected)) { + // 清空原选中的 selected是Unmodifiable的 + selected = new ArrayList<>(); + for (String name : all) { + Widget widget = FormWidgetHelper.findWidgetWithBound(wSortLayout, name); + if (widget != null && widget.getMobileBookMark().isFrozen()) { + // 重新添加 + selected.add(name); + } + } + // 同时更新下 + wSortLayout.updateFrozenWidgets(selected); + } + return selected; + } + private List frozenWidgets() { Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); WLayout container = form.getContainer();