Browse Source

Merge pull request #2670 in DESIGN/design from feature/10.0 to research/10.0

* commit 'aa780d213a2623582b535442cdd405db76d4dc31':
  MOBILE-29626 【组件顶部冻结】设计器》chart1设置了组件顶部冻结后,修改chart1的控件名称,再次查看组件顶部冻结设置界面,该组件未选中
  MOBILE-29857【RN】设计器上圆点指示器选中填充色设置后没有生效
  CHART-16330 修改甘特图、框架图条件属性界面
  CHART-16196 && CHART-16209 钻取地图钻取目录背景增加自动,地图标题背景增加自动
research/10.0
superman 4 years ago
parent
commit
e19ce8edec
  1. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java
  2. 49
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPaneWithAutoColor.java
  3. 40
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundWithOutImagePane.java
  4. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java
  5. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/MapRangeLegendPane.java
  6. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartStylePane.java
  7. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  8. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitleWithAutoBackground.java
  9. 19
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  10. 4
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java
  11. 17
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelConditionPane.java
  12. 25
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttPlotLabelNoCheckPane.java
  13. 7
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/VanChartMapStylePane.java
  14. 4
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/other/VanChartStructureConditionPane.java
  15. 17
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelConditionPane.java
  16. 25
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructurePlotLabelNoCheckPane.java
  17. 19
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java
  18. 31
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

12
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java

@ -44,13 +44,25 @@ public class VanChartBackgroundPane extends BasicPane {
protected JPanel centerPane; protected JPanel centerPane;
private boolean hasAuto;
public VanChartBackgroundPane() { public VanChartBackgroundPane() {
this(false);
}
public VanChartBackgroundPane(boolean hasAuto) {
this.hasAuto = hasAuto;
initComponents(); initComponents();
JPanel panel = initContentPanel(); JPanel panel = initContentPanel();
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
} }
public boolean isHasAuto() {
return hasAuto;
}
protected JPanel initContentPanel() { protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;

49
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPaneWithAutoColor.java

@ -1,49 +0,0 @@
package com.fr.van.chart.designer.component.background;
import com.fr.chart.chartglyph.GeneralInfo;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.VanChartGradientPane;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2020-09-11
*/
public class VanChartBackgroundPaneWithAutoColor extends VanChartBackgroundPane {
private static final int AUTO = 0;
public VanChartBackgroundPaneWithAutoColor() {
super();
}
protected void initList() {
paneList.add(new NullBackgroundQuickPane() {
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Automatic");
}
});
paneList.add(new NullBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane());
paneList.add(new VanChartGradientPane());
}
public void populateBackground(GeneralInfo attr, int begin) {
if (attr.isAutoBackground()) {
typeComboBox.setSelectedIndex(AUTO);
return;
}
super.populateBackground(attr, begin + 1);
}
public void updateBackground(GeneralInfo attr) {
if (typeComboBox.getSelectedIndex() == AUTO) {
attr.setAutoBackground(true);
return;
}
attr.setAutoBackground(false);
super.updateBackground(attr);
}
}

40
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundWithOutImagePane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.designer.component.background; package com.fr.van.chart.designer.component.background;
import com.fr.chart.chartglyph.GeneralInfo;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.VanChartGradientPane; import com.fr.design.mainframe.backgroundpane.VanChartGradientPane;
@ -11,13 +13,49 @@ import com.fr.design.mainframe.backgroundpane.VanChartGradientPane;
public class VanChartBackgroundWithOutImagePane extends VanChartBackgroundPane { public class VanChartBackgroundWithOutImagePane extends VanChartBackgroundPane {
private static final long serialVersionUID = 1322979785605013853L; private static final long serialVersionUID = 1322979785605013853L;
private static final int AUTO = 0;
public VanChartBackgroundWithOutImagePane() { public VanChartBackgroundWithOutImagePane() {
super(); this(false);
}
public VanChartBackgroundWithOutImagePane(boolean hasAuto) {
super(hasAuto);
} }
protected void initList() { protected void initList() {
if (isHasAuto()) {
paneList.add(new NullBackgroundQuickPane() {
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Automatic");
}
});
}
paneList.add(new NullBackgroundQuickPane()); paneList.add(new NullBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane()); paneList.add(new ColorBackgroundQuickPane());
paneList.add(new VanChartGradientPane()); paneList.add(new VanChartGradientPane());
} }
public void populateBackground(GeneralInfo attr, int begin) {
if (isHasAuto()) {
if (attr.isAutoBackground()) {
typeComboBox.setSelectedIndex(AUTO);
return;
}
super.populateBackground(attr, begin + 1);
} else {
super.populateBackground(attr, begin);
}
}
public void updateBackground(GeneralInfo attr) {
if (isHasAuto()) {
if (typeComboBox.getSelectedIndex() == AUTO) {
attr.setAutoBackground(true);
return;
}
attr.setAutoBackground(false);
}
super.updateBackground(attr);
}
} }

4
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java

