Browse Source

Pull request #2659: CHART-16196 && CHART-16209 钻取地图钻取目录背景增加自动,地图标题背景增加自动

Merge in DESIGN/design from ~BJORN/design:feature/10.0 to feature/10.0

* commit '13b4e01275e448cb80f809799ab3a80ef630d6b0':
  CHART-16196 && CHART-16209 钻取地图钻取目录背景增加自动,地图标题背景增加自动
research/11.0
Bjorn 4 years ago
parent
commit
92894b0590
  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. 7
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/VanChartMapStylePane.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;
private boolean hasAuto;
public VanChartBackgroundPane() {
this(false);
}
public VanChartBackgroundPane(boolean hasAuto) {
this.hasAuto = hasAuto;
initComponents();
JPanel panel = initContentPanel();
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
}
public boolean isHasAuto() {
return hasAuto;
}
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
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;
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;
@ -11,13 +13,49 @@ import com.fr.design.mainframe.backgroundpane.VanChartGradientPane;
public class VanChartBackgroundWithOutImagePane extends VanChartBackgroundPane {
private static final long serialVersionUID = 1322979785605013853L;
private static final int AUTO = 0;
public VanChartBackgroundWithOutImagePane() {
super();
this(false);
}
public VanChartBackgroundWithOutImagePane(boolean hasAuto) {
super(hasAuto);
}
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 ColorBackgroundQuickPane());
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();
}
public VanChartBackgroundWithOutShadowWithRadiusPane(boolean hasAuto){
super(hasAuto);
}
protected Component[][] getPaneComponents() {
radius = new UISpinner(0,1000,1,0);
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;
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
@ -20,6 +20,6 @@ public class MapRangeLegendPane extends VanChartRangeLegendPane {
@Override
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() {
java.util.List<BasicPane> paneList = new ArrayList<BasicPane>();
Plot plot = getChart().getPlot();
paneList.add(new VanChartTitlePane(VanChartStylePane.this));
if(plot.isSupportLegend()){
paneList.add(createVanChartTitlePane());
if (plot.isSupportLegend()) {
paneList.add(new VanChartLegendPane(VanChartStylePane.this));
}
@ -34,14 +34,14 @@ public class VanChartStylePane extends ChartStylePane {
paneList.add(createChartSeriesPane());
if(plot.isHaveAxis()){
if(plot instanceof VanChartAxisPlot) {
if (plot.isHaveAxis()) {
if (plot instanceof VanChartAxisPlot) {
createVanChartAxisPane(paneList, (VanChartAxisPlot) plot);
}
addOtherAxisPane(paneList, plot);
if(plot.isSupportDataSheet()) {
if (plot.isSupportDataSheet()) {
paneList.add(new VanChartDataSheetPane());
}
}
@ -53,6 +53,10 @@ public class VanChartStylePane extends ChartStylePane {
return paneList;
}
protected VanChartTitlePane createVanChartTitlePane() {
return new VanChartTitlePane(VanChartStylePane.this);
}
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));
}
protected void addVanChartTooltipPane(List<BasicPane> paneList){
protected void addVanChartTooltipPane(List<BasicPane> paneList) {
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() {
backgroundPane = new VanChartBackgroundWithOutShadowWithRadiusPane();
backgroundPane = createBackgroundPane();
double p = TableLayout.PREFERRED;
@ -132,6 +132,10 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
protected VanChartBackgroundWithOutShadowWithRadiusPane createBackgroundPane() {
return new VanChartBackgroundWithOutShadowWithRadiusPane();
}
private JPanel createTitleContentPane(double[] row, double[] col) {
titleContent = new TinyFormulaPane();
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.chartattr.Chart;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
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.plugin.chart.attr.plot.VanChartPlot;
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.component.background.VanChartBackgroundPaneWithOutImageAndShadow;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.design.i18n.Toolkit;
import javax.swing.BorderFactory;
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();
catalogSuperLink = new VanChartCatalogHyperLinkPane();

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.type.MapType;
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.tooltip.VanChartMapTooltipPane;
@ -20,6 +22,11 @@ public class VanChartMapStylePane extends VanChartStylePane {
super(listener);
}
protected VanChartTitlePane createVanChartTitlePane() {
return new VanChartTitleWithAutoBackground(VanChartMapStylePane.this);
}
protected void createVanChartLabelPane(List<BasicPane> paneList) {
Plot plot = getChart().getPlot();
if(!isLineMapPlot(plot)) {

Loading…
Cancel
Save