Browse Source

Pull request #2083: CHART-15054 调整数据面板标签宽度

Merge in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit 'ef45bd20843e5e3256c13784776cf28b1de6fae8':
  CHART-15054 调整数据面板标签宽度
feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
c0a98dd659
  1. 18
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
  2. 2
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java
  3. 2
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java
  4. 7
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldValuePane.java
  5. 2
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java

18
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java

@ -99,13 +99,13 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p, p}; double[] rowSize = {p, p, p, p};
UILabel Label1 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name")); UILabel label1 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
Label1.setPreferredSize(new Dimension(75, 20)); label1.setPreferredSize(getLabelDimension());
UILabel Label2 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Value")); UILabel label2 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Value"));
Label2.setPreferredSize(new Dimension(75, 20)); label2.setPreferredSize(getLabelDimension());
UILabel Label3 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method")); UILabel label3 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method"));
Label3.setPreferredSize(new Dimension(75, 20)); label3.setPreferredSize(getLabelDimension());
Component[][] components = getUseComponentWithOutSummary(Label1, Label2, Label3); Component[][] components = getUseComponentWithOutSummary(label1, label2, label3);
centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 6); centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 6);
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1));
@ -113,6 +113,10 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }
protected Dimension getLabelDimension() {
return new Dimension(75, 20);
}
protected Component[][] getUseComponent(UILabel Label1, UILabel Label2, UILabel Label3) { protected Component[][] getUseComponent(UILabel Label1, UILabel Label2, UILabel Label3) {
return new Component[][]{ return new Component[][]{
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})},

2
designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java

@ -58,7 +58,7 @@ public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane
pane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{dataType, null, null, label, null})); pane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{dataType, null, null, label, null}));
pane.setPreferredSize(new Dimension(246, 30)); pane.setPreferredSize(new Dimension(246, 30));
pane.setBorder(BorderFactory.createEmptyBorder(0, 24, 10, 15)); pane.setBorder(BorderFactory.createEmptyBorder(0, 18, 10, 15));
return pane; return pane;
} }

2
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java

@ -65,7 +65,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa
private JPanel createUIComboBoxPane(UIComboBox comboBox, String title) { private JPanel createUIComboBoxPane(UIComboBox comboBox, String title) {
UILabel label = new UILabel(title); UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(80, 20));
JPanel panel = new JPanel(); JPanel panel = new JPanel();

7
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldValuePane.java

@ -1,12 +1,19 @@
package com.fr.van.chart.box.data.table; package com.fr.van.chart.box.data.table;
import com.fr.chart.chartdata.OneValueCDDefinition; import com.fr.chart.chartdata.OneValueCDDefinition;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane; import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane;
import com.fr.plugin.chart.box.data.VanBoxOneValueCDDefinition; import com.fr.plugin.chart.box.data.VanBoxOneValueCDDefinition;
import java.awt.Dimension;
public class BoxPlotTableSeriesNameUseFieldValuePane extends SeriesNameUseFieldValuePane { public class BoxPlotTableSeriesNameUseFieldValuePane extends SeriesNameUseFieldValuePane {
protected OneValueCDDefinition createOneValueCDDefinition() { protected OneValueCDDefinition createOneValueCDDefinition() {
return new VanBoxOneValueCDDefinition(); return new VanBoxOneValueCDDefinition();
} }
protected Dimension getLabelDimension() {
return new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT);
}
} }

2
designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java

@ -29,7 +29,7 @@ public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserv
} }
}; };
editLabel.setPreferredSize(new Dimension(75, 20)); editLabel.setPreferredSize(new Dimension(80, 20));
comboBox = new UIComboBox(); comboBox = new UIComboBox();
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));

Loading…
Cancel
Save