@ -19,6 +19,10 @@ public class VanChartBackgroundWithOutShadowWithRadiusPane extends VanChartBackg
super(); super();
} }
public VanChartBackgroundWithOutShadowWithRadiusPane(boolean hasAuto){
super(hasAuto);
}
protected Component[][] getPaneComponents() { protected Component[][] getPaneComponents() {
radius = new UISpinner(0,1000,1,0); radius = new UISpinner(0,1000,1,0);
return new Component[][]{ return new Component[][]{

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/MapRangeLegendPane.java

@ -1,7 +1,7 @@
package com.fr.van.chart.designer.style; package com.fr.van.chart.designer.style;
import com.fr.van.chart.designer.component.background.VanChartBackgroundPane; import com.fr.van.chart.designer.component.background.VanChartBackgroundPane;
import com.fr.van.chart.designer.component.background.VanChartBackgroundPaneWithAutoColor; import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutImagePane;
/** /**
* @author Bjorn * @author Bjorn
@ -20,6 +20,6 @@ public class MapRangeLegendPane extends VanChartRangeLegendPane {
@Override @Override
protected VanChartBackgroundPane creatBackgroundPane(){ protected VanChartBackgroundPane creatBackgroundPane(){
return new VanChartBackgroundPaneWithAutoColor(); return new VanChartBackgroundWithOutImagePane(true);
} }
} }

16
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartStylePane.java

@ -25,8 +25,8 @@ public class VanChartStylePane extends ChartStylePane {
protected java.util.List<BasicPane> getPaneList() { protected java.util.List<BasicPane> getPaneList() {
java.util.List<BasicPane> paneList = new ArrayList<BasicPane>(); java.util.List<BasicPane> paneList = new ArrayList<BasicPane>();
Plot plot = getChart().getPlot(); Plot plot = getChart().getPlot();
paneList.add(new VanChartTitlePane(VanChartStylePane.this)); paneList.add(createVanChartTitlePane());
if(plot.isSupportLegend()){ if (plot.isSupportLegend()) {
paneList.add(new VanChartLegendPane(VanChartStylePane.this)); paneList.add(new VanChartLegendPane(VanChartStylePane.this));
} }
@ -34,14 +34,14 @@ public class VanChartStylePane extends ChartStylePane {
paneList.add(createChartSeriesPane()); paneList.add(createChartSeriesPane());
if(plot.isHaveAxis()){ if (plot.isHaveAxis()) {
if(plot instanceof VanChartAxisPlot) { if (plot instanceof VanChartAxisPlot) {
createVanChartAxisPane(paneList, (VanChartAxisPlot) plot); createVanChartAxisPane(paneList, (VanChartAxisPlot) plot);
} }
addOtherAxisPane(paneList, plot); addOtherAxisPane(paneList, plot);
if(plot.isSupportDataSheet()) { if (plot.isSupportDataSheet()) {
paneList.add(new VanChartDataSheetPane()); paneList.add(new VanChartDataSheetPane());
} }
} }
@ -53,6 +53,10 @@ public class VanChartStylePane extends ChartStylePane {
return paneList; return paneList;
} }
protected VanChartTitlePane createVanChartTitlePane() {
return new VanChartTitlePane(VanChartStylePane.this);
}
protected void addOtherAxisPane(java.util.List<BasicPane> paneList, Plot plot) { protected void addOtherAxisPane(java.util.List<BasicPane> paneList, Plot plot) {
} }
@ -68,7 +72,7 @@ public class VanChartStylePane extends ChartStylePane {
paneList.add(new VanChartLabelPane(VanChartStylePane.this)); paneList.add(new VanChartLabelPane(VanChartStylePane.this));
} }
protected void addVanChartTooltipPane(List<BasicPane> paneList){ protected void addVanChartTooltipPane(List<BasicPane> paneList) {
paneList.add(new VanChartTooltipPane(VanChartStylePane.this)); paneList.add(new VanChartTooltipPane(VanChartStylePane.this));
} }
} }

6
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -112,7 +112,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
} }
private JPanel createTitlePane() { private JPanel createTitlePane() {
backgroundPane = new VanChartBackgroundWithOutShadowWithRadiusPane(); backgroundPane = createBackgroundPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
@ -132,6 +132,10 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
} }
protected VanChartBackgroundWithOutShadowWithRadiusPane createBackgroundPane() {
return new VanChartBackgroundWithOutShadowWithRadiusPane();
}
private JPanel createTitleContentPane(double[] row, double[] col) { private JPanel createTitleContentPane(double[] row, double[] col) {
titleContent = new TinyFormulaPane(); titleContent = new TinyFormulaPane();
useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html")); useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html"));

19
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitleWithAutoBackground.java

@ -0,0 +1,19 @@
package com.fr.van.chart.designer.style;
import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutShadowWithRadiusPane;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2020-10-20
*/
public class VanChartTitleWithAutoBackground extends VanChartTitlePane {
public VanChartTitleWithAutoBackground(VanChartStylePane parent) {
super(parent);
}
protected VanChartBackgroundWithOutShadowWithRadiusPane createBackgroundPane() {
return new VanChartBackgroundWithOutShadowWithRadiusPane(true);
}
}

19
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java

@ -3,8 +3,11 @@ package com.fr.van.chart.drillmap.designer.other;
import com.fr.chart.base.DrillMapTools; import com.fr.chart.base.DrillMapTools;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
@ -12,7 +15,6 @@ import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow; import com.fr.van.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithMapZoom; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.design.i18n.Toolkit;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -74,7 +76,20 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
}; };
} }
}; };
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow() {
@Override
protected void initList() {
paneList.add(new NullBackgroundQuickPane() {
@Override
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Automatic");
}
});
paneList.add(new ColorBackgroundQuickPane());
}
};
selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
catalogSuperLink = new VanChartCatalogHyperLinkPane(); catalogSuperLink = new VanChartCatalogHyperLinkPane();

