Browse Source

CHART-19475 条件属性的标签固定宽度

feature/10.0
白岳 3 years ago
parent
commit
9fba224bf5
  1. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java
  2. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java

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

@ -22,6 +22,6 @@ public class VanChartHtmlLabelPaneWithBackGroundLabel extends VanChartHtmlLabelP
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Background")), panel}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Background")), panel},
}; };
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{d, f}); return TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p}, new double[]{d, f});
} }
} }

13
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java

@ -3,11 +3,14 @@ package com.fr.van.chart.designer.other.condition.item;
import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.base.AttrLabel;
import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Component;
public class VanChartLabelConditionPane extends AbstractNormalMultiLineConditionPane { public class VanChartLabelConditionPane extends AbstractNormalMultiLineConditionPane {
@ -22,7 +25,15 @@ public class VanChartLabelConditionPane extends AbstractNormalMultiLineCondition
@Override @Override
protected JPanel initContentPane() { protected JPanel initContentPane() {
dataLabelContentsPane = createLabelPane(); dataLabelContentsPane = createLabelPane();
return dataLabelContentsPane; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = 220;
Component[][] components = new Component[][]{
new Component[]{null, dataLabelContentsPane}
};
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{f, e});
} }
protected VanChartPlotLabelPane createLabelPane() { protected VanChartPlotLabelPane createLabelPane() {

Loading…
Cancel
Save