From fc2d5d0b91aa2e4ceecc5a5fc8ef71961ef7ac34 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 23 Aug 2017 19:32:56 +0800 Subject: [PATCH] =?UTF-8?q?9.0=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/ChangeConfigPane.java | 6 ++--- .../chart/gui/data/ChartDataFilterPane.java | 12 +++++++++ .../report/AbstractReportDataContentPane.java | 12 +++++++-- .../BubblePlotReportDataContentPane.java | 1 + ...goryPlotMoreCateReportDataContentPane.java | 3 ++- .../CategoryPlotReportDataContentPane.java | 1 + .../MeterPlotReportDataContentPane.java | 9 ++----- .../table/BubblePlotTableDataContentPane.java | 16 ++++++------ .../table/MeterPlotTableDataContentPane.java | 25 +++++++++++-------- .../table/PiePlotTableDataContentPane.java | 7 +++--- .../data/table/SeriesTypeUseComboxPane.java | 1 + ...anChartBubblePlotTableDataContentPane.java | 19 ++++++-------- .../component/GanttReportDataContentPane.java | 3 ++- .../MultiPiePlotTableDataContentPane.java | 18 ++++++++----- 14 files changed, 80 insertions(+), 53 deletions(-) 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 1f1f5a9f94..e2986a3035 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 @@ -113,20 +113,20 @@ public class ChangeConfigPane extends BasicBeanPane { } }; styleAttrPane.setPreferredSize(new Dimension(WIDTH, (int) styleAttrPane.getPreferredSize().getHeight())); - return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character")+":", styleAttrPane); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character"), styleAttrPane); } private JPanel createButtonBackgroundColorPane(){ colorSelectBox4button = new ColorSelectBoxWithOutTransparent(WIDTH); - return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background") + ":", colorSelectBox4button); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background"), colorSelectBox4button); } private JPanel createButtonConfigPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p,p,p}; + double[] rowSize = {p,p}; Component[][] components = new Component[][]{ new Component[]{createTitleStylePane(),null}, new Component[]{createButtonBackgroundColorPane(),null}, diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index f4a2381e7c..0f09b016b0 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -59,6 +59,18 @@ public class ChartDataFilterPane extends ThirdTabPane { } } + protected void initLayout() { + this.setLayout(new BorderLayout()); + if (!paneList.isEmpty()) { + JPanel pane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0)); + if (nameArray.length > 1) { + pane.add(tabPane); + this.add(pane, BorderLayout.NORTH); + } + } + this.add(centerPane, BorderLayout.CENTER); + } + protected List initPaneList(Plot plot, AbstractAttrNoScrollPane parent) { plot4Pane = plot; 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 35aa92b37e..2612ae7425 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 @@ -44,8 +44,10 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane { this.add(cardPane, BorderLayout.CENTER); dataScreeningPane = new ChartDataFilterPane(this.initplot, parent); JPanel panel = new UIExpandablePane(Inter.getLocText("FR-Chart-Data_Filter"), 290, 24, dataScreeningPane); + dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); this.add(panel, BorderLayout.SOUTH); } 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 b4a28ed12e..756f31ca91 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 @@ -8,7 +8,6 @@ import com.fr.chart.chartdata.BubbleTableDefinition; import com.fr.design.gui.icombobox.UIComboBox; 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.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; @@ -50,7 +49,7 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {f}; - double[] rowSize = { p, p,p,p}; + double[] rowSize = {p, p}; double[] columnSize_north = {p, f}; double[] rowSize_north = {p, p, p, p}; @@ -62,21 +61,17 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), bubbleSize}, }; - JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north); - north.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15)); + JPanel north = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north,rowSize_north,columnSize_north); + north.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15)); JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane); dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); - Component[][] components = new Component[][]{ - new Component[]{north}, - new Component[]{filterPane} - }; - - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); - this.add(panel, BorderLayout.CENTER); - + this.add(getJSeparator(), BorderLayout.NORTH); + this.add(north, BorderLayout.CENTER); + this.add(filterPane, BorderLayout.SOUTH); + seriesName.addItemListener(tooltipListener); xCombox.addItemListener(tooltipListener); yCombox.addItemListener(tooltipListener); diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java index 24c85d96e3..68a4f1ae10 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java @@ -29,7 +29,8 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{ this.setLayout(new BorderLayout()); initAllComponent(); JPanel panel = getContentPane(); - panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + panel.setBorder(BorderFactory.createEmptyBorder(10,24,0,15)); + this.add(getJSeparator(), BorderLayout.NORTH); this.add(panel, BorderLayout.CENTER); this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight())); 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 a82873aaaa..9436ec6a6a 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 @@ -11,12 +11,12 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; 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.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -32,7 +32,7 @@ import java.util.List; */ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPane implements UIObserver { private static final int HT = 20; - private static final int WD = 120; + private static final int WD = 100; private UISpinner levelNumEdit; private UITextField nameField; protected UIComboBox value; @@ -103,7 +103,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa calculateCombox.reset(); calculateCombox.setPreferredSize(new Dimension(WD, HT)); - components_center[levelNum] = new Component[]{new JSeparator(), null}; + components_center[levelNum] = new Component[]{getJSeparator(), null}; components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value}; components_center[levelNum+2] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox}; @@ -112,7 +112,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa registerListener4Center(); - return TableLayoutHelper.createTableLayoutPane(components_center,rowSize_center,columnSize_center); + return TableLayout4VanChartHelper.createGapTableLayoutPane(components_center,rowSize_center,columnSize_center); } @@ -175,11 +175,11 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa Component[][] components_north = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField}, - new Component[]{new JSeparator(),null }, + new Component[]{getJSeparator(),null }, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit}, }; - return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); + return TableLayout4VanChartHelper.createGapTableLayoutPane(components_north, rowSize_north, columnSize_north); } private void refreshCenterPane(){ @@ -357,4 +357,10 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa } return false; } + + protected JSeparator getJSeparator() { + JSeparator jSeparator = new JSeparator(); + jSeparator.setPreferredSize(new Dimension(220, 2)); + return jSeparator; + } }