Browse Source

CHART-14218 调整颜色面板组件顺序、渐变时配色面板隐藏

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
a581abe24c
  1. 7
      designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubbleSeriesPane.java
  2. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  3. 13
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java
  4. 9
      designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java
  5. 2
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java

7
designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubbleSeriesPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.bubble;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.i18n.Toolkit;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -53,7 +54,7 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane {
//设置色彩面板内容
@Override
protected void setColorPaneContent(JPanel panel) {
panel.add(createAlphaPane(), BorderLayout.CENTER);
panel.add(createAlphaPane(), BorderLayout.SOUTH);
}
@Override
@ -67,7 +68,7 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane {
@Override
public String getPaneTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Axis");
return Toolkit.i18nText("Fine-Design_Chart_Custom_Axis");
}
};
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
@ -76,7 +77,7 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createBubblePane() {
bubblePane = new VanChartBubblePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Bubble"), bubblePane);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Bubble"), bubblePane);
}
protected void populateCondition(ConditionAttr defaultAttr) {

22
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -6,6 +6,7 @@ import com.fr.base.chart.chartdata.model.NormalDataModel;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBorder;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.GradientStyle;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -22,6 +23,7 @@ import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.type.GradientType;
import com.fr.van.chart.custom.style.VanChartCustomStylePane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartAreaSeriesFillColorPane;
@ -114,7 +116,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
stylePane = createStylePane();
vanChartFillStylePane = getVanChartFillStylePane();
if (vanChartFillStylePane != null) {
panel.add(vanChartFillStylePane, BorderLayout.NORTH);
panel.add(vanChartFillStylePane, BorderLayout.CENTER);
}
setColorPaneContent(panel);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Color"), panel);
@ -122,10 +124,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
return panel.getComponentCount() == 0 ? null : colorPane;
}
//设置色彩面板内容
//设置色彩面板内容: 风格居上,配色居中,不透明度居下
protected void setColorPaneContent(JPanel panel) {
if (stylePane != null) {
panel.add(stylePane, BorderLayout.CENTER);
panel.add(stylePane, BorderLayout.NORTH);
}
}
private void checkFillStylePane(GradientStyle gradientStyle) {
if (vanChartFillStylePane != null) {
vanChartFillStylePane.setVisible(gradientStyle.getGradientType() != GradientType.CUSTOM);
}
}
@ -276,7 +284,9 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
if (stylePane != null) {//风格
stylePane.populateBean(((VanChartPlot)plot).getGradientStyle());
GradientStyle gradientStyle = ((VanChartPlot) plot).getGradientStyle();
stylePane.populateBean(gradientStyle);
checkFillStylePane(gradientStyle);
}
//大数据模式 恢复用注释。下面3行删除。
@ -335,7 +345,9 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
if (stylePane != null) {//风格
((VanChartPlot)plot).setGradientStyle(stylePane.updateBean());
GradientStyle gradientStyle = stylePane.updateBean();
((VanChartPlot) plot).setGradientStyle(gradientStyle);
checkFillStylePane(gradientStyle);
}
//大数据模式 恢复用注释。下面3行删除。

13
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.funnel.designer.style;
import com.fr.chart.chartattr.Plot;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
@ -43,14 +44,14 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
//设置色彩面板内容
protected void setColorPaneContent (JPanel panel) {
if (stylePane != null) {
panel.add(stylePane, BorderLayout.CENTER);
panel.add(stylePane, BorderLayout.NORTH);
}
panel.add(createAlphaPane(), BorderLayout.SOUTH);
}
private JPanel createFunnelStylePane() {
useSameSlantAngle = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Same_Slant_Angle"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Diff_Slant_Angle")});
sort = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Auto_Sort"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Origin")});
useSameSlantAngle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Same_Slant_Angle"), Toolkit.i18nText("Fine-Design_Chart_Use_Diff_Slant_Angle")});
sort = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Auto_Sort"), Toolkit.i18nText("Fine-Design_Chart_Origin")});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
@ -59,13 +60,13 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Continuity")), useSameSlantAngle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sort")), sort},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Continuity")), useSameSlantAngle},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Sort")), sort},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Name"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Style_Name"), panel);
}
public void populateBean(Plot plot) {

9
designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.radar;
import com.fr.chart.chartattr.Plot;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -59,15 +60,15 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane {
//设置色彩面板内容
protected void setColorPaneContent (JPanel panel) {
if(plot instanceof VanChartRadarPlot && ((VanChartRadarPlot)plot).isStackChart()) {
panel.add(createAlphaPane(), BorderLayout.CENTER);
panel.add(createAlphaPane(), BorderLayout.SOUTH);
}
}
private JPanel createRadarTypePane() {
radarType = new UIButtonGroup<String>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Circle"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Polygonal")},
radarType = new UIButtonGroup<String>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Circle"), Toolkit.i18nText("Fine-Design_Chart_Polygonal")},
new String[]{RadarType.CIRCLE.getType(), RadarType.POLYGON.getType()});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Shape"), radarType);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Present"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Shape"), radarType);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Style_Present"), panel);
}
protected VanChartLineTypePane getLineTypePane() {

2
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java

@ -54,7 +54,7 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane {
//设置色彩面板内容
protected void setColorPaneContent(JPanel panel) {
panel.add(createAlphaPane(), BorderLayout.CENTER);
panel.add(createAlphaPane(), BorderLayout.SOUTH);
}
@Override

Loading…
Cancel
Save