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 01/47] =?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 d15e391cd..49f0ebd15 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 fd2cb137a..27d4b9735 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 9ee06b76c..831c949e7 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 6f74673f7..79426780a 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 ff1dd111f..44c3cf0d5 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 b9966fc66..6be16e112 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 2991b1c82..d66ea04c5 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 19a2cbc80..aa1a771d2 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 ed8334582..b62c2169f 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 dfb8664e8..497854437 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 b5a3828e0..0601b5e45 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 107ec5b66..435bfe62c 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 5403ae817..228c22ae8 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 6786cda84..17014963d 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 117f3fa00..29161a75d 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 4c3a7a7f5..b2945c411 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 b800c206e..5fb6d29c0 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 b76dd98e8..dedeafd87 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 0c94ed82e..526955f2e 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 000000000..2f3bdfc2c --- /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 60b14c0c8..c5f5b19cf 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 f849d13ac..22cb34fe1 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 000000000..88d953382 --- /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 17ad7b534..bf3845ea7 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 ba183ef56..83d5d49db 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 0f4f2b71f..131be8f87 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 2c23c5088..1e5f2f041 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 6933d39d5..09e89cee0 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 9436ec6a6..becec4822 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 b63ebeab6..f890e372e 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 ec08b139a..9481d62cb 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 a9ea6a10c..a3e10efb2 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 980b3ed22..faa995dcd 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 7f5597d32..93530fe46 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 2b5ad405a..5f7566081 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 c171e12b4..cb570262b 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 0ff953566..f30f52cbd 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)); From 73ceb56de07e94597396a3eff4e7aceb6a7966e1 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 12 Sep 2017 08:51:26 +0800 Subject: [PATCH 02/47] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E5=A0=86=E7=A7=AF=E5=92=8C=E5=9D=90=E6=A0=87=E8=BD=B4=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartCustomStackAndAxisEditPane.java | 111 ------------------ ...VanChartStackedAndAxisListControlPane.java | 1 + 2 files changed, 1 insertion(+), 111 deletions(-) delete mode 100644 designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartCustomStackAndAxisEditPane.java diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartCustomStackAndAxisEditPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartCustomStackAndAxisEditPane.java deleted file mode 100644 index 6b49a00f9..000000000 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartCustomStackAndAxisEditPane.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.fr.plugin.chart.designer.style.series; - -import com.fr.chart.chartglyph.ConditionAttr; -import com.fr.chart.chartglyph.ConditionCollection; -import com.fr.design.beans.BasicBeanPane; -import com.fr.design.gui.frpane.UICorrelationComboBoxPane; -import com.fr.design.gui.imenutable.UIMenuNameableCreator; -import com.fr.general.Inter; -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.TableLayout4VanChartHelper; -import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator; - -import javax.swing.*; -import java.awt.*; -import java.util.ArrayList; - -/** - * Created by Fangjie on 2016/4/28. - */ -public class VanChartCustomStackAndAxisEditPane extends BasicBeanPane { - //堆积和坐标轴 - protected UICorrelationComboBoxPane stackAndAxisPane; - protected JPanel stackAndAxisWholePane; - - public VanChartCustomStackAndAxisEditPane() { - - initStackedAndAxisPane(); - - initContentPane(); - } - - private void initContentPane() { - this.setLayout(new BorderLayout(0, 5)); - this.add(stackAndAxisWholePane, BorderLayout.CENTER); - } - - //堆积和坐标轴设置(自定义柱形图等用到) - protected JPanel initStackedAndAxisPane() { - stackAndAxisPane = new UICorrelationComboBoxPane(); - stackAndAxisWholePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(getPaneTitle(), stackAndAxisPane); - return stackAndAxisWholePane; - } - @Override - public void populateBean(VanChartRectanglePlot 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(); - ConditionAttr demo = new ConditionAttr(); - AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); - seriesStackAndAxis.setXAxisNamesArray(axisXNames); - seriesStackAndAxis.setYAxisNameArray(axisYNames); - demo.addDataSeriesCondition(seriesStackAndAxis); - menuList.add(new VanChartUIMenuNameableCreator(getPaneTitle(), demo, getStackAndAxisPaneClass())); - stackAndAxisPane.refreshMenuAndAddMenuAction(menuList); - - java.util.List list = 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); - list.add(new VanChartUIMenuNameableCreator(conditionAttr.getName(), conditionAttr, getStackAndAxisPaneClass())); - } - - stackAndAxisPane.populateBean(list); - stackAndAxisPane.doLayout(); - } - - @Override - public VanChartRectanglePlot updateBean() { - return null; - } - - @Override - public void updateBean(VanChartRectanglePlot plot){ - ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition(); - stackAndAxisCondition.clearConditionAttr(); - - java.util.List list = stackAndAxisPane.updateBean(); - for(UIMenuNameableCreator creator : list){ - ConditionAttr conditionAttr = (ConditionAttr)creator.getObj(); - conditionAttr.setName(creator.getName()); - AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); - seriesStackAndAxis.setStackID(creator.getName()); - stackAndAxisCondition.addConditionAttr(conditionAttr); - } - } - - @Override - protected String title4PopupWindow() { - return null; - } - - protected Class getStackAndAxisPaneClass() { - return VanChartCustomStackAndAxisConditionPane.class; - } - - protected String getPaneTitle(){ - return Inter.getLocText("Plugin-ChartF_StackAndSeries"); - } -} 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 index 88d953382..aa7a9b2b5 100644 --- 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; /** * Created by mengao on 2017/9/11. + * 堆积和坐标轴面板 */ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControlPane { From 4c06ba3782f0a7ea7ff61edc96317de7e0bc10b4 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 12 Sep 2017 09:03:52 +0800 Subject: [PATCH 03/47] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/style/series/UIColorPickerPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 6be16e112..75de4a9b4 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 @@ -259,9 +259,9 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { if (designTypeButtonGroup.getSelectedIndex() == 0) { return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + MARGIN_TOP); } else { - int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP; + int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + MARGIN_TOP; return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, - extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT + this.MARGIN_TOP); + extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT + MARGIN_TOP); } } From 27d89a607af4f086e88cf0f3aac291a8b9fe3fac Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 12 Sep 2017 10:05:15 +0800 Subject: [PATCH 04/47] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nChartCustomStackAndAxisConditionPane.java | 50 ++++++++----------- .../marker/VanChartImageMarkerPane.java | 24 ++++----- .../map/line/VanChartLineMapEffectPane.java | 27 +++++----- 3 files changed, 46 insertions(+), 55 deletions(-) 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 497854437..708d4f4a3 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java @@ -33,11 +33,11 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); isPercentStacked = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); double p = TableLayout.PREFERRED; - double[] columnSize = {p,p}; - double[] rowSize = {p,p,p,p}; + double[] columnSize = {p, p}; + double[] rowSize = {p, p, p, p}; return TableLayoutHelper.createTableLayoutPane(getDeployComponents(), rowSize, columnSize); } protected Component[][] getDeployComponents() { Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("ChartF-X_Axis")),XAxis}, - new Component[]{new UILabel(Inter.getLocText("ChartF-Y_Axis")),YAxis}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart-Type_Stacked")),isStacked}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_PercentStacked")),isPercentStacked}, + new Component[]{new UILabel(Inter.getLocText("ChartF-X_Axis")), XAxis}, + new Component[]{new UILabel(Inter.getLocText("ChartF-Y_Axis")), YAxis}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Type_Stacked")), isStacked}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_PercentStacked")), isPercentStacked}, }; isStacked.addActionListener(new ActionListener() { @@ -94,8 +93,8 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane(seriesStackAndAxis.getXAxisNamesArray()); YAxis = new UIButtonGroup(seriesStackAndAxis.getYAxisNameArray()); @@ -114,31 +113,26 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane { private UISpinner width; private UISpinner height; - protected ImageBackgroundQuickPane getImageBackgroundPane() { - return imageBackgroundPane; - } - public VanChartImageMarkerPane() { imageBackgroundPane = new ImageBackgroundQuickPane(false); - setImageBackgroundPaneBorder(); + imageBackgroundPane.setPreferredSize(getImageBackgroundPreferredSize(imageBackgroundPane.getPreferredSize())); width = new UISpinner(0, 100, 0.5, 30); height = new UISpinner(0, 100, 0.5, 30); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p,p,p}; - double[] col = {p,f}; + double[] row = {p, p, p}; + double[] col = {p, f}; Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Width")), width}, @@ -47,13 +43,13 @@ public class VanChartImageMarkerPane extends BasicBeanPane { JPanel sizePanel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = createContentPane(imageBackgroundPane, sizePanel); - panel.setBorder(BorderFactory.createEmptyBorder(0,72,0,0)); + panel.setBorder(BorderFactory.createEmptyBorder(0, 72, 0, 0)); this.add(panel); } - protected void setImageBackgroundPaneBorder() { - imageBackgroundPane.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int)imageBackgroundPane.getPreferredSize().getHeight())); + protected Dimension getImageBackgroundPreferredSize(Dimension dimension) { + return new Dimension((int) TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int) dimension.getHeight()); } protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) { @@ -75,11 +71,11 @@ public class VanChartImageMarkerPane extends BasicBeanPane { @Override public void populateBean(VanChartAttrMarker marker) { - if(marker == null){ + if (marker == null) { marker = new VanChartAttrMarker(); marker.setCommon(false); } - if(marker.getImageBackground() != null){ + if (marker.getImageBackground() != null) { imageBackgroundPane.populateBean(marker.getImageBackground()); } width.setValue(marker.getWidth()); @@ -96,10 +92,10 @@ public class VanChartImageMarkerPane extends BasicBeanPane { return marker; } - public void updateBean(VanChartAttrMarker marker){ + public void updateBean(VanChartAttrMarker marker) { marker.setCommon(false); marker.setMarkerType(MarkerType.MARKER_NULL); - ImageBackground background = (ImageBackground)imageBackgroundPane.updateBean(); + ImageBackground background = (ImageBackground) imageBackgroundPane.updateBean(); background.setLayout(Constants.IMAGE_EXTEND); marker.setImageBackground(background); marker.setWidth(width.getValue()); 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 1e5f2f041..6c4875511 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 @@ -19,7 +19,7 @@ import java.awt.event.ItemListener; /** * Created by hufan on 2016/12/20. */ -public class VanChartLineMapEffectPane extends VanChartEffectPane{ +public class VanChartLineMapEffectPane extends VanChartEffectPane { //运动方式 private JPanel typeContentPane; @@ -45,37 +45,38 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{ panel.add(periodPane, BorderLayout.CENTER); panel.add(animationTypePane, BorderLayout.SOUTH); - panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + 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)); - UILabel label1= new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type")); - label1.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20)); + 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(){ - protected void setImageBackgroundPaneBorder() { - getImageBackgroundPane().setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH, (int)getImageBackgroundPane().getPreferredSize().getHeight())); + customContentPane = new VanChartImageMarkerPane() { + protected Dimension getImageBackgroundPreferredSize(Dimension dimension) { + return new Dimension((int) TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH, (int) dimension.getHeight()); } }; CardLayout cardLayout = new CardLayout(); - typeContentPane = new JPanel(cardLayout){ + typeContentPane = new JPanel(cardLayout) { @Override public Dimension getPreferredSize() { - if(ComparatorUtils.equals(animationType.getSelectedItem(), LineMapAnimationType.DEFAULT)){ + if (ComparatorUtils.equals(animationType.getSelectedItem(), LineMapAnimationType.DEFAULT)) { return new Dimension((int) customContentPane.getPreferredSize().getWidth(), 0); - }else { + } else { return customContentPane.getPreferredSize(); } } @@ -94,15 +95,15 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{ }); } - private void checkCardLayout(){ + private void checkCardLayout() { CardLayout cardLayout = (CardLayout) typeContentPane.getLayout(); - cardLayout.show(typeContentPane, LineMapAnimationType.getTypes()[animationType.getSelectedIndex()].getStringType()); + cardLayout.show(typeContentPane, LineMapAnimationType.getTypes()[animationType.getSelectedIndex()].getStringType()); } @Override public void populateBean(AttrEffect ob) { super.populateBean(ob); - if (ob instanceof AttrLineEffect){ + if (ob instanceof AttrLineEffect) { animationType.setSelectedItem(((AttrLineEffect) ob).getAnimationType()); customContentPane.populateBean(((AttrLineEffect) ob).getAttrMarker()); } From 4bf128919f1e5744035e75300d8faf27cb71194a Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 12 Sep 2017 11:22:03 +0800 Subject: [PATCH 05/47] =?UTF-8?q?=E4=BF=AE=E6=94=B99.0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/type/ChartTabPane.java | 2 +- .../designer/AbstractVanChartScrollPane.java | 4 ++-- .../component/VanChartTrendLinePane.java | 16 +++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java index a715643e0..495c0409a 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java @@ -21,7 +21,7 @@ public abstract class ChartTabPane extends MultiTabPane { @Override protected void initLayout() { JPanel tabPanel = new JPanel(new BorderLayout()); - tabPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 10, getBackground())); + tabPanel.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, getBackground())); tabPanel.add(tabPane, BorderLayout.CENTER); this.setLayout(new BorderLayout(0, 4)); this.add(tabPanel, BorderLayout.NORTH); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java b/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java index 649cfa487..e3358a84a 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java @@ -13,7 +13,7 @@ public abstract class AbstractVanChartScrollPane extends BasicScrollPane { protected void layoutContentPane() { leftcontentPane = createContentPane(); - leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 5, original)); + leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original)); this.add(leftcontentPane); } @@ -27,7 +27,7 @@ public abstract class AbstractVanChartScrollPane extends BasicScrollPane { } else { leftcontentPane.setBounds(0, 0, width, height); - leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 5, original)); + leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original)); } } public void reloaPane(JPanel pane){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java index 87d2a5413..789cd601d 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java @@ -47,16 +47,18 @@ public class VanChartTrendLinePane extends BasicPane{ trendLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE); trendLineType = new UIComboBox(TYPES); - prePeriod = new UISpinner(0,Integer.MAX_VALUE,1,0); - afterPeriod = new UISpinner(0,Integer.MAX_VALUE,1,0); - double[] r = {p,p}; - double[] c = {p,f,p}; + prePeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0); + afterPeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0); + double[] r = {p, p}; + double[] c = {f, p, f, p}; Component[][] periodComps = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Chart_TrendLine_Forward")), prePeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle"))}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_After_Period")), afterPeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle"))}, + new Component[]{prePeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle")), afterPeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle"))}, + new Component[]{new UILabel(Inter.getLocText("Chart_TrendLine_Forward")), null, new UILabel(Inter.getLocText("Plugin-ChartF_After_Period")), null}, }; JPanel periodPane = TableLayoutHelper.createTableLayoutPane(periodComps, r, c); + UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_Period")); + label.setVerticalAlignment(SwingConstants.TOP); Component[][] components = new Component[][]{ new Component[]{null, null}, @@ -64,7 +66,7 @@ public class VanChartTrendLinePane extends BasicPane{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), trendLineStyle}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), trendLineColor}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_type")), trendLineType}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Period")), periodPane} + new Component[]{label, periodPane} }; JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); From 685c496d8a265804ddc5c0f649c13d8065939c7a Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 12 Sep 2017 11:28:23 +0800 Subject: [PATCH 06/47] =?UTF-8?q?REPORT-4450=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9C=A8=E7=BC=A9=E6=94=BE=E5=90=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=EF=BC=8C=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyDesignUI.java | 38 +++++++++---------- designer/src/com/fr/poly/PolyUtils.java | 9 ++--- .../com/fr/poly/creator/ECBlockEditor.java | 1 + 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index efe76a69a..9fdc8788e 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -3,12 +3,7 @@ */ package com.fr.poly; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Point; -import java.awt.Rectangle; +import java.awt.*; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.text.DecimalFormat; @@ -29,6 +24,7 @@ import com.fr.page.PaperSettingProvider; import com.fr.page.ReportSettingsProvider; import com.fr.poly.creator.BlockCreator; import com.fr.poly.creator.ECBlockCreator; +import com.fr.poly.creator.ECBlockEditor; import com.fr.poly.model.AddedData; import com.fr.poly.model.AddingData; import com.fr.report.report.Report; @@ -101,6 +97,7 @@ public class PolyDesignUI extends ComponentUI { paintAddingData(g2d, addData); } paintPaginateLine(g2d); + designer.repaint(); } private void paintAddedData(Graphics g) { @@ -109,8 +106,8 @@ public class PolyDesignUI extends ComponentUI { BlockCreator creator = addedData.getAddedAt(i); // richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来 if (creator == designer.getSelection()) { - paintPositionLine(g, creator.getX(time), creator.getY(time), - (int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time)); + paintPositionLine(g, Math.round(creator.getX() * time), Math.round(creator.getY() * time), + Math.round(designer.getHorizontalValue()*time), Math.round(designer.getVerticalValue()*time)); if (creator.getEditor().isDragging()) { creator.getEditor().paintAbsorptionline(g); //如果与其他块重合了, 需要画出提示禁止重叠 @@ -121,8 +118,8 @@ public class PolyDesignUI extends ComponentUI { creator.getEditor().hideForbiddenWindow(); } } else { - paintCreator(g, creator, (int) (creator.getX()*time - designer.getHorizontalValue()*time), (int) (creator.getY()*time - designer.getVerticalValue()*time), - (int) (creator.getWidth()*time), (int) (creator.getHeight()*time)); + paintCreator(g, creator, creator.getX() - designer.getHorizontalValue(), creator.getY() - designer.getVerticalValue(), + creator.getWidth(), creator.getHeight()); } } } @@ -223,16 +220,19 @@ public class PolyDesignUI extends ComponentUI { ArrayList dbcomponents = new ArrayList(); // richer:禁止双缓冲行为,否则会出现两个图像 ComponentUtils.disableBuffer(comp, dbcomponents); -// Graphics clipg = g.create(x, y, width*resolution/ScreenResolution.getScreenResolution(), height*resolution/ScreenResolution.getScreenResolution()); -// - BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB); - Graphics2D g2d = img.createGraphics(); - comp.printAll(g2d); - g2d.dispose(); - g.drawImage(img,x,y,width,height,null); + if (comp instanceof ECBlockCreator) { + Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time)); + comp.paint(clipg); + clipg.dispose(); + }else { + BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB); + Graphics2D g2d = img.createGraphics(); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + comp.printAll(g2d); + g2d.dispose(); + g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null); + } -// comp.paint(clipg); -// clipg.dispose(); ComponentUtils.resetBuffer(dbcomponents); } diff --git a/designer/src/com/fr/poly/PolyUtils.java b/designer/src/com/fr/poly/PolyUtils.java index a0d13a042..d9c54b2fa 100644 --- a/designer/src/com/fr/poly/PolyUtils.java +++ b/designer/src/com/fr/poly/PolyUtils.java @@ -115,11 +115,10 @@ public class PolyUtils { AddedData addedData = designer.getAddedData(); for (int count = addedData.getAddedCount() - 1; count >= 0; count--) { BlockCreator creator = addedData.getAddedAt(count); - float times = (float) designer.getResolution()/ScreenResolution.getScreenResolution(); - int cx = (int) (creator.getX() * times); - int cy = (int) (creator.getY() * times); - int cw = (int) (creator.getWidth() * times); - int ch = (int) (creator.getHeight() * times); + int cx = creator.getX(); + int cy = creator.getY(); + int cw = creator.getWidth(); + int ch = creator.getHeight(); if (x >= cx && x <= (cx + cw)) { if(y >= cy && y <= (cy + ch)) { return creator; diff --git a/designer/src/com/fr/poly/creator/ECBlockEditor.java b/designer/src/com/fr/poly/creator/ECBlockEditor.java index 73d33defe..ee8f2b56c 100644 --- a/designer/src/com/fr/poly/creator/ECBlockEditor.java +++ b/designer/src/com/fr/poly/creator/ECBlockEditor.java @@ -34,6 +34,7 @@ import java.awt.*; */ public class ECBlockEditor extends BlockEditor { private static final int HEIGHT_MORE = 5; + private int resolution = ScreenResolution.getScreenResolution(); public ECBlockEditor(PolyDesigner designer, ECBlockCreator creator) { super(designer, creator); From 29b0685f76aa9239710c725869765436a2dfff46 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 12 Sep 2017 11:41:40 +0800 Subject: [PATCH 07/47] =?UTF-8?q?=E4=BF=AE=E6=94=B99.0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/plugin/chart/column/VanChartColumnSeriesPane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 b62c2169f..5c71fb77f 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java @@ -69,8 +69,7 @@ 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)); + columnWidth.setBorder(BorderFactory.createEmptyBorder(0, (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")}); @@ -78,7 +77,9 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { 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); + JPanel isFixedWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Fixed_Column_Width"),isFixedWidth); + isFixedWidthPane.setBorder(BorderFactory.createEmptyBorder(0,0,6,0)); + panel1.add(isFixedWidthPane, BorderLayout.NORTH); panel1.add(columnWidth, BorderLayout.CENTER); Component[][] components2 = new Component[][]{ From 0d68bd0b6cc98e1f4cbeabbd8424caf9b5dbf72c Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 12 Sep 2017 14:04:31 +0800 Subject: [PATCH 08/47] =?UTF-8?q?REPORT-4421=20=E4=BB=A5=E4=B8=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=9C=AA=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/parameter/ParameterPropertyPane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 51d73b90d..629af593f 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -1,10 +1,13 @@ package com.fr.design.parameter; import com.fr.design.constants.UIConstants; +import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; +import com.fr.design.mainframe.JForm; import javax.swing.*; import java.awt.*; @@ -86,7 +89,10 @@ public class ParameterPropertyPane extends JPanel{ if (isVisible == addParaPane.isVisible() || formHierarchyTreePaneWrapper == null) { return; } - if (isVisible && toolbarPane.hasSelectedLabelItem()) { + // 表单中,只有添加并选中参数面板时,才显示 + boolean hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm && + !(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); + if (isVisible && toolbarPane.hasSelectedLabelItem() && !hideInJForm) { addParaPane.setVisible(true); this.setPreferredSize(null); } else { From d27fbb50d19faba3e5815d40f13fb1f3ab70b7e7 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 12 Sep 2017 16:09:55 +0800 Subject: [PATCH 09/47] =?UTF-8?q?REPORT-4421=20=E4=BB=A5=E4=B8=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=9C=AA=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98=3D>?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A9=BA=E6=8C=87=E9=92=88=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/parameter/ParameterPropertyPane.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 629af593f..31d864157 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -90,8 +90,13 @@ public class ParameterPropertyPane extends JPanel{ return; } // 表单中,只有添加并选中参数面板时,才显示 - boolean hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm && - !(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); + boolean hideInJForm; + try { + hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm && + !(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); + } catch (NullPointerException ex) { + hideInJForm = false; + } if (isVisible && toolbarPane.hasSelectedLabelItem() && !hideInJForm) { addParaPane.setVisible(true); this.setPreferredSize(null); From bc8c97f4621b148fdee139887dacdb9e69963fa6 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 12 Sep 2017 16:12:57 +0800 Subject: [PATCH 10/47] =?UTF-8?q?REPORT-4421=20=E4=BB=A5=E4=B8=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=9C=AA=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98=3D>?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A9=BA=E6=8C=87=E9=92=88=E9=94=99=E8=AF=AF?= =?UTF-8?q?=3D>=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/parameter/ParameterPropertyPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 31d864157..9fac85121 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -95,7 +95,7 @@ public class ParameterPropertyPane extends JPanel{ hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm && !(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); } catch (NullPointerException ex) { - hideInJForm = false; + hideInJForm = true; } if (isVisible && toolbarPane.hasSelectedLabelItem() && !hideInJForm) { addParaPane.setVisible(true); From 1b9c30f9612d2bb831cde74184b9b35a53500dbd Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 12 Sep 2017 16:54:09 +0800 Subject: [PATCH 11/47] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8Cc?= =?UTF-8?q?pt=E6=97=A0=E6=B3=95=E5=88=87=E6=8D=A2=E5=88=B0=E8=A1=A8?= =?UTF-8?q?=E5=8D=95-=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/form/FormElementCaseDesigner.java | 4 ++-- .../com/fr/design/mainframe/form/FormECDesignerProvider.java | 4 +++- designer_form/src/com/fr/design/mainframe/JForm.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java b/designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java index a93604dcb..103a69511 100644 --- a/designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java +++ b/designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java @@ -229,8 +229,8 @@ public class FormElementCaseDesigner implements BaseJForm { EastRegionContainerPane.getInstance().replaceCellAttrPane(elementCaseDesign.getEastDownPane()); EastRegionContainerPane.getInstance().replaceCellElementPane(elementCaseDesign.getEastUpPane()); EastRegionContainerPane.getInstance().replaceConditionAttrPane(elementCaseDesign.getConditionAttrPane()); - EastRegionContainerPane.getInstance().replaceHyperlinkPane(elementCaseDesign.getHyperlinkPane()); + EastRegionContainerPane.getInstance().replaceHyperlinkPane(elementCaseDesign.getHyperlinkPane(this)); return; } From 60e88301beb9c6c9c4c65f34cc5297118ca8261c Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 12 Sep 2017 17:02:04 +0800 Subject: [PATCH 12/47] =?UTF-8?q?REPORT-4421=20=E6=94=B9=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameter/ParameterPropertyPane.java | 58 ++++++++++--------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 9fac85121..43e840823 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -26,16 +26,19 @@ public class ParameterPropertyPane extends JPanel{ private static ParameterPropertyPane THIS; private boolean isEditing = false; private static final int HIDE_HEIGHT = 40; + private static final int PADDING_SMALL = 5; + private static final int PADDING_MIDDLE = 10; + private static final int PADDING_LARGE = 15; public static final ParameterPropertyPane getInstance() { - if(THIS == null) { + if (THIS == null) { THIS = new ParameterPropertyPane(); } return THIS; } public static final ParameterPropertyPane getInstance(FormDesigner editor) { - if(THIS == null) { + if (THIS == null) { THIS = new ParameterPropertyPane(); } THIS.setEditor(editor); @@ -49,38 +52,41 @@ public class ParameterPropertyPane extends JPanel{ } private ParameterPropertyPane() { - toolbarPane = new ParameterToolBarPane(); - BasicScrollPane basicScrollPane = new BasicScrollPane() { - @Override - protected JPanel createContentPane() { - return toolbarPane; - } - - @Override - public void populateBean(Object ob) { - - } + init(); + } - @Override - protected String title4PopupWindow() { - return null; - } - }; + private void init() { + toolbarPane = new ParameterToolBarPane(); + BasicScrollPane basicScrollPane = new BasicScrollPane() { + @Override + protected JPanel createContentPane() { + return toolbarPane; + } + + @Override + public void populateBean(Object ob) { + // do nothing + } + + @Override + protected String title4PopupWindow() { + return null; + } + }; JPanel scrollPaneWrapperInner = new JPanel(new BorderLayout()); - scrollPaneWrapperInner.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 5)); + scrollPaneWrapperInner.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, PADDING_MIDDLE, PADDING_SMALL)); scrollPaneWrapperInner.add(basicScrollPane, BorderLayout.CENTER); addParaPane = new JPanel(new BorderLayout()); addParaPane.add(scrollPaneWrapperInner, BorderLayout.CENTER); addParaPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.SPLIT_LINE)); - initParameterListener(); this.setLayout(new BorderLayout(0, 6)); - this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + this.setBorder(BorderFactory.createEmptyBorder(PADDING_MIDDLE, 0, PADDING_MIDDLE, 0)); this.add(addParaPane, BorderLayout.CENTER); - } + } - // 显示或隐藏添加参数面板 + // 显示或隐藏添加参数面板 public void refreshState() { setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem()); } @@ -110,7 +116,7 @@ public class ParameterPropertyPane extends JPanel{ private void setEditor(FormDesigner editor) { if (formHierarchyTreePaneWrapper == null) { formHierarchyTreePaneWrapper = new JPanel(new BorderLayout()); - formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, PADDING_LARGE)); this.add(formHierarchyTreePaneWrapper, BorderLayout.SOUTH); } formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance()); @@ -121,7 +127,7 @@ public class ParameterPropertyPane extends JPanel{ toolbarPane.setParaMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - if(paraPane == null) { + if (paraPane == null) { return; } final UIButton parameterSelectedLabel = (UIButton) e.getSource(); @@ -142,7 +148,7 @@ public class ParameterPropertyPane extends JPanel{ toolbarPane.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - if(paraPane == null) { + if (paraPane == null) { return; } paraPane.addingAllParameter2Editor(); From e11ab31af65b709beeb8e346bc353bc8ac869a47 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 12 Sep 2017 17:06:23 +0800 Subject: [PATCH 13/47] =?UTF-8?q?REPORT-4480=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=A0=87=E5=B0=BA=E5=8D=95=E4=BD=8D=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/scrollruler/HorizontalRulerUI.java | 2 +- .../src/com/fr/design/scrollruler/VerticalRulerUI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java b/designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java index 61a812fda..fb25c7d3e 100644 --- a/designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java +++ b/designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java @@ -27,7 +27,7 @@ public class HorizontalRulerUI extends RulerUI { g.setColor(BaseRuler.UNIT_SIGN_COLOR); if (i % BaseRuler.SCALE_10 == 0) { double times = (double)HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution(); - String text = Utils.convertNumberStringToString(Math.round(i / times)); + String text = Utils.convertNumberStringToString(Math.round((i / times) / showText)); Graphics2D gg = (Graphics2D) g.create((int) (toPX(i) / ratio) - extra + 1, 0, BaseRuler.NUMBER_100, size.height); BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_100, BaseRuler.NUMBER_14, text, Style.getInstance().deriveHorizontalAlignment( Style.LEFT_TO_RIGHT).deriveFRFont(BaseRuler.TEXT_FONT), ScreenResolution.getScreenResolution()); diff --git a/designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java b/designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java index e0b6a11bf..b175c358e 100644 --- a/designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java +++ b/designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java @@ -24,7 +24,7 @@ public class VerticalRulerUI extends RulerUI{ g.setColor(BaseRuler.UNIT_SIGN_COLOR); if (i % BaseRuler.SCALE_10 == 0) { double times = (double) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution(); - String text = Utils.convertNumberStringToString(Math.round(i / times)); + String text = Utils.convertNumberStringToString(Math.round((i / times) / showText)); GraphHelper.drawLine(g, size.width, toPX(i) / ratio - extra, 0, toPX(i) / ratio - extra); Graphics2D gg = (Graphics2D) g.create(0, (int) (toPX(i) / ratio - extra + 1), size.width, BaseRuler.NUMBER_99); BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_11, BaseRuler.NUMBER_100, text, Style.getInstance().deriveVerticalAlignment(1).deriveRotation( From 4281202edffaac9ebd0ed78a05c1ab502025f678 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 12 Sep 2017 17:13:02 +0800 Subject: [PATCH 14/47] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/FormECDesignerProvider.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java b/designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java index 525601fef..b1ef53885 100644 --- a/designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java +++ b/designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java @@ -13,80 +13,80 @@ import com.fr.design.menu.ToolBarDef; import com.fr.form.FormElementCaseProvider; public interface FormECDesignerProvider { - - public static final String XML_TAG = "FormElementCaseDesigner"; + + String XML_TAG = "FormElementCaseDesigner"; /** * 选中目标的 对应Menu * @return 返回MenuDef数组. */ - public MenuDef[] menus4Target(); + MenuDef[] menus4Target(); /** * 获取焦点 */ - public void requestFocus() ; + void requestFocus() ; /** * 工具栏菜单字体字号等 * @return 工具栏菜单数组 */ - public ToolBarDef[] toolbars4Target(); + ToolBarDef[] toolbars4Target(); /** * 表单的报表块的工具按钮复制剪切那行 * @return 工具按钮 */ - public JComponent[] toolBarButton4Form(); + JComponent[] toolBarButton4Form(); /** * 模板菜单 * @return 返回菜单 */ - public ShortCut[] shortcut4TemplateMenu(); + ShortCut[] shortcut4TemplateMenu(); /** *当前正在编辑的elementcase * @return 当前正在编辑的elementcase */ - public FormElementCaseProvider getEditingElementCase(); + FormElementCaseProvider getEditingElementCase(); /** * 右上角属性表 * @return 属性面板 */ - public JComponent getEastDownPane(); + JComponent getEastDownPane(); /** * 右下角控件树或者扩展属性 * @return 属性面板 */ - public JComponent getEastUpPane(); + JComponent getEastUpPane(); /** * 条件属性面板 * @return 属性面板 */ - public JComponent getConditionAttrPane(); + JComponent getConditionAttrPane(); /** * 超级链接面板 * @param jt 当前模板(JForm) * @return 属性面板 */ - public JComponent getHyperlinkPane(JTemplate jt); + JComponent getHyperlinkPane(JTemplate jt); /** * 超级链接面板 * @return 属性面板 */ - public TargetComponent getEditingElementCasePane(); + TargetComponent getEditingElementCasePane(); /** * 获取当前ElementCase的缩略图 * @param elementCaseContainerSize 缩略图的大小 * @return 图 */ - public BufferedImage getElementCaseImage(Dimension elementCaseContainerSize); + BufferedImage getElementCaseImage(Dimension elementCaseContainerSize); } \ No newline at end of file From 090581d5ea21afc00e2df8055d0aeee59606a4fe Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 12 Sep 2017 19:11:41 +0800 Subject: [PATCH 15/47] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=8A=A0=E8=BD=BDPlugi?= =?UTF-8?q?nManager=E5=92=8CPluginContexts=EF=BC=8C=E4=BF=9D=E6=8A=A4Plugi?= =?UTF-8?q?nContext=E5=AF=B9=E8=B1=A1=E4=B8=8D=E8=A2=AB=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/BaseDesigner.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index cd8b3f3b0..7e746251b 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -22,10 +22,19 @@ import com.fr.env.SignIn; import com.fr.file.FILE; import com.fr.file.FILEFactory; import com.fr.file.FileFILE; -import com.fr.general.*; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.GeneralContext; +import com.fr.general.Inter; +import com.fr.general.ModuleContext; import com.fr.plugin.PluginCollector; import com.fr.plugin.manage.PluginManager; -import com.fr.stable.*; +import com.fr.plugin.manage.PluginStartup; +import com.fr.stable.ArrayUtils; +import com.fr.stable.BuildContext; +import com.fr.stable.OperatingSystem; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; import javax.swing.*; import java.awt.*; @@ -84,7 +93,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { DesignUtils.creatListeningServer(getStartPort(), startFileSuffix()); //初始化插件引擎 - PluginManager.init(); + PluginStartup.start(); // 初始化Log Handler DesignerEnvManager.loadLogSetting(); DesignerFrame df = createDesignerFrame(); From bf8e3e3342edc711870f11d23d37a206ed311827 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 12 Sep 2017 20:08:37 +0800 Subject: [PATCH 16/47] =?UTF-8?q?=E4=BF=AE=E6=94=B99.0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/TableLayout4VanChartHelper.java | 5 +- .../component/VanChartHtmlLabelPane.java | 2 - ...rtBackgroundPaneWithOutImageAndShadow.java | 24 ++++---- .../label/VanChartPlotLabelDetailPane.java | 1 + .../VanChartAbstractPlotSeriesPane.java | 10 ++-- .../designer/data/comp/DrillMapLayerPane.java | 56 +++++++++++-------- .../VanChartDrillMapInteractivePane.java | 44 ++++++++------- .../chart/gauge/VanChartGaugeSeriesPane.java | 15 ++--- .../chart/pie/VanChartPieSeriesPane.java | 9 +-- .../component/LegendLabelFormatPane.java | 2 + 10 files changed, 84 insertions(+), 84 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java b/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java index 0c95ca6fe..18a1c9489 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java @@ -5,7 +5,6 @@ import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.general.Inter; import javax.swing.*; import java.awt.*; @@ -42,9 +41,11 @@ public class TableLayout4VanChartHelper { double f = TableLayout.FILL; double[] columnSize = {f, componentWidth}; double[] rowSize = {p, p}; + UILabel label = new UILabel(title); + label.setVerticalAlignment(SwingConstants.TOP); Component[][] components = new Component[][]{ new Component[]{null, null}, - new Component[]{new UILabel(Inter.getLocText(title)), component}, + new Component[]{label, component}, }; return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE); } 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 435bfe62c..107ec5b66 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,7 +15,6 @@ 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.*; @@ -66,7 +65,6 @@ 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/background/VanChartBackgroundPaneWithOutImageAndShadow.java b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java index f36456216..14765d058 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java @@ -16,23 +16,20 @@ import java.awt.*; */ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgroundPane { - public VanChartBackgroundPaneWithOutImageAndShadow() { - initComponents(); - + @Override + protected JPanel initContentPanel() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = { p,p,p,p,p}; + double[] rowSize = { p,p,p}; - JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(),rowSize,columnSize); - this.setLayout(new BorderLayout()); - this.add(panel,BorderLayout.CENTER); + return TableLayoutHelper.createTableLayoutPane(getPaneComponents(),rowSize,columnSize); } @Override protected void initList() { - paneList.add(new NullBackgroundQuickPane(){ + paneList.add(new NullBackgroundQuickPane() { /** * 名称 * @@ -46,14 +43,15 @@ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgro paneList.add(new ColorBackgroundQuickPane()); } + @Override protected Component[][] getPaneComponents() { - return new Component[][]{ - new Component[]{null, null}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox}, - new Component[]{null, centerPane}, - new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent}, + return new Component[][]{ + new Component[]{typeComboBox, null}, + new Component[]{centerPane, null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), transparent}, }; } + } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java index 1e507415c..ba2f84dbb 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -205,6 +205,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { private void checkStyleUse() { textFontPane.setVisible(style.getSelectedIndex() == 1); + textFontPane.setPreferredSize(style.getSelectedIndex() == 1 ? new Dimension(0, 60) : new Dimension(0, 0)); } private void checkPosition() { 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 c5f5b19cf..88ee11763 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 @@ -68,6 +68,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP protected JPanel stackAndAxisEditExpandablePane;//堆積和坐標軸展开面板 private RadiusCardLayoutPane radiusPane;//半径设置界面 + private JPanel radiusPaneWithTitle; private UIButtonGroup largeDataModelGroup;//大数据模式 @@ -158,9 +159,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP } //半径界面 - protected RadiusCardLayoutPane createRadiusPane() { + protected JPanel createRadiusPane() { radiusPane = initRadiusPane(); - return radiusPane; + radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Radius_Set"), radiusPane); + return ((VanChartPlot)plot).isInCustom() ? null : radiusPaneWithTitle; } protected JPanel createLargeDataModelPane() { @@ -309,10 +311,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP * @param plot */ private void checkRadiusPane(Plot plot) { - radiusPane.setVisible(true); + radiusPaneWithTitle.setVisible(true); if (plot instanceof VanChartPlot){ if (((VanChartPlot) plot).isInCustom()){ - radiusPane.setVisible(false); + radiusPaneWithTitle.setVisible(false); } } } diff --git a/designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java b/designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java index fa62f7f56..81e1b9ebe 100644 --- a/designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java @@ -8,12 +8,13 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.drillmap.DrillMapHelper; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; -import com.fr.plugin.chart.type.MapType; -import com.fr.plugin.chart.type.ZoomLevel; import com.fr.plugin.chart.map.designer.type.VanChartMapSourceChoosePane; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; +import com.fr.plugin.chart.type.MapType; +import com.fr.plugin.chart.type.ZoomLevel; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; @@ -48,29 +49,28 @@ public class DrillMapLayerPane extends BasicScrollPane { @Override protected void layoutContentPane() { leftcontentPane = createContentPane(); - leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); + leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); this.add(leftcontentPane); } @Override protected JPanel createContentPane() { - if(mapDataTree == null){ + if (mapDataTree == null) { mapDataTree = new MapDataTree(CompatibleGeoJSONTreeHelper.getRootNodeWithoutPara(oldGeoUrl)); mapDataTree.setRootVisible(true); } + JPanel mapDataTreePanel = new JPanel(new BorderLayout()); + mapDataTreePanel.add(mapDataTree); + double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {f}; - double[] rowSize = {p,p,p,p,p,p}; + double[] rowSize = {p, p}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Tree"))}, - new Component[]{new JSeparator()}, - new Component[]{mapDataTree}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Detail"))}, - new Component[]{new JSeparator()}, - new Component[]{createLayerDetailPane()} + new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Tree"), mapDataTreePanel)}, + new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Detail"), createLayerDetailPane())} }; JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -79,21 +79,29 @@ public class DrillMapLayerPane extends BasicScrollPane { return panel; } + private JPanel createTitlePane (String title, JPanel panel) { + JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel); + panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0)); + jPanel.setBorder(BorderFactory.createEmptyBorder(0,5,0,0)); + return jPanel; + } + private JPanel createLayerDetailPane() { double p = TableLayout.PREFERRED; - double[] columnSize = {p,p,p}; + double f = TableLayout.FILL; + double[] columnSize = {f, p, p}; double[] rowSize = new double[depth + 1]; detailComps = new Component[depth + 1][3]; rowSize[0] = p; detailComps[0] = new Component[]{ new UILabel(Inter.getLocText("Plugin-Chart_Descriptor")), - new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Zoom_Level")), + new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Map_Type")) }; - for(int i = 0; i < depth; i++){ + for (int i = 0; i < depth; i++) { rowSize[i + 1] = p; int d = i + 1; - UILabel label = new UILabel(String.format("%s%d%s",Inter.getLocText("Plugin-ChartF_Index1"), d, Inter.getLocText("Plugin-ChartF_Index3"))); + UILabel label = new UILabel(String.format("%s%d%s", Inter.getLocText("Plugin-ChartF_Index1"), d, Inter.getLocText("Plugin-ChartF_Index3"))); UIComboBox level = new UIComboBox(VanChartMapSourceChoosePane.ZOOM_LEVELS); level.setEnabled(i != 0); UIComboBox type = new UIComboBox(TEMP.get(oldMapType)); @@ -112,16 +120,16 @@ public class DrillMapLayerPane extends BasicScrollPane { public void populateBean(ChartCollection ob) { VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob); - if(drillMapPlot != null) { + if (drillMapPlot != null) { java.util.List levelList = drillMapPlot.getLayerLevelList(); java.util.List mapTypeList = drillMapPlot.getLayerMapTypeList(); - if(detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)){ + if (detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)) { oldMapType = drillMapPlot.getMapType(); oldGeoUrl = drillMapPlot.getGeoUrl(); DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl); - if(root != null){ + if (root != null) { mapDataTree.changeRootNode(root); depth = root.getDepth() + 1;//根节点也算一层 } @@ -132,18 +140,18 @@ public class DrillMapLayerPane extends BasicScrollPane { //根据层级初始属性,一切以json那边读到的层级为准 int levelSize = levelList.size(); - for(int i = levelSize; i < depth; i++){ + for (int i = levelSize; i < depth; i++) { levelList.add(ZoomLevel.AUTO); } MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA; int typeSize = mapTypeList.size(); - for(int j = typeSize; j < depth; j++){ + for (int j = typeSize; j < depth; j++) { mapTypeList.add(mapType); } - for(int i = 0; i < depth; i++){ + for (int i = 0; i < depth; i++) { Component[] components = detailComps[i + 1]; - if(components != null) { + if (components != null) { UIComboBox level = (UIComboBox) components[1]; UIComboBox type = (UIComboBox) components[2]; if (level != null) { @@ -168,11 +176,11 @@ public class DrillMapLayerPane extends BasicScrollPane { @Override public void updateBean(ChartCollection ob) { VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob); - if(drillMapPlot != null && detailComps != null) { + if (drillMapPlot != null && detailComps != null) { java.util.List levelList = new ArrayList(); java.util.List mapTypeList = new ArrayList(); for (Component[] com : detailComps) { - if(com[1] instanceof UIComboBox && com[2] instanceof UIComboBox) { + if (com[1] instanceof UIComboBox && com[2] instanceof UIComboBox) { UIComboBox level = (UIComboBox) com[1]; UIComboBox type = (UIComboBox) com[2]; levelList.add((ZoomLevel) level.getSelectedItem()); diff --git a/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java index 83de6eeac..855f4bcbc 100644 --- a/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java @@ -33,7 +33,8 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith protected JPanel getInteractivePane(VanChartPlot plot){ 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, p, p, p, p, p, p, p, p, p, p}; Component[][] components = new Component[][]{ new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null}, @@ -49,16 +50,29 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith private JPanel createDrillToolsPane() { openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); + JPanel openOrClosePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Drill_Dir"), openOrClose); textAttrPane = new ChartTextAttrPane(){ + + @Override + protected JPanel getContentPane (JPanel buttonPane) { + double p = TableLayout.PREFERRED; + double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; + double[] columnSize = {e}; + double[] rowSize = {p, p}; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); + } + + @Override protected Component[][] getComponents(JPanel buttonPane) { return new Component[][]{ - new Component[]{fontNameComboBox, null}, - new Component[]{buttonPane, null} + new Component[]{fontNameComboBox}, + new Component[]{buttonPane} }; } }; - backgroundPane = new VanChartBackgroundPane4DrillMap(); - selectBackgroundPane = new VanChartBackgroundPane4DrillMap(); + backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); + selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); catalogSuperLink = new VanChartCatalogHyperLinkPane(); double p = TableLayout.PREFERRED; @@ -75,7 +89,7 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith drillPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = new JPanel(new BorderLayout()); - panel.add(openOrClose, BorderLayout.NORTH); + panel.add(openOrClosePane, BorderLayout.NORTH); panel.add(drillPane, BorderLayout.CENTER); openOrClose.addChangeListener(new ChangeListener() { @@ -85,13 +99,15 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith } }); - JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), panel); + JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill"), panel); panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0)); return panel1; } private JPanel createTitlePane(String title, Component component) { - return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(title, component, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); + panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + return panel; } private void checkEnable() { @@ -138,16 +154,4 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith catalogSuperLink.update(plot); } } - - public class VanChartBackgroundPane4DrillMap extends VanChartBackgroundPaneWithOutImageAndShadow{ - @Override - protected Component[][] getPaneComponents() { - return new Component[][]{ - new Component[]{null}, - new Component[]{typeComboBox}, - new Component[]{centerPane}, - new Component[]{transparent}, - }; - } - } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java index 9e5238d89..a919931df 100644 --- a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java @@ -13,11 +13,9 @@ import com.fr.design.style.color.ColorSelectBox; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.plugin.chart.attr.GaugeDetailStyle; -import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; -import com.fr.plugin.chart.pie.RadiusCardLayoutPane; import com.fr.plugin.chart.type.GaugeStyle; import com.fr.stable.Constants; @@ -119,21 +117,21 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { new Component[]{null, null}, getPaneBackgroundColor(), getInnerPaneBackgroundColor(), - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} + new Component[]{createRadiusPane(), null} }; case SLOT: return new Component[][]{ new Component[]{null, null}, getNeedleColor(), getSlotBackgroundColor(), - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} + new Component[]{createRadiusPane(), null} }; case THERMOMETER: return new Component[][]{ new Component[]{null, null}, getNeedleColor(), getSlotBackgroundColor(), - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} + new Component[]{createRadiusPane(), null} }; default: return new Component[][]{ @@ -142,16 +140,11 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { getHingeBackgroundColor(), getNeedleColor(), getPaneBackgroundColor(), - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} + new Component[]{createRadiusPane(), null} }; } } - //半径界面 - protected RadiusCardLayoutPane initRadiusPane() { - return ((VanChartPlot)plot).isInCustom() ? null : new RadiusCardLayoutPane(); - } - private Component[] getHingeColor() { hingeColor = new ColorSelectBox(120); return new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Hinge")),hingeColor}; diff --git a/designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java index c0377baa3..f3e3ca634 100644 --- a/designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java @@ -10,7 +10,6 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.general.Inter; import com.fr.plugin.chart.PiePlot4VanChart; -import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; @@ -62,7 +61,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane { new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_StartAngle")),startAngle}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_EndAngle")),endAngle}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")), createRadiusPane()}, + new Component[]{createRadiusPane(),null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation} }; @@ -71,12 +70,6 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); } - //半径界面 - protected RadiusCardLayoutPane initRadiusPane() { - return ((VanChartPlot)plot).isInCustom() ? null : new RadiusCardLayoutPane(); - } - - public void populateBean(Plot plot) { if(plot == null) { return; 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 a3e10efb2..dafcd7e6b 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 @@ -33,6 +33,8 @@ public class LegendLabelFormatPane extends JPanel{ Inter.getLocText("Plugin-ChartF_Custom")}); labelFormat = new FormatPaneWithOutFont(); htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight(); + htmlLabelPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); + centerPane = new JPanel(new CardLayout()){ @Override From 917be5028b962ff00d657d003a78ae9ac0d5b582 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 13 Sep 2017 09:27:43 +0800 Subject: [PATCH 17/47] =?UTF-8?q?REPORT-4372=20&&=20REPORT-4358=20&&=20REP?= =?UTF-8?q?ORT-4369=209.0=E4=B8=80=E8=BD=AE=E5=9B=9E=E5=BD=92=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/ParameterTreeComboBox.java | 4 +- .../design/locale/designer_zh_CN.properties | 2 +- .../accessibles/AccessibleIconEditor.java | 5 -- .../accessibles/BaseAccessibleEditor.java | 13 +--- .../widget/component/DateValuePane.java | 15 +++- .../component/NumberEditorValidatePane.java | 74 ++++++++----------- .../AccessibleWLayoutBorderStyleEditor.java | 4 - .../widget/ui/designer/LabelDefinePane.java | 4 +- 8 files changed, 52 insertions(+), 69 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java b/designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java index b6806a992..4bbdc301f 100644 --- a/designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java +++ b/designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java @@ -15,6 +15,7 @@ import com.fr.general.Inter; import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; @@ -76,7 +77,8 @@ public class ParameterTreeComboBox extends FRTreeComboBox { if (obj instanceof TreePath) { return ((Parameter)((ExpandMutableTreeNode)((TreePath)obj).getLastPathComponent()).getUserObject()).getName(); } - return (String)obj; + Object item = this.getEditor().getItem(); + return item == null ? StringUtils.EMPTY : item.toString(); } @Override diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index edbfda3cb..da5090740 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -951,7 +951,7 @@ zeroMarginWarn=\u7531\u4E8E\u6253\u5370\u673A\u5B58\u5728\u7269\u7406\u8FB9\u8DD Widget-Date_Selector_Return_Type=\u8FD4\u56DE\u503C\u7C7B\u578B Utils-Switch_To_Template_Reportlet=\u5207\u6362\u5230\u6A21\u677F\u7F51\u7EDC\u62A5\u8868 satisfy=\u6EE1\u8DB3\u6761\u4EF6 -FR-Designer_WidgetDisplyPosition=\u63A7\u4EF6\u663E\u793A\u4F4D\u7F6E +FR-Designer_WidgetDisplyPosition=\u663E\u793A\u4F4D\u7F6E FR-Base_Top=\u4E0A FR-Designer_Form-CheckBox=\u590D\u9009\u6846 Reportlet-Parameter_Type=\u53C2\u6570\u4F20\u9012\u65B9\u5F0F diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java index d79c489e7..594b11e90 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java @@ -27,11 +27,6 @@ public class AccessibleIconEditor extends UneditableAccessibleEditor { return new RendererField(new IconCellRenderer()); } - protected void setBorderVisible(){ - this.setBorder(BorderFactory.createLineBorder(Color.lightGray)); - } - - @Override protected void showEditorPane() { if (customIconPane == null) { diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index 10840d300..c71cd8ad1 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -1,9 +1,6 @@ package com.fr.design.mainframe.widget.accessibles; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Insets; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; @@ -45,11 +42,9 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor this.decoder = dec; initComponents(); txtValue.setEditable(dec != null); - setBorderVisible(); - } - - protected void setBorderVisible(){ - ((JComponent) txtValue).setBorder(null); + ((JComponent) txtValue).setOpaque(true); + ((JComponent) txtValue).setBorder(BorderFactory.createLineBorder(Color.lightGray)); + ((JComponent) txtValue).setBackground(Color.WHITE); } @Override diff --git a/designer_base/src/com/fr/design/widget/component/DateValuePane.java b/designer_base/src/com/fr/design/widget/component/DateValuePane.java index 6ea7d056e..b6f59ec6e 100644 --- a/designer_base/src/com/fr/design/widget/component/DateValuePane.java +++ b/designer_base/src/com/fr/design/widget/component/DateValuePane.java @@ -1,11 +1,12 @@ package com.fr.design.widget.component; +import com.fr.base.Formula; import com.fr.design.constants.LayoutConstants; import com.fr.design.editor.editor.*; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; - +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -17,13 +18,16 @@ import java.awt.*; public class DateValuePane extends JPanel { private UIButtonGroup widgetValueHead; private Editor[] editor; + private static final String NONE_EDITOR_NAME = Inter.getLocText("None"); + private static final String DATE_EDITOR_NAME = Inter.getLocText("Date"); + private static final String FORMULA_EDITOR_NAME = Inter.getLocText("Parameter-Formula"); public DateValuePane() { editor = new Editor[]{ - new NoneEditor(null, Inter.getLocText("None")), - new DateEditor(true, Inter.getLocText("Date")), - new FormulaEditor(Inter.getLocText("Parameter-Formula")) + new NoneEditor(null, NONE_EDITOR_NAME), + new DateEditor(true, DATE_EDITOR_NAME), + new FormulaEditor(FORMULA_EDITOR_NAME) }; this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL)); final CardLayout cardLayout = new CardLayout(); @@ -56,6 +60,9 @@ public class DateValuePane extends JPanel { int index = widgetValueHead.getSelectedIndex(); Editor e = editor[index]; Object value = e.getValue(); + if(value == null && ComparatorUtils.equals(FORMULA_EDITOR_NAME, e.getName())){ + value = new Formula(StringUtils.EMPTY); + } return value; } diff --git a/designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java b/designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java index 63b297925..68ca5ae1e 100644 --- a/designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java +++ b/designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java @@ -1,7 +1,6 @@ package com.fr.design.widget.component; import com.fr.design.designer.IntervalConstants; -import com.fr.design.dialog.BasicPane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UIBasicSpinner; @@ -12,6 +11,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.NumberEditor; import com.fr.general.Inter; +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -35,10 +35,8 @@ public class NumberEditorValidatePane extends JPanel { private SpinnerNumberModel minValueModel; private UISpinner decimalLength; private JPanel limitNumberPane; - private UITextField maxValueErrorTextField; - private UITextField minValueErrorTextField; - private JPanel maxValueFieldPane; - private JPanel minValueFieldPane; + private UITextField errorMsgTextField; + private JPanel errorMsgTextFieldPane; private ActionListener allowDecimalsListener; @@ -79,13 +77,10 @@ public class NumberEditorValidatePane extends JPanel { this.setMinValueCheckBox.addActionListener(setMinListener); this.minValueSpinner.addChangeListener(minValueChangeListener); setMinValueCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - initMaxMinValueFieldPane(); - JPanel maxValueBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - maxValueBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); - maxValueBorderPane.add(maxValueFieldPane, BorderLayout.CENTER); - JPanel minValueBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - minValueBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L1, 0)); - minValueBorderPane.add(minValueFieldPane, BorderLayout.CENTER); + initErrorMsgPane(); + JPanel errorMsgBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + errorMsgBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L1, 0)); + errorMsgBorderPane.add(errorMsgTextFieldPane, BorderLayout.CENTER); UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"})); limitNumberPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{numberLabel, decimalLength}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); limitNumberPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); @@ -96,37 +91,20 @@ public class NumberEditorValidatePane extends JPanel { new Component[]{limitNumberPane, null}, new Component[]{allowNegativeCheckBox, null}, new Component[]{setMaxValueCheckBox, maxValueSpinner}, - new Component[]{maxValueBorderPane, null}, new Component[]{setMinValueCheckBox, minValueSpinner}, - new Component[]{minValueBorderPane, null}, + new Component[]{errorMsgBorderPane, null}, }; - double[] rowSize = {p, p, p, p, p, p, p}; + double[] rowSize = {p, p, p, p, p, p}; double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); this.add(panel); } - private void initMaxMinValueFieldPane() { - maxValueErrorTextField = new UITextField(); - minValueErrorTextField = new UITextField(); - - maxValueFieldPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")), maxValueErrorTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - setMaxValueCheckBox.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - maxValueFieldPane.setVisible(setMaxValueCheckBox.isSelected()); - } - }); - - minValueFieldPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")), minValueErrorTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - setMinValueCheckBox.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - minValueFieldPane.setVisible(setMinValueCheckBox.isSelected()); - } - }); - + private void initErrorMsgPane() { + errorMsgTextField = new UITextField(); + errorMsgTextFieldPane = TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")), errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); } @@ -257,28 +235,31 @@ public class NumberEditorValidatePane extends JPanel { allowNegativeCheckBox.setSelected(e.isAllowNegative()); if (e.getMaxValue() == Double.MAX_VALUE) { setMaxValueCheckBox.setSelected(false); - maxValueFieldPane.setVisible(false); +// maxValueFieldPane.setVisible(false); maxValueSpinner.setValue(new Double(Double.MAX_VALUE)); maxValueSpinner.setEnabled(false); } else { setMaxValueCheckBox.setSelected(true); maxValueSpinner.setEnabled(true); - maxValueFieldPane.setVisible(true); maxValueSpinner.setValue(new Double(e.getMaxValue())); } if (e.getMinValue() == -Double.MAX_VALUE) { setMinValueCheckBox.setSelected(false); - minValueFieldPane.setVisible(false); minValueSpinner.setValue(new Double(-Double.MAX_VALUE)); minValueSpinner.setEnabled(false); } else { setMinValueCheckBox.setSelected(true); - minValueFieldPane.setVisible(true); minValueSpinner.setEnabled(true); minValueSpinner.setValue(new Double(e.getMinValue())); } + errorMsgTextField.setText(e.getRegErrorMessage()); + if(e.getMaxValue() == Double.MAX_VALUE || e.getMinValue() == -Double.MAX_VALUE){ + errorMsgTextFieldPane.setVisible(true); + }else{ + errorMsgTextFieldPane.setVisible(false); + } } public void update(NumberEditor ob) { @@ -289,15 +270,22 @@ public class NumberEditorValidatePane extends JPanel { ob.setAllowNegative(allowNegativeCheckBox.isSelected()); if (setMaxValueCheckBox.isSelected()) { - ob.setMaxValue(Double.parseDouble("" + maxValueSpinner.getValue())); + ob.setMaxValue(Double.parseDouble(StringUtils.EMPTY + maxValueSpinner.getValue())); } else { ob.setMaxValue(Double.MAX_VALUE); } if (setMinValueCheckBox.isSelected()) { - ob.setMinValue(Double.parseDouble("" + minValueSpinner.getValue())); + ob.setMinValue(Double.parseDouble(StringUtils.EMPTY + minValueSpinner.getValue())); } else { ob.setMinValue(-Double.MAX_VALUE); } + if(setMinValueCheckBox.isSelected() || setMaxValueCheckBox.isSelected()){ + errorMsgTextFieldPane.setVisible(true); + }else{ + errorMsgTextFieldPane.setVisible(false); + errorMsgTextField.setText(StringUtils.EMPTY); + } + ob.setRegErrorMessage(errorMsgTextField.getText()); } } diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java index c2345cd83..8ec7cc417 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java @@ -27,10 +27,6 @@ public class AccessibleWLayoutBorderStyleEditor extends UneditableAccessibleEdit return new RendererField(new LayoutBorderStyleRenderer()); } - protected void setBorderVisible(){ - this.setBorder(BorderFactory.createLineBorder(Color.lightGray)); - } - @Override protected void showEditorPane() { if (borderPane == null) { diff --git a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java index cb988f24f..30d703aee 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -82,7 +82,7 @@ public class LabelDefinePane extends AbstractDataModify