From 15d034ed3dc21e0479a4049a173b336c8e80340d Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 29 Aug 2017 14:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9format=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tFormatPane.java => FormatPaneWithNormalType.java} | 11 +++++++++-- .../component/format/FormatPaneWithOutFont.java | 1 + .../style/datasheet/VanChartDataSheetPane.java | 5 ++--- 3 files changed, 12 insertions(+), 5 deletions(-) rename designer_chart/src/com/fr/plugin/chart/designer/component/format/{DataSheetFormatPane.java => FormatPaneWithNormalType.java} (80%) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithNormalType.java similarity index 80% rename from designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithNormalType.java index 8cdf810db8..a5caec453d 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithNormalType.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.designer.component.format; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.style.FormatPane; import com.fr.design.layout.TableLayout; import com.fr.general.Inter; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; @@ -12,8 +11,16 @@ import java.awt.*; /** * Created by mengao on 2017/8/14. + * 没有字体设置 + * 类型下拉框中只有常规、数字、百分比、货币、科学计数选项,没有时间型、日期型、文本型选项。 */ -public class DataSheetFormatPane extends FormatPane { +public class FormatPaneWithNormalType extends FormatPaneWithOutFont { + + public FormatPaneWithNormalType() { + super(); + setForDataSheet(); + } + protected Component[][] getComponent(JPanel fontPane, JPanel centerPane, JPanel typePane) { return new Component[][]{ new Component[]{null, centerPane}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java index cd4ff91fe6..5403ae817f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java @@ -9,6 +9,7 @@ import java.awt.*; /** * Created by mengao on 2017/8/28. + * 只有文本格式设置,没有字体设置 */ public class FormatPaneWithOutFont extends FormatPane { private static final int HEIGHT = 30; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java index d4869e6362..0c94ed82e3 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java @@ -20,7 +20,7 @@ import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.border.VanChartBorderPane; -import com.fr.plugin.chart.designer.component.format.DataSheetFormatPane; +import com.fr.plugin.chart.designer.component.format.FormatPaneWithNormalType; import com.fr.plugin.chart.type.AxisType; import javax.swing.*; @@ -85,8 +85,7 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { private JPanel createDataSheetPane(){ textAttrPane = new ChartTextAttrPane(); - formatPane = new DataSheetFormatPane(); - formatPane.setForDataSheet(); + formatPane = new FormatPaneWithNormalType(); borderPane = new VanChartBorderPane(); double p = TableLayout.PREFERRED;