From 65c3065e06e22fec2ac57450bff8f231a3841e44 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 11 Sep 2017 20:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B99.0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E3=80=81=E5=9B=9E=E5=BD=92bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/FormatPane.java | 18 +-- .../mainframe/chart/gui/ChangeConfigPane.java | 34 ++++-- .../report/AbstractReportDataContentPane.java | 3 +- .../table/AbstractTableDataContentPane.java | 4 +- .../chart/gui/style/ChartTextAttrPane.java | 19 ++-- .../gui/style/series/UIColorPickerPane.java | 6 +- .../bubble/VanChartBubbleSeriesPane.java | 16 ++- ...anChartBubblePlotTableDataContentPane.java | 4 +- .../column/VanChartColumnSeriesPane.java | 3 + ...nChartCustomStackAndAxisConditionPane.java | 2 + .../designer/AbstractVanChartScrollPane.java | 2 +- .../fr/plugin/chart/designer/PlotFactory.java | 1 + .../component/VanChartHtmlLabelPane.java | 2 + .../format/FormatPaneWithOutFont.java | 13 ++- .../marker/VanChartImageMarkerPane.java | 10 +- .../VanChartConditionAttrContentPane.java | 5 +- .../VanChartConditionListControlPane.java | 6 +- .../other/VanChartInteractivePane.java | 9 +- .../style/axis/VanChartBaseAxisPane.java | 2 +- .../datasheet/VanChartDataSheetPane.java | 8 +- .../StackedAndAxisNameObjectCreator.java | 50 +++++++++ .../VanChartAbstractPlotSeriesPane.java | 14 ++- .../style/series/VanChartEffectPane.java | 10 +- ...VanChartStackedAndAxisListControlPane.java | 103 ++++++++++++++++++ .../VanChartPlotRefreshTooltipPane.java | 7 +- .../VanAreaMapPlotReportDataContentPane.java | 10 +- .../VanPointMapPlotReportDataContentPane.java | 2 +- .../map/line/VanChartLineMapEffectPane.java | 14 ++- .../MultiPiePlotReportDataContentPane.java | 4 +- .../MultiPiePlotTableDataContentPane.java | 5 +- .../chart/pie/RadiusCardLayoutPane.java | 6 +- .../chart/radar/VanChartRadarSeriesPane.java | 1 - .../component/LegendLabelFormatPane.java | 5 +- .../scatter/VanChartScatterSeriesPane.java | 10 +- .../style/VanChartTreeMapSeriesPane.java | 13 +-- ...WordCloudIndependentVanChartInterface.java | 8 ++ .../WordCloudPlotReportDataContentPane.java | 2 +- .../WordCloudPlotTableDataContentPane.java | 7 +- 38 files changed, 332 insertions(+), 106 deletions(-) create mode 100644 designer_chart/src/com/fr/plugin/chart/designer/style/series/StackedAndAxisNameObjectCreator.java create mode 100644 designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java diff --git a/designer_base/src/com/fr/design/gui/style/FormatPane.java b/designer_base/src/com/fr/design/gui/style/FormatPane.java index d15e391cd8..49f0ebd159 100644 --- a/designer_base/src/com/fr/design/gui/style/FormatPane.java +++ b/designer_base/src/com/fr/design/gui/style/FormatPane.java @@ -9,7 +9,9 @@ import com.fr.data.core.FormatField.FormatContents; import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; -import com.fr.design.gui.icombobox.*; +import com.fr.design.gui.icombobox.TextFontComboBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -21,8 +23,6 @@ import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.text.Format; @@ -108,8 +108,7 @@ public class FormatPane extends AbstractBasicStylePane { UILabel font = new UILabel(Inter.getLocText("FR-Designer_FRFont"), SwingConstants.LEFT); JPanel fontPane = new JPanel(new BorderLayout()); fontPane.add(font, BorderLayout.NORTH); - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; + typeComboBox.setPreferredSize(new Dimension(155,20)); JPanel typePane = new JPanel(new BorderLayout()); typePane.add(typeComboBox, BorderLayout.CENTER); @@ -118,11 +117,16 @@ public class FormatPane extends AbstractBasicStylePane { frFontPane.setBorder(LEFT_BORDER); Component[][] components = getComponent(fontPane, centerPane, typePane); + this.add(createContentPane(components), BorderLayout.CENTER); + } + + protected JPanel createContentPane (Component[][] components) { + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; double[] rowSize = {p, p, p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM); - this.add(panel, BorderLayout.CENTER); + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java index fd2cb137a4..27d4b9735b 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java @@ -9,7 +9,6 @@ import com.fr.chart.base.AttrChangeType; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.TableLayout; @@ -28,6 +27,8 @@ import java.awt.event.ActionListener; */ public class ChangeConfigPane extends BasicBeanPane { private static final int WIDTH = 100; + private static final int EDIT_AREA_WIDTH = 180; + private static final int LABEL_WIDTH = 20; private static final int MIN_TIME = 0; private static final int MAX_TIME = Integer.MAX_VALUE; private static final int CONSTANT_TEN = 10; @@ -97,38 +98,47 @@ public class ChangeConfigPane extends BasicBeanPane { private JPanel createCarouseConfigPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {p, f, p}; double[] rowSize = {p, p, p}; timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0); colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH); switchStyleGroup = new UIButtonGroup(new String[]{Inter.getLocText("FR-Designer_Show"), Inter.getLocText("FR-Designer_Hide")}); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), switchStyleGroup}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval}, - new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), switchStyleGroup, null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval, new UILabel(Inter.getLocText("FR-Base-Time_Second"))}, + new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel, null} }; return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); } - private JPanel createTitleStylePane(){ - styleAttrPane = new ChartTextAttrPane(){ + private JPanel createTitleStylePane() { + UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT); + styleAttrPane = new ChartTextAttrPane() { + protected JPanel getContentPane(JPanel buttonPane) { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f, EDIT_AREA_WIDTH}; + double[] rowSize = {p, p}; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); + } + protected Component[][] getComponents(JPanel buttonPane) { return new Component[][]{ - new Component[]{fontNameComboBox, null}, - new Component[]{buttonPane, null} + new Component[]{text, fontNameComboBox}, + new Component[]{null, buttonPane} }; } }; - styleAttrPane.setPreferredSize(new Dimension(WIDTH, (int) styleAttrPane.getPreferredSize().getHeight())); - return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character"), styleAttrPane); + return styleAttrPane; } private JPanel createButtonBackgroundColorPane(){ colorSelectBox4button = new ColorSelectBoxWithOutTransparent(WIDTH); - return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background"), colorSelectBox4button); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background"), colorSelectBox4button, EDIT_AREA_WIDTH); } private JPanel createButtonConfigPane() { diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java index 9ee06b76cc..831c949e71 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java @@ -30,7 +30,8 @@ import java.util.List; */ public abstract class AbstractReportDataContentPane extends BasicBeanPane{ private static final double ROW = 6; - + protected static final double COMPONENT_WIDTH = 124; + protected UICorrelationPane seriesPane; protected abstract String[] columnNames(); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java index 6f74673f79..79426780aa 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java @@ -13,7 +13,9 @@ import java.util.List; public abstract class AbstractTableDataContentPane extends BasicBeanPane{ - private boolean isNeedSummaryCaculateMethod = true; + protected static final double COMPONENT_WIDTH = 124; + + private boolean isNeedSummaryCaculateMethod = true; public abstract void updateBean(ChartCollection ob); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index ff1dd111f7..44c3cf0d5a 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -134,9 +134,6 @@ public class ChartTextAttrPane extends BasicPane { bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - Component[] components1 = new Component[]{ fontColor, italic, bold }; @@ -144,16 +141,20 @@ public class ChartTextAttrPane extends BasicPane { buttonPane.add(fontSizeComboBox, BorderLayout.CENTER); buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); + this.setLayout(new BorderLayout()); + this.add(getContentPane(buttonPane), BorderLayout.CENTER); + + populate(FRFont.getInstance()); + } + + protected JPanel getContentPane (JPanel buttonPane) { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double[] columnSize = {f,e}; double[] rowSize = {p, p, p}; - - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); - this.setLayout(new BorderLayout()); - this.add(panel, BorderLayout.CENTER); - - populate(FRFont.getInstance()); + return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); } protected Component[][] getComponents(JPanel buttonPane) { diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index b9966fc66f..6be16e1129 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -261,7 +261,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { } else { int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP; return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, - extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT); + extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT + this.MARGIN_TOP); } } @@ -616,8 +616,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { @Override public void layoutContainer(Container parent) { upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height); - colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); - textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); + colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); + textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java index 2991b1c829..d66ea04c5b 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java @@ -12,7 +12,7 @@ import com.fr.plugin.chart.bubble.component.VanChartBubblePane; import com.fr.plugin.chart.custom.component.VanChartCustomAxisConditionPane; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; -import com.fr.plugin.chart.designer.style.series.VanChartCustomStackAndAxisEditPane; +import com.fr.plugin.chart.designer.style.series.VanChartStackedAndAxisListControlPane; import javax.swing.*; import java.awt.*; @@ -39,10 +39,13 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane { new Component[]{getColorPane()}, new Component[]{createBubblePane()}, new Component[]{createStackedAndAxisPane()}, - new Component[]{createLargeDataModelPane()} - + new Component[]{null} }; + if (!((VanChartBubblePlot)plot).isForceBubble()) { + components[3] = new Component[]{createLargeDataModelPane()}; + } + contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col); return contentPane; } @@ -56,18 +59,19 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane { @Override //堆积和坐标轴设置(自定义柱形图等用到) protected JPanel createStackedAndAxisPane() { - stackAndAxisEditPane = new VanChartCustomStackAndAxisEditPane(){ + stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane(){ @Override protected Class getStackAndAxisPaneClass() { return VanChartCustomAxisConditionPane.class; } @Override - protected String getPaneTitle(){ + public String getPaneTitle(){ return Inter.getLocText("Plugin-ChartF_Custom_Axis"); } }; - return stackAndAxisEditPane; + stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane); + return stackAndAxisEditExpandablePane; } private JPanel createBubblePane() { diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java index 19a2cbc807..aa1a771d2f 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java @@ -48,10 +48,8 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {f}; - double[] rowSize = {p, p}; - double[] columnSize_north = {p, f}; + double[] columnSize_north = {f, COMPONENT_WIDTH}; double[] rowSize_north = {p, p, p, p}; Component[][] components_north = new Component[][]{ diff --git a/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java index ed83345825..b62c2169fb 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java @@ -69,10 +69,13 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createSeriesStylePane(double[] row, double[] col) { isFixedWidth = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); columnWidth = new UISpinner(0,1000,1,0); + columnWidth.setPreferredSize(new Dimension((int)this.getPreferredSize().getWidth(), 50)); + columnWidth.setBorder(BorderFactory.createEmptyBorder(10, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); seriesGap = new UINumberDragPane(-100, 100); categoryGap = new UINumberDragPane(0, 100); isFillWithImage = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); imagePane = new ImageBackgroundQuickPane(false); + imagePane.setBorder(BorderFactory.createEmptyBorder(0,(int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); JPanel panel1 = new JPanel(new BorderLayout()); panel1.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Fixed_Column_Width"),isFixedWidth), BorderLayout.NORTH); diff --git a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java index dfb8664e88..4978544371 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java @@ -39,6 +39,7 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane extends BasicScrollPane { } else { leftcontentPane.setBounds(0, 0, width, height); - leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original)); + leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 5, original)); } } public void reloaPane(JPanel pane){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/PlotFactory.java b/designer_chart/src/com/fr/plugin/chart/designer/PlotFactory.java index b5a3828e06..0601b5e45b 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/PlotFactory.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/PlotFactory.java @@ -327,6 +327,7 @@ public class PlotFactory { public static FormatPane createAutoFormatPane(){ FormatPane formatPane = new FormatPane(){ protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) { + typePane.setBorder(BorderFactory.createEmptyBorder()); return new Component[][]{ new Component[]{typePane,null}, new Component[]{centerPane, null}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java index 107ec5b667..435bfe62ce 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java @@ -15,6 +15,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartHtmlLabel; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.style.VanChartStylePane; import javax.swing.*; @@ -65,6 +66,7 @@ public class VanChartHtmlLabelPane extends JPanel{ }; JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + contentPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); this.setLayout(new BorderLayout()); this.add(contentPane, BorderLayout.CENTER); 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 5403ae817f..228c22ae8f 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 @@ -2,7 +2,9 @@ package com.fr.plugin.chart.designer.component.format; 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; import javax.swing.*; import java.awt.*; @@ -14,12 +16,21 @@ import java.awt.*; public class FormatPaneWithOutFont extends FormatPane { private static final int HEIGHT = 30; + protected JPanel createContentPane(Component[][] components) { + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] rowSize = {p, p, p}; + double[] columnSize = {f, e}; + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + } protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) { + typePane.setBorder(BorderFactory.createEmptyBorder()); return new Component[][]{ new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane}, - new Component[]{centerPane, null}, + new Component[]{null, centerPane}, }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java index 6786cda846..17014963db 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java @@ -24,9 +24,13 @@ public class VanChartImageMarkerPane extends BasicBeanPane { private UISpinner width; private UISpinner height; + protected ImageBackgroundQuickPane getImageBackgroundPane() { + return imageBackgroundPane; + } + public VanChartImageMarkerPane() { imageBackgroundPane = new ImageBackgroundQuickPane(false); - imageBackgroundPane.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int)imageBackgroundPane.getPreferredSize().getHeight())); + setImageBackgroundPaneBorder(); width = new UISpinner(0, 100, 0.5, 30); height = new UISpinner(0, 100, 0.5, 30); @@ -48,6 +52,10 @@ public class VanChartImageMarkerPane extends BasicBeanPane { this.add(panel); } + protected void setImageBackgroundPaneBorder() { + imageBackgroundPane.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int)imageBackgroundPane.getPreferredSize().getHeight())); + } + protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) { JPanel panel = new JPanel(new BorderLayout(0, 4)); panel.add(imageBackgroundPane, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java index 117f3fa00f..29161a75d9 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java @@ -4,7 +4,6 @@ import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; import com.fr.design.condition.ConditionAttributesPane; -import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.general.NameObject; import com.fr.stable.Nameable; @@ -17,7 +16,7 @@ import java.awt.*; public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{ private static final Dimension DIALOG_SIZE = new Dimension(500, 600); - private UIListControlPane conditionPane; + private VanChartConditionListControlPane conditionPane; public VanChartConditionAttrContentPane() { } @@ -43,7 +42,7 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte nameables[i]=(new NameObject(collection.getConditionAttr(i).getName(),collection.getConditionAttr(i))); } - conditionPane.populate(nameables); + conditionPane.populate(nameables, showPane); conditionPane.doLayout(); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java index 4c3a7a7f5e..b2945c4111 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java @@ -6,6 +6,7 @@ import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.general.Inter; @@ -26,9 +27,10 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane super(plot); } - @Override - public void populate(Nameable[] nameableArray) { + public void populate(Nameable[] nameableArray, Class showPane) { initComponentPane(); + NameObjectCreator[] creators = new NameObjectCreator[]{new NameObjectCreator(Inter.getLocText("Condition_Attributes"), ConditionAttr.class, showPane)}; + refreshNameableCreator(creators); super.populate(nameableArray); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java index b800c206e5..5fb6d29c0f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java @@ -131,8 +131,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { double[] columnSize = {f, e}; changeEnablePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize); changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,12,0,0)); - zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); - zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + zoomTypePane = getzoomTypePane(zoomType); JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot); zoomWidget.addActionListener(new ActionListener() { @Override @@ -143,6 +142,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel); } + protected JPanel getzoomTypePane(UIButtonGroup zoomType) { + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); + panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + return panel; + } + protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) { JPanel panel = new JPanel(new BorderLayout(0, 4)); if (plot.isSupportZoomCategoryAxis()) {//支持缩放控件 diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java index b76dd98e87..dedeafd87c 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java @@ -176,7 +176,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { }; JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AxisLabel"),showLabel); - labelPanel = TableLayoutHelper.createTableLayoutPane(components, row, col); + labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0)); showLabel.addActionListener(new ActionListener() { @Override 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 0c94ed82e3..526955f2e0 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 @@ -4,7 +4,6 @@ import com.fr.base.FRContext; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.DataSheet; -import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.style.FormatPane; import com.fr.design.layout.TableLayout; @@ -89,8 +88,9 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { borderPane = new VanChartBorderPane(); double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {LayoutConstants.CHART_ATTR_TOMARGIN, f}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + double[] columnSize = {d, e}; double[] rowSize = {p,p,p}; Component[][] components = new Component[][]{ new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Base_Format"),formatPane),null}, @@ -98,7 +98,7 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null}, }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/StackedAndAxisNameObjectCreator.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/StackedAndAxisNameObjectCreator.java new file mode 100644 index 0000000000..2f3bdfc2c6 --- /dev/null +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/series/StackedAndAxisNameObjectCreator.java @@ -0,0 +1,50 @@ +package com.fr.plugin.chart.designer.style.series; + +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.UnrepeatedNameHelper; +import com.fr.general.FRLogger; +import com.fr.general.NameObject; +import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; +import com.fr.plugin.chart.designer.style.background.ChartNameObjectCreator; +import com.fr.stable.Nameable; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +/** + * Created by mengao on 2017/9/11. + */ +public class StackedAndAxisNameObjectCreator extends ChartNameObjectCreator { + + public StackedAndAxisNameObjectCreator(Object object, String menuName, Class clazz, Class updatePane) { + super(object, menuName, clazz, updatePane); + } + + /** + * create Nameable + * + * @param helper + * @return + */ + public Nameable createNameable(UnrepeatedNameHelper helper) { + Constructor constructor = null; + try { + constructor = clazzOfInitCase.getConstructor(); + ConditionAttr conditionAttr = constructor.newInstance(); + conditionAttr.addDataSeriesCondition((AttrSeriesStackAndAxis) object); + return new NameObject(helper.createUnrepeatedName(this.menuName()), conditionAttr); + + } catch (NoSuchMethodException e) { + FRLogger.getLogger().error(e.getMessage(), e); + } catch (IllegalAccessException e) { + FRLogger.getLogger().error(e.getMessage(), e); + } catch (InstantiationException e) { + FRLogger.getLogger().error(e.getMessage(), e); + } catch (InvocationTargetException e) { + FRLogger.getLogger().error(e.getMessage(), e); + } + return null; + } + +} diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java index 60b14c0c8b..c5f5b19cf8 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java @@ -64,7 +64,8 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP private UINumberDragPane transparent;//不透明度 - protected VanChartCustomStackAndAxisEditPane stackAndAxisEditPane;//堆積和坐標軸 + protected VanChartStackedAndAxisListControlPane stackAndAxisEditPane;//堆積和坐標軸 + protected JPanel stackAndAxisEditExpandablePane;//堆積和坐標軸展开面板 private RadiusCardLayoutPane radiusPane;//半径设置界面 @@ -251,13 +252,14 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP //堆积和坐标轴设置(自定义柱形图等用到) protected JPanel createStackedAndAxisPane() { - stackAndAxisEditPane = new VanChartCustomStackAndAxisEditPane(); - return stackAndAxisEditPane; + stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane(); + stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane); + return stackAndAxisEditExpandablePane; } //界面上删除堆积和坐标轴设置 protected void removeStackWholePane() { - contentPane.remove(stackAndAxisEditPane); + contentPane.remove(stackAndAxisEditExpandablePane); contentPane.repaint(); } @@ -284,7 +286,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP if(stackAndAxisEditPane != null && plot instanceof VanChartRectanglePlot){//堆积和坐标轴 VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot; if(rectanglePlot.isCustomChart()){ - stackAndAxisEditPane.populateBean(rectanglePlot); + stackAndAxisEditPane.populate(rectanglePlot); } else { removeStackWholePane(); } @@ -339,7 +341,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP if(stackAndAxisEditPane != null && plot instanceof VanChartRectanglePlot){//堆积和坐标轴 VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot; if(rectanglePlot.isCustomChart()){ - stackAndAxisEditPane.updateBean(rectanglePlot); + stackAndAxisEditPane.update(rectanglePlot); } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartEffectPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartEffectPane.java index f849d13ac8..22cb34fe1a 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartEffectPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartEffectPane.java @@ -42,11 +42,15 @@ public class VanChartEffectPane extends BasicBeanPane { this.setLayout(new BorderLayout(0, 5)); if(hasEnabledChoose) { this.add(panel, BorderLayout.NORTH); - content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15)); + setContentPaneBorder(); } this.add(content, BorderLayout.CENTER); } + protected void setContentPaneBorder() { + content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15)); + } + protected JPanel createContentPane() { JPanel panel = createPeriodPane(); return panel; @@ -55,7 +59,9 @@ public class VanChartEffectPane extends BasicBeanPane { protected JPanel createPeriodPane(){ JPanel periodPane = new JPanel(); periodPane.setLayout(new BorderLayout(5, 0)); - periodPane.add(new UILabel(Inter.getLocText("Plugin-ChartF_Flash_Period")), BorderLayout.WEST); + UILabel label1= new UILabel(Inter.getLocText("Plugin-ChartF_Flash_Period")); + label1.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20)); + periodPane.add(label1, BorderLayout.WEST); periodPane.add(period, BorderLayout.CENTER); periodPane.add(new UILabel(Inter.getLocText("FR-Base-Time_Second")), BorderLayout.EAST); return periodPane; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java new file mode 100644 index 0000000000..88d9533821 --- /dev/null +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java @@ -0,0 +1,103 @@ +package com.fr.plugin.chart.designer.style.series; + +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.chart.chartglyph.ConditionCollection; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.controlpane.ShortCut4JControlPane; +import com.fr.general.Inter; +import com.fr.general.NameObject; +import com.fr.plugin.chart.attr.DefaultAxisHelper; +import com.fr.plugin.chart.attr.axis.VanChartAxis; +import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; +import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; +import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane; +import com.fr.plugin.chart.designer.component.VanChartUIListControlPane; +import com.fr.stable.Nameable; + +import java.util.ArrayList; + +/** + * Created by mengao on 2017/9/11. + */ +public class VanChartStackedAndAxisListControlPane extends VanChartUIListControlPane { + + + @Override + public NameableCreator[] createNameableCreators() { + return new StackedAndAxisNameObjectCreator[]{new StackedAndAxisNameObjectCreator(new AttrSeriesStackAndAxis(), getPaneTitle(), ConditionAttr.class, getStackAndAxisPaneClass())}; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Plugin-ChartF_StackAndSeries"); + } + + protected String getAddItemText() { + return Inter.getLocText("Plugin-ChartF_Add"); + } + + protected ShortCut4JControlPane[] createShortcuts() { + return new ShortCut4JControlPane[]{ + moveUpItemShortCut(), + moveDownItemShortCut(), + removeItemShortCut() + }; + } + + public void populate(VanChartRectanglePlot plot) { + this.plot = plot; + java.util.List xAxisList = plot.getXAxisList(); + java.util.List yAxisList = plot.getYAxisList(); + String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList); + String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList); + + java.util.List menuList = new ArrayList(); + AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); + seriesStackAndAxis.setXAxisNamesArray(axisXNames); + seriesStackAndAxis.setYAxisNameArray(axisYNames); + menuList.add(new StackedAndAxisNameObjectCreator(seriesStackAndAxis, getPaneTitle(), ConditionAttr.class, getStackAndAxisPaneClass())); + + refreshNameableCreator(menuList.toArray(new StackedAndAxisNameObjectCreator[menuList.size()])); + + java.util.List nameObjects = new ArrayList(); + + ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition(); + + for (int i = 0, len = stackAndAxisCondition.getConditionAttrSize(); i < len; i++) { + ConditionAttr conditionAttr = stackAndAxisCondition.getConditionAttr(i); + AttrSeriesStackAndAxis stackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class); + stackAndAxis.setXAxisNamesArray(axisXNames); + stackAndAxis.setYAxisNameArray(axisYNames); + nameObjects.add(new NameObject(conditionAttr.getName(), conditionAttr)); + } + + populate(nameObjects.toArray(new NameObject[nameObjects.size()])); + doLayout(); + } + + @Override + protected void update(Plot plot) { + VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; + ConditionCollection stackAndAxisCondition = rectanglePlot.getStackAndAxisCondition(); + stackAndAxisCondition.clearConditionAttr(); + + Nameable[] nameables = this.update(); + for (Nameable nameable : nameables) { + ConditionAttr conditionAttr = (ConditionAttr) ((NameObject) nameable).getObject(); + conditionAttr.setName(nameable.getName()); + AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class); + seriesStackAndAxis.setStackID(nameable.getName()); + stackAndAxisCondition.addConditionAttr(conditionAttr); + } + } + + protected Class getStackAndAxisPaneClass() { + return VanChartCustomStackAndAxisConditionPane.class; + } + + public String getPaneTitle() { + return Inter.getLocText("Plugin-ChartF_StackAndSeries"); + } +} diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java index 17ad7b534f..bf3845ea78 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java @@ -76,15 +76,16 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; double[] rowSize = {p}; Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Duration_Time")), duration}, }; - JPanel temp = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Duration_Time"), temp); + JPanel temp = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Time"), temp); } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java index ba183ef56e..83d5d49db4 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java @@ -23,9 +23,9 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte public VanAreaMapPlotReportDataContentPane(ChartDataPane parent) { initEveryPane(); initAreaName(); - - this.add(getContent(), "0,0,2,0"); - this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + JPanel panel = getContent(); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + this.add(panel, "0,0,2,0"); } protected void initAreaName() { @@ -45,11 +45,11 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte }; } - protected Component getContent() { + protected JPanel getContent() { return getFormulaPane(); } - protected Component getFormulaPane() { + protected JPanel getFormulaPane() { return areaName; } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java index 0f4f2b71f1..131be8f871 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java @@ -28,7 +28,7 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa } @Override - protected Component getContent() { + protected JPanel getContent() { longLatReportFormulaPane = new LongLatReportFormulaPane(); JPanel content = new JPanel(new BorderLayout(0, 4)); content.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 0)); diff --git a/designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java b/designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java index 2c23c50881..1e5f2f0415 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java @@ -45,19 +45,29 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{ panel.add(periodPane, BorderLayout.CENTER); panel.add(animationTypePane, BorderLayout.SOUTH); + panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); return panel; } + protected void setContentPaneBorder() { + return; + } private Component createAnimationSelectPane() { JPanel panel = new JPanel(new BorderLayout(5, 0)); - panel.add(new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type")), BorderLayout.WEST); + UILabel label1= new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type")); + label1.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20)); + panel.add(label1, BorderLayout.WEST); panel.add(animationType, BorderLayout.CENTER); return panel; } private void initTypeContentPane() { - customContentPane = new VanChartImageMarkerPane(); + customContentPane = new VanChartImageMarkerPane(){ + protected void setImageBackgroundPaneBorder() { + getImageBackgroundPane().setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH, (int)getImageBackgroundPane().getPreferredSize().getHeight())); + } + }; CardLayout cardLayout = new CardLayout(); typeContentPane = new JPanel(cardLayout){ diff --git a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java index 6933d39d5a..09e89cee0f 100644 --- a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java @@ -61,7 +61,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent private JPanel createNorthPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize_north = {p, f}; + double[] columnSize_north = {f, COMPONENT_WIDTH}; double[] rowSize_north = {p, p, p}; levelNumEdit = new UISpinner(1, 15, 1, levelNum){ @@ -115,7 +115,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent private JPanel createCenterPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize_center = {p, f}; + double[] columnSize_center = {f, COMPONENT_WIDTH}; double[] rowSize_center = new double[levelNum + 2]; initLevelNameList(); diff --git a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java index 9436ec6a6a..becec4822c 100644 --- a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java @@ -33,6 +33,7 @@ import java.util.List; public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPane implements UIObserver { private static final int HT = 20; private static final int WD = 100; + private UISpinner levelNumEdit; private UITextField nameField; protected UIComboBox value; @@ -83,7 +84,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa private JPanel createCenterPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize_center = {p, f}; + double[] columnSize_center = {f, COMPONENT_WIDTH}; double[] rowSize_center = new double[levelNum + 3]; initLevelNameList(); @@ -147,7 +148,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa private JPanel createNorthPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize_north = {p, f}; + double[] columnSize_north = {f, COMPONENT_WIDTH}; double[] rowSize_north = {p, p, p}; levelNumEdit = new UISpinner(1, 15, 1, levelNum){ diff --git a/designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java b/designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java index b63ebeab60..f890e372ef 100644 --- a/designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java +++ b/designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java @@ -2,7 +2,7 @@ package com.fr.plugin.chart.pie; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -24,7 +24,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane { private static final double MIN_RADIUS = 0; private static final double MAX_RADIUS = Double.MAX_VALUE; - private UIComboBox radiusType;//半径类型 + private UIButtonGroup radiusType;//半径类型 private JPanel radiusContent;//半径的布局界面 private UISpinner radius;//半径值 @@ -37,7 +37,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane { Map paneList = new HashMap(); - radiusType = new UIComboBox(new String[]{Inter.getLocText("Plugin-ChartF_Auto"), Inter.getLocText("Plugin-ChartF_Fixed_Radius")}); + radiusType = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Auto"), Inter.getLocText("Plugin-ChartF_Fixed")}); radius = new UISpinner(MIN_RADIUS, MAX_RADIUS, 1, 100); radiusContent = new JPanel(new BorderLayout()); diff --git a/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java index ec08b139ad..9481d62cbe 100644 --- a/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java @@ -44,7 +44,6 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane { new Component[]{getColorPane()}, new Component[]{createRadarTypePane()}, new Component[]{createBorderPane()}, - new Component[]{createAlphaPane()} }; } diff --git a/designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java b/designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java index a9ea6a10ca..a3e10efb2d 100644 --- a/designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java +++ b/designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java @@ -50,8 +50,9 @@ public class LegendLabelFormatPane extends JPanel{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p,f}; - double[] rowSize = {p,p,p}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; + double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ new Component[]{null,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Label_Format"), SwingConstants.LEFT), labelFormatStyle}, diff --git a/designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java index 980b3ed226..faa995dcd2 100644 --- a/designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java @@ -7,9 +7,10 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.general.Inter; import com.fr.plugin.chart.custom.component.VanChartCustomAxisConditionPane; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.VanChartLineTypePane; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; -import com.fr.plugin.chart.designer.style.series.VanChartCustomStackAndAxisEditPane; +import com.fr.plugin.chart.designer.style.series.VanChartStackedAndAxisListControlPane; import com.fr.plugin.chart.scatter.component.VanChartScatterLineTypePane; import javax.swing.*; @@ -54,18 +55,19 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane{ @Override //堆积和坐标轴设置(自定义柱形图等用到) protected JPanel createStackedAndAxisPane() { - stackAndAxisEditPane = new VanChartCustomStackAndAxisEditPane(){ + stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane(){ @Override protected Class getStackAndAxisPaneClass() { return VanChartCustomAxisConditionPane.class; } @Override - protected String getPaneTitle(){ + public String getPaneTitle(){ return Inter.getLocText("Plugin-ChartF_Custom_Axis"); } }; - return stackAndAxisEditPane; + stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane); + return stackAndAxisEditExpandablePane; } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/treemap/style/VanChartTreeMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/treemap/style/VanChartTreeMapSeriesPane.java index 7f5597d32b..93530fe466 100644 --- a/designer_chart/src/com/fr/plugin/chart/treemap/style/VanChartTreeMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/treemap/style/VanChartTreeMapSeriesPane.java @@ -2,9 +2,6 @@ package com.fr.plugin.chart.treemap.style; import com.fr.chart.chartattr.Plot; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.general.Inter; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; @@ -12,7 +9,6 @@ import com.fr.plugin.chart.multilayer.style.VanChartMultiPieSeriesPane; import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; import javax.swing.*; -import java.awt.*; /** * Created by Fangjie on 2016/6/15. @@ -26,14 +22,7 @@ public class VanChartTreeMapSeriesPane extends VanChartMultiPieSeriesPane { protected JPanel createSeriesStylePane(double[] row, double[] col) { supportDrill = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); - - Component[][] components = new Component[][]{ - new Component[]{null,null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Drill")),supportDrill}, - - }; - double p = TableLayout.PREFERRED; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, new double[]{p,p}, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Drill"), supportDrill); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); } diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java index 2b5ad405a2..5f7566081f 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java @@ -6,6 +6,7 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; @@ -14,6 +15,7 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartConstants; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.plugin.chart.designer.other.VanChartOtherPane; import com.fr.plugin.chart.designer.style.VanChartStylePane; @@ -24,6 +26,7 @@ import com.fr.plugin.chart.wordcloud.designer.other.VanChartWordCloudConditionPa import com.fr.plugin.chart.wordcloud.designer.style.VanChartWordCloudSeriesPane; import com.fr.plugin.chart.wordcloud.designer.type.VanChartWordCloudTypePane; +import javax.swing.*; import java.util.List; /** @@ -84,6 +87,11 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa @Override protected BasicBeanPane createInteractivePane() { return new VanChartInteractivePaneWithOutSort(){ + @Override + protected JPanel getzoomTypePane(UIButtonGroup zoomType) { + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); + return panel; + } @Override protected String[] getNameArray() { diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java index c171e12b4d..cb570262b9 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java @@ -26,7 +26,7 @@ public class WordCloudPlotReportDataContentPane extends AbstractReportDataConten public WordCloudPlotReportDataContentPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = { p, f }; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = { p, p, p}; name = new UITextField(); diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java index 0ff9535662..f30f52cbd2 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java @@ -7,10 +7,10 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.wordcloud.data.WordCloudTableDefinition; import javax.swing.*; @@ -21,6 +21,7 @@ import java.util.List; * Created by Mitisky on 16/11/29. */ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentPane { + private UITextField name; private UIComboBox wordName; private UIComboBox wordValue; @@ -29,7 +30,7 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP public WordCloudPlotTableDataContentPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = { p, f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = { p, p, p, p}; name = new UITextField(); @@ -45,7 +46,7 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox} }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); this.setLayout(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));