4
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.gantt.attr.AttrGanttTooltipContent;
import com.fr.plugin.chart.type.ConditionKeyType; import com.fr.plugin.chart.type.ConditionKeyType;
import com.fr.van.chart.designer.PlotFactory; 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.VanChartSeriesColorConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPane; 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.VanChartPlotTooltipNoCheckPane;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import com.fr.van.chart.gantt.designer.style.label.VanChartGanttLabelConditionPane;
import java.awt.Dimension; import java.awt.Dimension;
@ -42,7 +42,7 @@ public class VanChartGanttConditionPane extends DataSeriesConditionPane {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this)); classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this));
if (!PlotFactory.largeDataModel(plot)) { 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) { classPaneMap.put(AttrGanttTooltip.class, new VanChartTooltipConditionPane(this, plot) {

17
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);
}
}

25
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);
}
}

7
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/VanChartMapStylePane.java

@ -7,6 +7,8 @@ import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.VanChartTitlePane;
import com.fr.van.chart.designer.style.VanChartTitleWithAutoBackground;
import com.fr.van.chart.map.designer.style.label.VanChartMapLabelPane; import com.fr.van.chart.map.designer.style.label.VanChartMapLabelPane;
import com.fr.van.chart.map.designer.style.tooltip.VanChartMapTooltipPane; import com.fr.van.chart.map.designer.style.tooltip.VanChartMapTooltipPane;
@ -20,6 +22,11 @@ public class VanChartMapStylePane extends VanChartStylePane {
super(listener); super(listener);
} }
protected VanChartTitlePane createVanChartTitlePane() {
return new VanChartTitleWithAutoBackground(VanChartMapStylePane.this);
}
protected void createVanChartLabelPane(List<BasicPane> paneList) { protected void createVanChartLabelPane(List<BasicPane> paneList) {
Plot plot = getChart().getPlot(); Plot plot = getChart().getPlot();
if(!isLineMapPlot(plot)) { if(!isLineMapPlot(plot)) {

4
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.structure.VanChartStructurePlot;
import com.fr.plugin.chart.type.ConditionKeyType; 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.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.VanChartSeriesColorConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartStructureNodeConditionPane; 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.designer.other.condition.item.VanChartTooltipConditionPane;
import com.fr.van.chart.structure.desinger.style.VanChartStructureLabelConditionPane;
import java.awt.Dimension; import java.awt.Dimension;
@ -47,7 +47,7 @@ public class VanChartStructureConditionPane extends DataSeriesConditionPane {
protected void addBasicAction() { protected void addBasicAction() {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this)); classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot)); 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(AttrFloatColor.class, new VanChartFloatColorConditionPane(this));
classPaneMap.put(AttrNode.class, new VanChartStructureNodeConditionPane(this)); classPaneMap.put(AttrNode.class, new VanChartStructureNodeConditionPane(this));
} }

17
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);
}
}

25
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);
}
}

19
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()); WSortLayout wSortLayout = ((WSortLayout) xCreator.toData());
List<String> all = wSortLayout.getNonContainerWidgetList(); List<String> all = wSortLayout.getNonContainerWidgetList();
List<String> selected = wSortLayout.getFrozenWidgets(); List<String> selected = wSortLayout.getFrozenWidgets();
selected = fixRename(all, selected, wSortLayout);
Map<Object, Boolean> map = new LinkedHashMap<>(); Map<Object, Boolean> map = new LinkedHashMap<>();
for (String value : selected) { for (String value : selected) {
map.put(value, true); map.put(value, true);
@ -103,6 +104,24 @@ public class MobileComponentFrozenPane extends BasicPane {
uiComboCheckBox.setSelectedValues(map); uiComboCheckBox.setSelectedValues(map);
} }
private List<String> fixRename(List<String> all, List<String> 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<String> frozenWidgets() { private List<String> frozenWidgets() {
Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget();
WLayout container = form.getContainer(); WLayout container = form.getContainer();

31
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 stateChanged(ChangeEvent e) {
public void mouseClicked(MouseEvent e) { if (!isPopulate) {
super.mouseClicked(e); attributeChange();
this.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 stateChanged(ChangeEvent e) {
public void mouseClicked(MouseEvent e) { if (!isPopulate) {
super.mouseClicked(e); attributeChange();
this.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