Browse Source

CHART-13031 雷达图、面积图的系列线型和条件属性线型不支持虚线

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
c17a088c67
  1. 4
      designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaConditionPane.java
  2. 6
      designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java
  3. 30
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  4. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePaneWithoutDashed.java
  5. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineWidthPane.java
  6. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineTypeConditionPaneWithoutDashed.java
  7. 4
      designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterLineTypePane.java

4
designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaConditionPane.java

@ -20,7 +20,7 @@ import com.fr.van.chart.designer.other.condition.item.VanChartAreaFillColorCondi
import com.fr.van.chart.designer.other.condition.item.VanChartDataSheetContentPane;
import com.fr.van.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLineTypeConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLineTypeConditionPaneWithoutDashed;
import com.fr.van.chart.designer.other.condition.item.VanChartMarkerConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPane;
@ -50,7 +50,7 @@ public class VanChartAreaConditionPane extends DataSeriesConditionPane {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this));
classPaneMap.put(AttrAreaSeriesFillColorBackground.class, new VanChartAreaFillColorConditionPane(this, plot));
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPane(this));
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPaneWithoutDashed(this));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot));
//是否使用数据表
if (plot.getDataSheet().isVisible()) {

6
designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java

@ -7,6 +7,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.van.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartLineTypePaneWithoutDashed;
import com.fr.van.chart.line.VanChartLineSeriesPane;
import javax.swing.JPanel;
@ -49,4 +51,8 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane {
protected VanChartBeautyPane createStylePane() {
return new VanChartBeautyPane();
}
protected VanChartLineTypePane getLineTypePane() {
return new VanChartLineTypePaneWithoutDashed();
}
}

30
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java

@ -34,7 +34,7 @@ public class VanChartLineTypePane extends BasicPane {
private LineTypeComboBox lineTypeComboBox;//线型
private UISpinner lineWidthSpinner;//线宽
protected UIButtonGroup<LineStyle> lineStyle;//形态
private UIButtonGroup<LineStyle> lineStyle;//形态
private UIButtonGroup nullValueBreak;//空值断开
private JPanel lineWidthPane;
@ -44,7 +44,7 @@ public class VanChartLineTypePane extends BasicPane {
JPanel typeAndWidthPane = createTypeAndWidthPane();
createLineStyle();
lineStyle = createLineStyle();
nullValueBreak = new UIButtonGroup(new String[]{
Toolkit.i18nText("Fine-Design_Chart_Open"),
@ -72,7 +72,7 @@ public class VanChartLineTypePane extends BasicPane {
private JPanel createTypeAndWidthPane() {
lineTypeComboBox = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
lineTypeComboBox = createLineType();
lineWidthSpinner = new UISpinner(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE);
@ -85,6 +85,7 @@ public class VanChartLineTypePane extends BasicPane {
});
Component[][] lineTypeComps = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), lineTypeComboBox}
};
Component[][] lineWidthComps = new Component[][]{
@ -94,10 +95,10 @@ public class VanChartLineTypePane extends BasicPane {
};
double p = TableLayout.PREFERRED, f = TableLayout.FILL, e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = {p}, col = {f, e};
double[] col = {f, e};
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineTypeComps, row, col);
lineWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineWidthComps, row, col);
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineTypeComps, new double[]{p, p}, col);
lineWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineWidthComps, new double[]{p}, col);
JPanel contentPane = new JPanel(new BorderLayout(0, 6));
@ -107,10 +108,17 @@ public class VanChartLineTypePane extends BasicPane {
return contentPane;
}
protected void createLineStyle() {
String[] textArray = new String[]{Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
Toolkit.i18nText("Fine-Design_Chart_StepLine"), Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
lineStyle = new UIButtonGroup<LineStyle>(textArray, LineStyle.values());
protected LineTypeComboBox createLineType() {
return new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
}
protected UIButtonGroup<LineStyle> createLineStyle() {
String[] textArray = new String[]{
Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
Toolkit.i18nText("Fine-Design_Chart_StepLine"),
Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
return new UIButtonGroup<>(textArray, LineStyle.values());
}
protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) {
@ -128,7 +136,7 @@ public class VanChartLineTypePane extends BasicPane {
private void checkLineStyle() {
if (lineStylePane != null && lineTypeComboBox != null) {
lineStylePane.setVisible(!ComparatorUtils.equals(lineTypeComboBox.getSelectedItem(),LineType.NONE));
lineStylePane.setVisible(!ComparatorUtils.equals(lineTypeComboBox.getSelectedItem(), LineType.NONE));
}
}

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePaneWithoutDashed.java

@ -0,0 +1,11 @@
package com.fr.van.chart.designer.component;
import com.fr.plugin.chart.type.LineType;
public class VanChartLineTypePaneWithoutDashed extends VanChartLineTypePane{
@Override
protected LineTypeComboBox createLineType() {
return new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID});
}
}

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineWidthPane.java

@ -5,7 +5,7 @@ import java.awt.Component;
/**
* 线型+线宽+空值断开
*/
public class VanChartLineWidthPane extends VanChartLineTypePane {
public class VanChartLineWidthPane extends VanChartLineTypePaneWithoutDashed {
private static final long serialVersionUID = 4537158946119294689L;
@Override

16
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineTypeConditionPaneWithoutDashed.java

@ -0,0 +1,16 @@
package com.fr.van.chart.designer.other.condition.item;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartLineTypePaneWithoutDashed;
public class VanChartLineTypeConditionPaneWithoutDashed extends VanChartLineTypeConditionPane {
public VanChartLineTypeConditionPaneWithoutDashed(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
}
protected VanChartLineTypePane createLinePane() {
return new VanChartLineTypePaneWithoutDashed();
}
}

4
designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterLineTypePane.java

@ -15,12 +15,12 @@ import java.awt.Component;
public class VanChartScatterLineTypePane extends VanChartLineTypePane {
@Override
protected void createLineStyle() {
protected UIButtonGroup<LineStyle> createLineStyle() {
String[] textArray = new String[]{
Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
lineStyle = new UIButtonGroup<>(textArray, new LineStyle[]{LineStyle.NORMAL, LineStyle.CURVE});
return new UIButtonGroup<>(textArray, new LineStyle[]{LineStyle.NORMAL, LineStyle.CURVE});
}
@Override

Loading…
Cancel
Save