diff --git a/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java index e0bd8852e..bbb30b888 100644 --- a/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java @@ -23,21 +23,16 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p,p,p,p,p,p,p,p,p,p,p,p}; + double[] row = {p,p,p,p,p,p,p}; double[] col = {f}; Component[][] components = new Component[][]{ - new Component[]{createStylePane()}, - new Component[]{stylePane == null ? null : new JSeparator()}, + new Component[]{getColorPane()}, new Component[]{createLineTypePane()}, - new Component[]{new JSeparator()}, new Component[]{createMarkerPane()}, - new Component[]{new JSeparator()}, new Component[]{createAreaFillColorPane()}, - new Component[]{new JSeparator()}, new Component[]{createStackedAndAxisPane()}, new Component[]{createLargeDataModelPane()}, - new Component[]{new JSeparator()}, new Component[]{createTrendLinePane()}, }; 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 d64ae34b1..41c672e14 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java @@ -36,11 +36,9 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane { double[] col = {f}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createBubblePane()}, - new Component[]{new JSeparator()}, new Component[]{createStackedAndAxisPane()}, - new Component[]{createAlphaPane()}, - new Component[]{new JSeparator()}, new Component[]{createLargeDataModelPane()} }; @@ -49,6 +47,13 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane { return contentPane; } + //设置色彩面板内容 + @Override + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + panel.add(createAlphaPane(), BorderLayout.CENTER); + } + @Override //堆积和坐标轴设置(自定义柱形图等用到) protected JPanel createStackedAndAxisPane() { @@ -68,7 +73,7 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createBubblePane() { bubblePane = new VanChartBubblePane(); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Bubble"), bubblePane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Bubble"), bubblePane); } protected void populateCondition(ConditionAttr defaultAttr){ diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java b/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java index 208f8203d..c4e8deba5 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java @@ -32,10 +32,11 @@ public class VanChartBubblePane extends BasicBeanPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p, p, p, p}; + double[] row = {p, p, p, p, p}; double[] col = {p, f}; Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MinDiameter")), minDiameter}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MaxDiameter")), maxDiameter}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Shadow")), shadow}, 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 cb418b163..c3cc43825 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java @@ -11,7 +11,6 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.plugin.chart.base.AttrSeriesImageBackground; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; @@ -49,10 +48,8 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { double[] columnSize = {f}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ - new Component[]{createStylePane()}, - new Component[]{stylePane == null ? null : new JSeparator()}, + new Component[]{getColorPane()}, new Component[]{createSeriesStylePane(new double[]{p,p}, new double[]{p,f})}, - new Component[]{new JSeparator()}, new Component[]{createBorderPane()}, new Component[]{createStackedAndAxisPane()}, new Component[]{createTrendLinePane()}, @@ -76,11 +73,9 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { isFillWithImage = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); imagePane = new ImageBackgroundQuickPane(false); - Component[][] components1 = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Fixed_Column_Width")),isFixedWidth}, - new Component[]{null,columnWidth}, - }; - JPanel panel1 = TableLayoutHelper.createTableLayoutPane(components1, row, col); + JPanel panel1 = new JPanel(new BorderLayout()); + panel1.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Fixed_Column_Width"),isFixedWidth), BorderLayout.NORTH); + panel1.add(columnWidth, BorderLayout.CENTER); Component[][] components2 = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Chart-Gap_Series")),seriesGap}, @@ -113,7 +108,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { checkImagePane(); } }); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), borderPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), borderPane); } private void checkAll() { @@ -122,11 +117,11 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { } private void checkColumnWidth() { - columnWidth.setEnabled(isFixedWidth.getSelectedIndex() == 0); + columnWidth.setVisible(isFixedWidth.getSelectedIndex() == 0); } private void checkImagePane() { - GUICoreUtils.setEnabled(imagePane, isFillWithImage.getSelectedIndex() == 0); + imagePane.setVisible(isFillWithImage.getSelectedIndex() == 0); } public void populateBean(Plot plot) { diff --git a/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomPlotSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomPlotSeriesPane.java index 767bb27ab..c6276c4db 100644 --- a/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomPlotSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomPlotSeriesPane.java @@ -6,14 +6,13 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane; -import javax.swing.*; import java.awt.*; /** * Created by Fangjie on 2016/4/26. */ public class VanChartCustomPlotSeriesPane extends BasicBeanPane { - private static final int WIDTH = 210; + private static final int WIDTH = 236; private static final int DELTA_HEIGHT = 300; private BasicBeanPane axisPane; private AbstractPlotSeriesPane seriesPane; @@ -39,7 +38,6 @@ public class VanChartCustomPlotSeriesPane extends BasicBeanPane { }else { Component[][] components = new Component[][]{ new Component[]{axisPane}, - new Component[]{new JSeparator()}, new Component[]{seriesPane} }; this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize)); diff --git a/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java index 267f1e64c..3af0a3642 100644 --- a/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java @@ -6,9 +6,12 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane; import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; +import com.fr.general.Inter; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.VanChartBeautyPane; +import com.fr.plugin.chart.designer.component.VanChartFillStylePane; import javax.swing.*; import java.awt.*; @@ -37,6 +40,8 @@ public class VanChartCustomSeriesPane extends ChartSeriesPane { } initSeriesPane((VanChartCustomPlot) chart.getPlot()); + plotSeriesPane.setBorder(BorderFactory.createEmptyBorder()); + //公共使用的部分 seriesPane.add(plotSeriesPane, BorderLayout.CENTER); @@ -63,22 +68,22 @@ public class VanChartCustomSeriesPane extends ChartSeriesPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p,p,p,p}; + double[] row = {p,p}; double[] col = {f}; - fillStylePane = new ChartFillStylePane(); + fillStylePane = new VanChartFillStylePane(); stylePane = new VanChartBeautyPane(); Component[][] components = new Component[][]{ new Component[]{fillStylePane}, //配色 - new Component[]{new JSeparator()}, new Component[]{stylePane},//风格 - new Component[]{new JSeparator()} }; - return TableLayoutHelper.createTableLayoutPane(components, row, col); - + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); + JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"),panel); + panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); + return colorPane; } /** diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartAreaSeriesFillColorPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartAreaSeriesFillColorPane.java index 0387dd365..32f5dc3e7 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartAreaSeriesFillColorPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartAreaSeriesFillColorPane.java @@ -3,10 +3,10 @@ package com.fr.plugin.chart.designer.component; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane; import java.awt.*; @@ -32,7 +32,7 @@ public class VanChartAreaSeriesFillColorPane extends BasicPane { new Component[]{transparent}, }; - this.add(TableLayoutHelper.createTableLayoutPane(components, row, col)); + this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col)); } protected String title4PopupWindow(){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java new file mode 100644 index 000000000..12b9ab796 --- /dev/null +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java @@ -0,0 +1,38 @@ +package com.fr.plugin.chart.designer.component; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane; +import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +/** + * Created by mengao on 2017/8/17. + */ +public class VanChartFillStylePane extends ChartFillStylePane { + + @Override + protected JPanel getContentPane () { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("ColorMatch")),styleSelectBox}, + new Component[]{null,customPane}, + + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + + } + @Override + public Dimension getPreferredSize() { + if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) { + return new Dimension(styleSelectBox.getPreferredSize().width, 30); + } + return super.getPreferredSize(); + } +} diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineTypePane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineTypePane.java index df37ecced..c536ea9a6 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineTypePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineTypePane.java @@ -5,10 +5,10 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.LineComboBox; 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 com.fr.plugin.chart.type.LineStyle; import com.fr.plugin.chart.base.VanChartAttrLine; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; +import com.fr.plugin.chart.type.LineStyle; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; @@ -45,19 +45,17 @@ public class VanChartLineTypePane extends BasicPane { } protected JPanel createContentPane(double p, double f) { - double[] row = {p, p, p, p, p, p}; + double[] row = {p, p, p, p}; double[] col = {p, f}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle"))}, - new Component[]{lineWidth, null}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart-Style_Present"))}, - new Component[]{lineStyle, null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Null_Value_Break"))}, - new Component[]{nullValueBreak, null}, + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")),lineWidth}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Style_Present")),lineStyle}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Null_Value_Break")),nullValueBreak}, }; - return TableLayoutHelper.createTableLayoutPane(components, row, col); + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); } public void checkLarge(boolean large){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineWidthPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineWidthPane.java index 370345844..dc9d3c130 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineWidthPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartLineWidthPane.java @@ -18,6 +18,7 @@ public class VanChartLineWidthPane extends VanChartLineTypePane { double[] col = {p,f}; Component[][] components = new Component[][]{ + new Component[]{null,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), lineWidth}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Null_Value_Break")), nullValueBreak}, }; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java index 16a5dde8c..73d852bea 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java @@ -5,6 +5,7 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartAttrMarker; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.marker.VanChartCommonMarkerPane; import com.fr.plugin.chart.designer.component.marker.VanChartImageMarkerPane; @@ -42,6 +43,8 @@ public class VanChartMarkerPane extends BasicPane { commonMarkerPane = createCommonMarkerPane(); imageMarkerPane = createImageMarkerPane(); + commonMarkerPane.setBorder(BorderFactory.createEmptyBorder(10,25,0,15)); + cardLayout = new CardLayout(); centerPane = new JPanel(cardLayout) { @@ -77,7 +80,7 @@ public class VanChartMarkerPane extends BasicPane { } protected void layoutComponents() { - this.add(commonORCustom, BorderLayout.NORTH); + this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Point_Style"), commonORCustom), BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); } 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 1bf26b3bd..11f1e8591 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 @@ -16,6 +16,7 @@ import com.fr.general.Inter; import com.fr.plugin.chart.base.TrendLineType; import com.fr.plugin.chart.base.VanChartAttrTrendLine; import com.fr.plugin.chart.base.VanChartConstants; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import javax.swing.*; import java.awt.*; @@ -38,7 +39,7 @@ public class VanChartTrendLinePane extends BasicPane{ this.setLayout(new BorderLayout()); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p,p,p,p,p}; + double[] row = {p,p,p,p,p,p}; double[] col = {p,f}; trendLineName = new UITextField(); trendLineColor = new ColorSelectBox(100); @@ -57,6 +58,7 @@ public class VanChartTrendLinePane extends BasicPane{ Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Name")), trendLineName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), trendLineStyle}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), trendLineColor}, @@ -64,7 +66,7 @@ public class VanChartTrendLinePane extends BasicPane{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Period")), periodPane} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); this.add(panel, BorderLayout.CENTER); } protected String title4PopupWindow(){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithAlphaPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithAlphaPane.java index a794f0cbc..6b196d6f8 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithAlphaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithAlphaPane.java @@ -27,9 +27,10 @@ public class VanChartBorderWithAlphaPane extends VanChartBorderPane{ @Override protected Component[][] getUseComponent() { return new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")+":"),currentLineCombo}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")+":"),currentLineColorPane}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")+":"), transparent} + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")),currentLineCombo}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),currentLineColorPane}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), transparent} }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java index 22a8d3f92..158752dec 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java @@ -8,11 +8,11 @@ import com.fr.design.gui.xcombox.MarkerComboBox; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; -import com.fr.plugin.chart.glyph.marker.*; -import com.fr.plugin.chart.marker.type.MarkerType; import com.fr.plugin.chart.base.VanChartAttrMarker; import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane; +import com.fr.plugin.chart.marker.type.MarkerType; +import javax.swing.*; import java.awt.*; /** @@ -96,16 +96,27 @@ public class VanChartCommonMarkerPane extends BasicBeanPane public VanChartCommonMarkerPane() { markerPane = new MarkerComboBox(getMarkers()); - markerFillColor = new VanChartMarkerBackgroundPane(); + markerFillColor = new VanChartMarkerBackgroundPane(){ + protected Component[][] getPaneComponents() { + return new Component[][]{ + new Component[]{typeComboBox, null}, + new Component[]{centerPane, null}, + }; + } + }; radius = new UISpinner(0, 100, 0.5, 0); double p = TableLayout.PREFERRED; - double[] row = {p, p,p}; - double[] col = {p, 100}; + double f = TableLayout.FILL; + double[] row = {p, p, p}; + double[] col = {p, f}; Component[][] components = getUseComponent(); - this.add(TableLayoutHelper.createTableLayoutPane(components, row, col)); + JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, row, col); + jPanel.setBorder(BorderFactory.createEmptyBorder(10,25,0,15)); + + this.add(jPanel); } protected Marker[] getMarkers() { 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 3412fe085..338d78ca0 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 @@ -11,8 +11,6 @@ import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane; import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane; @@ -31,6 +29,7 @@ import com.fr.plugin.chart.custom.style.VanChartCustomStylePane; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane; import com.fr.plugin.chart.designer.component.VanChartBeautyPane; +import com.fr.plugin.chart.designer.component.VanChartFillStylePane; import com.fr.plugin.chart.designer.component.VanChartLineTypePane; import com.fr.plugin.chart.designer.component.VanChartMarkerPane; import com.fr.plugin.chart.designer.component.VanChartTrendLinePane; @@ -79,6 +78,11 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP } protected JPanel getContentPane(boolean custom) { + if (custom) { + JScrollPane scrollPane = new JScrollPane(); + scrollPane.setViewportView(getContentInPlotType()); + scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + } return getContentInPlotType(); } @@ -87,42 +91,34 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP * 返回 填充界面. */ protected ChartFillStylePane getFillStylePane() { - //如果是自定義組合圖,則不創建填充界面 - return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane(){ - protected JPanel getContentPane () { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = {p, p}; - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("ColorMatch")),styleSelectBox}, - new Component[]{null,customPane}, - - }; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); - - } - @Override - public Dimension getPreferredSize() { - if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) { - return new Dimension(styleSelectBox.getPreferredSize().width, 30); - } - return super.getPreferredSize(); - } - }; + return new VanChartFillStylePane(); } //风格 protected VanChartBeautyPane createStylePane() { - //如果是自定義組合圖,則不創建填充界面 - if (parentPane instanceof VanChartCustomStylePane){ - stylePane = null; - }else { - stylePane = new VanChartBeautyPane(); - } + stylePane = new VanChartBeautyPane(); return stylePane; } + //获取色彩面板 + protected JPanel getColorPane () { + //如果是自定義組合圖,則不創建色彩界面 + if (parentPane instanceof VanChartCustomStylePane) { + return null; + } + JPanel panel = new JPanel(new BorderLayout()); + setColorPaneContent(panel); + JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel); + panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); + return colorPane; + } + + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + panel.add(createStylePane(), BorderLayout.CENTER); + } + //趋势线 protected JPanel createTrendLinePane() { trendLinePane = new VanChartTrendLinePane(); @@ -172,7 +168,8 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP checkLarge(); } }); - return createLargeDataModelPane(largeDataModelGroup); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Large_Model"), largeDataModelGroup); + return createLargeDataModelPane(panel); } protected void checkLarge() { @@ -224,8 +221,9 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP } } - protected JPanel createLargeDataModelPane(UIButtonGroup modelGroup) { - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Large_Model"), modelGroup); + protected JPanel createLargeDataModelPane(JPanel jPanel) { + JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Large_Data"), jPanel); + return panel; } protected UIButtonGroup createLargeDataModelGroup() { @@ -246,7 +244,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP //不透明度 protected JPanel createAlphaPane() { transparent = new UINumberDragPane(0, 100); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), transparent); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Alpha"), transparent); } //堆积和坐标轴设置(自定义柱形图等用到) 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 index e72aa7496..6b49a00f9 100644 --- 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 @@ -6,7 +6,6 @@ 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.VanChartAttrHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; @@ -26,27 +25,23 @@ public class VanChartCustomStackAndAxisEditPane extends BasicBeanPane { period = new UISpinner(0, Double.MAX_VALUE, 0.1, 0); content = createContentPane(); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Flash_Animation"),enabledButton); this.setLayout(new BorderLayout(0, 5)); if(hasEnabledChoose) { - this.add(enabledButton, BorderLayout.NORTH); + this.add(panel, BorderLayout.NORTH); + content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15)); } this.add(content, BorderLayout.CENTER); } @@ -52,7 +55,7 @@ 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); + periodPane.add(new UILabel(Inter.getLocText("Plugin-ChartF_Flash_Period")), BorderLayout.WEST); periodPane.add(period, BorderLayout.CENTER); periodPane.add(new UILabel("s"), BorderLayout.EAST); return periodPane; diff --git a/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java index b7a6357d4..cd3ab9307 100644 --- a/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java @@ -2,6 +2,7 @@ package com.fr.plugin.chart.funnel.designer.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; @@ -29,13 +30,9 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane { double[] columnSize = {f}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ - new Component[]{createStylePane()}, - new Component[]{stylePane == null ? null : new JSeparator()}, + new Component[]{getColorPane()}, new Component[]{createFunnelStylePane()}, - new Component[]{new JSeparator()}, new Component[]{createBorderPane()}, - new Component[]{new JSeparator()}, - new Component[]{createAlphaPane()}, }; contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -43,15 +40,30 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane { return contentPane; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + panel.add(createStylePane(), BorderLayout.CENTER); + panel.add(createAlphaPane(), BorderLayout.SOUTH); + } + private JPanel createFunnelStylePane() { useSameSlantAngle = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_UseSameSlantAngle"), Inter.getLocText("Plugin-ChartF_UseDiffSlantAngle")}); sort = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_AutoSort"), Inter.getLocText("Plugin-ChartF_Origin")}); - JPanel panel = new JPanel(new BorderLayout(0,4)); - panel.add(useSameSlantAngle, BorderLayout.CENTER); - panel.add(sort, BorderLayout.SOUTH); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p,p,p}; + Component[][] components = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Continuity")), useSameSlantAngle}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Sort")), sort}, + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Style_Name"), panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Style_Name"), panel); } public void populateBean(Plot plot) { diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttAxisStylePane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttAxisStylePane.java index 63be4b56e..d31afbc6f 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttAxisStylePane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttAxisStylePane.java @@ -33,7 +33,7 @@ public class GanttAxisStylePane extends BasicBeanPane { Component[][] components = new Component[][]{ new Component[]{textAttrPane, null}, - new Component[]{colorSelectBox4button, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), colorSelectBox4button}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha"), SwingConstants.RIGHT), transparent} }; diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttProcessAxisPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttProcessAxisPane.java index a5404dd5a..d1b5a1c82 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttProcessAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttProcessAxisPane.java @@ -1,13 +1,14 @@ package com.fr.plugin.chart.gantt.designer.style.axis; import com.fr.chart.chartattr.Plot; -import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.gantt.VanChartGanttPlot; import com.fr.plugin.chart.gantt.attr.GanttProcessAxis; import com.fr.plugin.chart.vanchart.VanChart; @@ -20,7 +21,7 @@ import java.awt.*; /** * Created by hufan on 2017/1/12. */ -public class GanttProcessAxisPane extends BasicScrollPane { +public class GanttProcessAxisPane extends AbstractVanChartScrollPane { private UIButtonGroup typeButton; private UISpinner horizontalProportion; @@ -38,11 +39,8 @@ public class GanttProcessAxisPane extends BasicScrollPane { Component[][] components = new Component[][]{ new Component[]{createHorizontalProportionPane()}, - new Component[]{new JSeparator()}, new Component[]{createHorizontalHeaderPane()}, - new Component[]{new JSeparator()}, new Component[]{createVerticalHeaderPane()}, - new Component[]{new JSeparator()}, new Component[]{createBodyPane()} }; @@ -51,26 +49,25 @@ public class GanttProcessAxisPane extends BasicScrollPane { protected void layoutContentPane() { leftcontentPane = createContentPane(); - leftcontentPane.setBorder(BorderFactory.createMatteBorder(10, 10, 20, 10, original)); this.add(leftcontentPane); } private Component createBodyPane() { bodyPane = new GanttAxisStylePane(); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Content"), bodyPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Content"), bodyPane); } private Component createHorizontalHeaderPane() { horizontalHeaderPane = new GanttAxisStylePane(); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Horizontal_Table"), horizontalHeaderPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Horizontal_Table"), horizontalHeaderPane); } private Component createVerticalHeaderPane() { verticalHeaderPane = new GanttAxisStylePane(); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Vertical_Table"), verticalHeaderPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Vertical_Table"), verticalHeaderPane); } private Component createHorizontalProportionPane() { @@ -93,7 +90,9 @@ public class GanttProcessAxisPane extends BasicScrollPane { } }); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Horizontal_Proportion"), panel); + JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Horizontal_Proportion"), panel); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-DataFunction_Percent"), jPanel); } private void checkoutPaneVisible() { diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttTimeAxisPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttTimeAxisPane.java index 961c09882..b955bf11f 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttTimeAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/axis/GanttTimeAxisPane.java @@ -1,12 +1,13 @@ package com.fr.plugin.chart.gantt.designer.style.axis; -import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.gantt.VanChartGanttPlot; import com.fr.plugin.chart.gantt.attr.GanttTimeAxis; import com.fr.plugin.chart.type.ZoomLevel; @@ -18,7 +19,7 @@ import java.awt.*; /** * Created by hufan on 2017/1/12. */ -public class GanttTimeAxisPane extends BasicScrollPane { +public class GanttTimeAxisPane extends AbstractVanChartScrollPane { private static final ZoomLevel[] ZOOM_LEVELS = new ZoomLevel[]{ZoomLevel.AUTO, ZoomLevel.ZERO, ZoomLevel.ONE, ZoomLevel.TWO, ZoomLevel.THREE, ZoomLevel.FOUR, ZoomLevel.FIVE, ZoomLevel.SIX, ZoomLevel.SEVEN, ZoomLevel.EIGHT, ZoomLevel.NINE, ZoomLevel.TEN, ZoomLevel.ELEVEN, ZoomLevel.TWELVE}; @@ -39,9 +40,7 @@ public class GanttTimeAxisPane extends BasicScrollPane { Component[][] components = new Component[][]{ new Component[]{createConditionConfigPane()}, - new Component[]{new JSeparator()}, new Component[]{createUpHeadPane()}, - new Component[]{new JSeparator()}, new Component[]{createDownHeadPane()}, }; @@ -50,20 +49,19 @@ public class GanttTimeAxisPane extends BasicScrollPane { protected void layoutContentPane() { leftcontentPane = createContentPane(); - leftcontentPane.setBorder(BorderFactory.createMatteBorder(10, 10, 20, 10, original)); this.add(leftcontentPane); } private Component createDownHeadPane() { downHeadPane = new GanttAxisStylePane(); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Down_Head_Table"),downHeadPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Down_Head_Table"),downHeadPane); } private Component createUpHeadPane() { upHeadPane = new GanttAxisStylePane(); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Up_Head_Table"),upHeadPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Up_Head_Table"),upHeadPane); } private Component createConditionConfigPane() { @@ -77,6 +75,7 @@ public class GanttTimeAxisPane extends BasicScrollPane { double[] col = {p, f}; Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Zoom"), SwingConstants.RIGHT), timeZoom}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Initial_Level"), SwingConstants.RIGHT), initialLevel}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Weekend_Tooltip"), SwingConstants.RIGHT), weekendTooltip} @@ -84,7 +83,7 @@ public class GanttTimeAxisPane extends BasicScrollPane { JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); - return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Condition_Config"),panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Condition_Config"),panel); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java index 699710595..949024e68 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java @@ -41,10 +41,9 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane { double[] col = {f}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createGanntStylePane()}, - new Component[]{new JSeparator()}, new Component[]{createLinkLinePane()}, - new Component[]{new JSeparator()}, new Component[]{createMarkerPane()} }; @@ -52,13 +51,20 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane { return contentPane; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + } + private JPanel createGanntStylePane(){ seriesNewLine = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); JPanel panel = new JPanel(new BorderLayout(5, 0)); panel.add(new UILabel(Inter.getLocText("Plugin-ChartF_Series_New_Line")), BorderLayout.WEST); panel.add(seriesNewLine, BorderLayout.CENTER); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Style"), panel); + JPanel ganntStylePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Style"), panel); + panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); + return ganntStylePane; } private JPanel createLinkLinePane(){ @@ -76,7 +82,9 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane { }; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Link_Line"), panel); + JPanel linkLinePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Link_Line"), panel); + panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); + return linkLinePane; } //标记点类型 @@ -92,7 +100,7 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane { return new VanChartImageMarkerWithoutWidthAndHeightPane(); } }; - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Gannt_Marker"), markerPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Gannt_Marker"), markerPane); } @Override 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 d754cfd97..1a2f708c7 100644 --- a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java @@ -56,6 +56,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { double[] columnSize = {f}; double[] rowSize = {p,p,p,p,p,p}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createGaugeLayoutPane()}, new Component[]{createGaugeStylePane(rowSize, new double[]{p,f})}, new Component[]{createGaugeBandsPane()} @@ -64,15 +65,21 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + } + private JPanel createGaugeLayoutPane() { gaugeLayout = new UIButtonGroup(new String[]{Inter.getLocText("FR-Chart-Direction_Horizontal"), Inter.getLocText("FR-Chart-Direction_Vertical")}); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("PageSetup-Orientation"),gaugeLayout); gaugeLayout.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { changeLabelPosition(); } }); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart_Layout"), gaugeLayout); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart_Layout"), panel); } private void changeLabelPosition() { @@ -113,29 +120,33 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { case RING: initRotate(); return new Component[][]{ + new Component[]{null, null}, getPaneBackgroundColor(), getInnerPaneBackgroundColor(), - new Component[]{createRadiusPane(), null} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} }; case SLOT: return new Component[][]{ + new Component[]{null, null}, getNeedleColor(), getSlotBackgroundColor(), - new Component[]{createRadiusPane(), null} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} }; case THERMOMETER: return new Component[][]{ + new Component[]{null, null}, getNeedleColor(), getSlotBackgroundColor(), - new Component[]{createRadiusPane(), null} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} }; default: return new Component[][]{ + new Component[]{null, null}, getHingeColor(), getHingeBackgroundColor(), getNeedleColor(), getPaneBackgroundColor(), - new Component[]{createRadiusPane(), null} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} }; } } @@ -181,7 +192,8 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createGaugeBandsPane() { colorPickerPane = new ColorPickerPaneWithFormula("meterString"); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Range"), colorPickerPane); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane("",colorPickerPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Range"), panel); } diff --git a/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java index 7e6f3edd1..4d0e31a2d 100644 --- a/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java @@ -85,7 +85,6 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane{ Component[][] components = new Component[][]{ new Component[]{createHeatPointStylePane()}, - new Component[]{new JSeparator()}, new Component[]{createOpacityPane()} }; @@ -106,9 +105,9 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Heat_Map_Blur")), blur, new UILabel("%")} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Style_Name"), panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Style_Name"), panel); } @@ -126,9 +125,9 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Max")), maxOpacity} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), panel); } diff --git a/designer_chart/src/com/fr/plugin/chart/line/VanChartLineSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/line/VanChartLineSeriesPane.java index 3868d9056..003a313e4 100644 --- a/designer_chart/src/com/fr/plugin/chart/line/VanChartLineSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/line/VanChartLineSeriesPane.java @@ -26,13 +26,11 @@ public class VanChartLineSeriesPane extends VanChartAbstractPlotSeriesPane{ double[] col = {f}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createLineTypePane()}, - new Component[]{new JSeparator()}, new Component[]{createMarkerPane()}, - new Component[]{new JSeparator()}, new Component[]{createStackedAndAxisPane()}, new Component[]{createLargeDataModelPane()}, - new Component[]{new JSeparator()}, new Component[]{createTrendLinePane()}, }; @@ -40,4 +38,9 @@ public class VanChartLineSeriesPane extends VanChartAbstractPlotSeriesPane{ return contentPane; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + } + } \ No newline at end of file diff --git a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java index e94328ace..079ad9d1a 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java @@ -152,6 +152,22 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { } } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + if (getFillStylePane() != null){ + panel.add(getFillStylePane(), BorderLayout.NORTH); + } + mapType = ((VanChartMapPlot) plot).getAllLayersMapType(); + switch (mapType) { + case AREA: + panel.add(createNullValueColorPane(), BorderLayout.CENTER); + panel.add(createAlphaPane(), BorderLayout.SOUTH); + case POINT: + panel.add(createPointAlphaPane(), BorderLayout.CENTER); + } + } + + protected JPanel createAreaPane() { borderWithAlphaPane = new VanChartBorderWithAlphaPane(); @@ -161,11 +177,8 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { double[] col = {f}; Component[][] components = new Component[][]{ - new Component[]{borderWithAlphaPane}, - new Component[]{new JSeparator()}, - new Component[]{createNullValueColorPane()}, - new Component[]{new JSeparator()}, - new Component[]{createAlphaPane()} + new Component[]{getColorPane()}, + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"), borderWithAlphaPane)}, }; return TableLayoutHelper.createTableLayoutPane(components, row, col); @@ -174,7 +187,7 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createNullValueColorPane() { nullValueColorBox = new ColorSelectBox(80); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_NULL_Value_Color"), nullValueColorBox); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_NULL_Value_Color"), nullValueColorBox); } private JPanel createPointPane() { @@ -185,12 +198,9 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { double[] col = {f}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createMarkerComPane()}, - new Component[]{new JSeparator()}, - new Component[]{createPointAlphaPane()}, - new Component[]{new JSeparator()}, new Component[]{createLargeDataModelPane()}, - new Component[]{new JSeparator()}, new Component[]{createPointEffectPane()}, }; @@ -206,10 +216,9 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { curvePane = new VanChartCurvePane(); Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createCurvePane()}, - new Component[]{new JSeparator()}, new Component[]{createLineMapLargeDataModelPane()}, - new Component[]{new JSeparator()}, new Component[]{createAnimationPane()} }; @@ -224,28 +233,29 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { checkLineMapLarge(); } }); - return createLargeDataModelPane(lineMapLargeDataModelGroup); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Large_Model"), lineMapLargeDataModelGroup); + return createLargeDataModelPane(panel); } private Component createCurvePane() { curvePane = new VanChartCurvePane(); - return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Curve"), curvePane, 20); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Curve"), curvePane); } private Component createAnimationPane() { lineMapEffectPane = new VanChartLineMapEffectPane(); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Line_Map_Animation"), lineMapEffectPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), lineMapEffectPane); } //不透明度 private JPanel createPointAlphaPane() { pointAlphaPane = new UINumberDragPane(0, 100); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), pointAlphaPane); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Alpha"), pointAlphaPane); } private JPanel createPointEffectPane() { pointEffectPane = new VanChartEffectPane(); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Flash_Animation"), pointEffectPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), pointEffectPane); } private JPanel createMarkerComPane() { @@ -277,14 +287,15 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { JPanel northPane = new JPanel(new BorderLayout()); northPane.add(markerTypeCom, BorderLayout.CENTER); - UILabel label = new UILabel(Inter.getLocText("Chart-Style_Name") + ":", SwingConstants.LEFT); + UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_Point_Style"), SwingConstants.LEFT); label.setPreferredSize(new Dimension(44, 20)); northPane.add(label, BorderLayout.WEST); + northPane.setBorder(BorderFactory.createEmptyBorder(10,0,0,0)); JPanel markerPane = new JPanel(new BorderLayout(0, 6)); markerPane.add(northPane, BorderLayout.NORTH); markerPane.add(cardPane, BorderLayout.CENTER); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Marker"), markerPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Marker"), markerPane); } private JPanel createCustomPane(Plot plot) { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/style/label/VanChartMapLabelPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/style/label/VanChartMapLabelPane.java index 53eefb2c4..670675d8b 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/style/label/VanChartMapLabelPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/style/label/VanChartMapLabelPane.java @@ -3,8 +3,8 @@ package com.fr.plugin.chart.map.designer.style.label; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; -import com.fr.design.dialog.BasicScrollPane; import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.label.VanChartPlotLabelPane; import com.fr.plugin.chart.map.VanChartMapPlot; @@ -17,7 +17,7 @@ import java.awt.*; /** * Created by Mitisky on 16/5/20. */ -public class VanChartMapLabelPane extends BasicScrollPane { +public class VanChartMapLabelPane extends AbstractVanChartScrollPane { private VanChartPlotLabelPane areaLabelPane; private VanChartPlotLabelPane pointLabelPane; diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java index b76270efb..b4e206b3d 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java @@ -3,8 +3,8 @@ package com.fr.plugin.chart.map.designer.style.tooltip; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; -import com.fr.design.dialog.BasicScrollPane; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.plugin.chart.map.VanChartMapPlot; @@ -19,7 +19,7 @@ import java.awt.*; /** * Created by Mitisky on 16/5/20. */ -public class VanChartMapTooltipPane extends BasicScrollPane { +public class VanChartMapTooltipPane extends AbstractVanChartScrollPane { private VanChartPlotTooltipPane areaTooltipPane; private VanChartPlotTooltipPane pointTooltipPane; private VanChartPlotTooltipPane lineTooltipPane; diff --git a/designer_chart/src/com/fr/plugin/chart/map/line/VanChartCurvePane.java b/designer_chart/src/com/fr/plugin/chart/map/line/VanChartCurvePane.java index 2aa92a8a9..1538077ec 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/line/VanChartCurvePane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/line/VanChartCurvePane.java @@ -43,6 +43,7 @@ public class VanChartCurvePane extends BasicBeanPane{ private Component[][] getUseComponent() { return new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Line_Width")+":"), lineWidth}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Bedding")+":"),bending}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha") + ":"), lineAlphaPane} 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 1f398dcaf..2c23c5088 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 @@ -5,6 +5,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.plugin.chart.base.AttrEffect; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.marker.VanChartImageMarkerPane; import com.fr.plugin.chart.designer.style.series.VanChartEffectPane; import com.fr.plugin.chart.map.line.condition.AttrLineEffect; @@ -27,6 +28,7 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{ public VanChartLineMapEffectPane() { super(true); + this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Line_Map_Animation"), enabledButton), BorderLayout.NORTH); } protected JPanel createContentPane() { @@ -49,7 +51,7 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{ private Component createAnimationSelectPane() { JPanel panel = new JPanel(new BorderLayout(5, 0)); - panel.add(new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type")+":"), BorderLayout.WEST); + panel.add(new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type")), BorderLayout.WEST); panel.add(animationType, BorderLayout.CENTER); return panel; } diff --git a/designer_chart/src/com/fr/plugin/chart/multilayer/style/VanChartMultiPieSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/multilayer/style/VanChartMultiPieSeriesPane.java index 6e562eb7f..cd7739a69 100644 --- a/designer_chart/src/com/fr/plugin/chart/multilayer/style/VanChartMultiPieSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/multilayer/style/VanChartMultiPieSeriesPane.java @@ -7,7 +7,6 @@ import com.fr.design.gui.ispinner.UISpinner; 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; import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot; @@ -35,8 +34,8 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane { double[] columnSize = {f}; double[] rowSize = {p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createSeriesStylePane(rowSize, new double[]{p,f})}, - new Component[]{new JSeparator()}, new Component[]{createBorderPane()}, }; @@ -55,16 +54,22 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane { Inter.getLocText("Plugin-ChartF_Close")}); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Gradual_Level") + ":"),gradualLevel}, - 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_Drill") + ":", SwingConstants.RIGHT),supportDrill}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation") + ":", SwingConstants.RIGHT),supportRotation} + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Gradual_Level") ),gradualLevel}, + 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_Drill")),supportDrill}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); + } + + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); } protected void populatePieAttr() { 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 0184f1fe8..d84f3b203 100644 --- a/designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java @@ -39,13 +39,8 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane { double f = TableLayout.FILL; double[] columnSize = {f}; double[] rowSize = {p,p,p,p,p}; - JPanel panel = new JPanel(new BorderLayout()); - panel.add(getFillStylePane(), BorderLayout.NORTH); - panel.add(createStylePane(), BorderLayout.CENTER); - JPanel ColorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel); - panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); Component[][] components = new Component[][]{ - new Component[]{ColorPane}, + new Component[]{getColorPane()}, new Component[]{createSeriesStylePane(rowSize, new double[]{p,f})}, new Component[]{createBorderPane()}, }; 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 e448b6167..1facdf2d1 100644 --- a/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java @@ -41,29 +41,35 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane { private Component[][] getPaneComponents() { if(plot instanceof VanChartRadarPlot && ((VanChartRadarPlot)plot).isStackChart()) { return new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createRadarTypePane()}, - new Component[]{new JSeparator()}, new Component[]{createBorderPane()}, - new Component[]{new JSeparator()}, new Component[]{createAlphaPane()} }; } return new Component[][] { + new Component[]{getColorPane()}, new Component[]{createRadarTypePane()}, - new Component[]{new JSeparator()}, new Component[]{createLineTypePane()}, - new Component[]{new JSeparator()}, new Component[]{createMarkerPane()}, - new Component[]{new JSeparator()}, new Component[]{createAreaFillColorPane()} }; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + if(((VanChartRadarPlot)plot).isStackChart()) { + panel.add(createAlphaPane(), BorderLayout.CENTER); + } + } + private JPanel createRadarTypePane() { radarType = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Circle"), Inter.getLocText("Plugin-ChartF_Polygonal")}, new String[]{RadarType.CIRCLE.getType(), RadarType.POLYGON.getType()}); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Chart-Style_Present"), radarType); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Shape"), radarType); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Style_Present"), panel); } protected VanChartLineTypePane getLineTypePane() { diff --git a/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPane.java b/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPane.java index 780392e1d..c5c254ee3 100644 --- a/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPane.java +++ b/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPane.java @@ -25,7 +25,7 @@ public class SectionIntervalConfigPane extends MapColorPickerPaneWithFormula { new Component[]{null,null}, new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"FR-Chart-Color_Subject", "FR-Chart-Color_Color"})), getFillStyleCombox()}, new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), getRegionNumPane()}, - new Component[]{new BoldFontTextLabel("Plugin-ChartF_RangeNum"),getDesignTypeButtonGroup()}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_RangeNum")),getDesignTypeButtonGroup()}, }; } 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 a922cda54..90617b6cd 100644 --- a/designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java @@ -34,15 +34,11 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane{ double[] col = {f}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createLineTypePane()}, - new Component[]{new JSeparator()}, new Component[]{createMarkerPane()}, - new Component[]{new JSeparator()}, new Component[]{createStackedAndAxisPane()}, - new Component[]{createAlphaPane()}, - new Component[]{new JSeparator()}, new Component[]{createLargeDataModelPane()}, - new Component[]{new JSeparator()}, new Component[]{createTrendLinePane()}, }; @@ -50,6 +46,12 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane{ return contentPane; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + panel.add(createAlphaPane(), BorderLayout.CENTER); + } + @Override //堆积和坐标轴设置(自定义柱形图等用到) protected JPanel createStackedAndAxisPane() { diff --git a/designer_chart/src/com/fr/plugin/chart/scatter/component/VanChartScatterLineTypePane.java b/designer_chart/src/com/fr/plugin/chart/scatter/component/VanChartScatterLineTypePane.java index 1593e99bc..36c51e05d 100644 --- a/designer_chart/src/com/fr/plugin/chart/scatter/component/VanChartScatterLineTypePane.java +++ b/designer_chart/src/com/fr/plugin/chart/scatter/component/VanChartScatterLineTypePane.java @@ -4,9 +4,9 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; -import com.fr.plugin.chart.type.LineStyle; import com.fr.plugin.chart.base.VanChartAttrLine; import com.fr.plugin.chart.designer.component.VanChartLineTypePane; +import com.fr.plugin.chart.type.LineStyle; import com.fr.stable.Constants; import javax.swing.*; @@ -26,10 +26,11 @@ public class VanChartScatterLineTypePane extends VanChartLineTypePane { @Override protected JPanel createContentPane(double p, double f) { - double[] row = {p,p}; + double[] row = {p,p,p}; double[] col = {p,f}; Component[][] components = new Component[][]{ + new Component[]{null,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), lineWidth}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Style_Present")), lineStyle}, }; diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/StructureNodeStylePane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/StructureNodeStylePane.java index 267641e6e..58a740c40 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/StructureNodeStylePane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/StructureNodeStylePane.java @@ -9,9 +9,9 @@ import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.plugin.chart.base.AttrNode; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.background.VanChartMarkerBackgroundPane; import javax.swing.*; @@ -31,6 +31,7 @@ public class StructureNodeStylePane extends BasicBeanPane { private UISpinner nodeBorderWidth; private VanChartMarkerBackgroundPane nodeBorderColor; private UINumberDragPane nodeOpacity; + private JPanel nodeRadiusPane; public StructureNodeStylePane() { double p = TableLayout.PREFERRED; @@ -45,15 +46,20 @@ public class StructureNodeStylePane extends BasicBeanPane { nodeBorderColor = new VanChartMarkerBackgroundPane(); nodeOpacity = new UINumberDragPane(0,100); + JPanel jPanel = new JPanel(new BorderLayout()); + jPanel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Node_Radius"), nodeRadiusType), BorderLayout.NORTH); + nodeRadiusPane = TableLayout4VanChartHelper.createGapTableLayoutPane(" ", nodeRadius); + jPanel.add(nodeRadiusPane, BorderLayout.CENTER); + Component[][] components1 = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Radius")), nodeRadiusType}, - new Component[]{null, nodeRadius}, + new Component[]{null, null}, + new Component[]{jPanel, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Border_Width")), nodeBorderWidth}, new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Border_Color")), nodeBorderColor}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), nodeOpacity} }; - JPanel panel1 = TableLayoutHelper.createTableLayoutPane(components1, rowSize, columnSize); + JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(components1, rowSize, columnSize); useImage = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); @@ -91,7 +97,7 @@ public class StructureNodeStylePane extends BasicBeanPane { } private void checkImagePane() { - GUICoreUtils.setEnabled(imagePane, useImage.getSelectedIndex() == 0); + imagePane.setVisible(useImage.getSelectedIndex() == 0); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java index f6487ffea..029599989 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java @@ -29,6 +29,7 @@ public class VanChartStructureSeriesPane extends VanChartAbstractPlotSeriesPane private UIButtonGroup linkWidthType; private UISpinner linkWidth; private UINumberDragPane linkOpacity; + private JPanel linkWidthPane; private StructureNodeStylePane nodeStylePane; @@ -43,8 +44,8 @@ public class VanChartStructureSeriesPane extends VanChartAbstractPlotSeriesPane double[] columnSize = {f}; double[] rowSize = {p,p,p}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createLinkPane()}, - new Component[]{new JSeparator()}, new Component[]{createNodePane()} }; @@ -53,6 +54,11 @@ public class VanChartStructureSeriesPane extends VanChartAbstractPlotSeriesPane return contentPane; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + } + private JPanel createLinkPane() { linkColor = new ColorSelectBox(100); @@ -74,25 +80,30 @@ public class VanChartStructureSeriesPane extends VanChartAbstractPlotSeriesPane double[] columnSize = {p,f}; double[] rowSize = {p,p,p,p}; + JPanel jPanel = new JPanel(new BorderLayout()); + jPanel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Designer-Tree_Width")+" ", linkWidthType), BorderLayout.NORTH); + linkWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(" ", linkWidth); + jPanel.add(linkWidthPane, BorderLayout.CENTER); + Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), linkColor}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer-Tree_Width")), linkWidthType}, - new Component[]{null, linkWidth}, + new Component[]{jPanel, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), linkOpacity} }; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_Link"), panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Link"), panel); } private JPanel createNodePane() { nodeStylePane = new StructureNodeStylePane(); - return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_Node"), nodeStylePane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Node"), nodeStylePane); } private void checkWidth() { - linkWidth.setEnabled(linkWidthType.getSelectedIndex() == 1); + linkWidthPane.setVisible(linkWidthType.getSelectedIndex() == 1); } @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 4e93d1e32..7f5597d32 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 @@ -28,11 +28,13 @@ public class VanChartTreeMapSeriesPane extends VanChartMultiPieSeriesPane { Inter.getLocText("Plugin-ChartF_Close")}); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Drill") + ":", SwingConstants.RIGHT),supportDrill}, + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Drill")),supportDrill}, }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, new double[]{TableLayout.PREFERRED}, col); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); + double p = TableLayout.PREFERRED; + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, new double[]{p,p}, col); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); } protected void populatePieAttr() { diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java index 2ee92f8c4..d7cf3f883 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java @@ -57,9 +57,8 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane double[] columnSize = {f}; double[] rowSize = {p,p,p}; Component[][] components = new Component[][]{ + new Component[]{getColorPane()}, new Component[]{createWordCloudStylePane()}, - new Component[]{new JSeparator()}, - new Component[]{createCloudShapePane()} }; contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -67,6 +66,12 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane return contentPane; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(getFillStylePane(), BorderLayout.NORTH); + panel.add(createAlphaPane(), BorderLayout.CENTER); + } + private JPanel createWordCloudStylePane(){ double labelSize = LABEL_SIZE; double p = TableLayout.PREFERRED; @@ -102,10 +107,15 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane }; fontPanel = TableLayoutHelper.createTableLayoutPane(fontComps,centerR,centerC); - JPanel panel = new JPanel(new BorderLayout(0,4)); - panel.add(centerPanel, BorderLayout.NORTH); - panel.add(northPanel, BorderLayout.CENTER); - panel.add(fontPanel, BorderLayout.SOUTH); + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] components = new Component[][]{ + new Component[]{createCloudShapePane()}, + new Component[]{centerPanel}, + new Component[]{northPanel}, + new Component[]{fontPanel}, + + }; defineFontSize.addItemListener(new ItemListener() { @Override @@ -114,7 +124,9 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane } }); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Style_Name"), panel); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Style_Name"), panel); } private JPanel createCloudShapePane() { @@ -149,7 +161,7 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane } }); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Shape"), panel); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Shape"), panel); } private void checkImagePane() {