Browse Source

坐标轴系列等面板

master
mengao 7 years ago
parent
commit
425efd12c7
  1. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  2. 40
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  3. 4
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java
  4. 10
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartAttrPane.java
  5. 8
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartTabPane.java
  6. 4
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartBeautyPane.java
  7. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartGradientPane.java
  8. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithOutTypeSelect.java
  9. 9
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  10. 110
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java
  11. 50
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java
  12. 19
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java
  13. 24
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  14. 3
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  15. 6
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  16. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaBackgroundPane.java
  17. 18
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  18. 35
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  19. 10
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java
  20. 7
      designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java
  21. 22
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java

4
designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -4,6 +4,7 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -80,7 +81,8 @@ public class NormalChartDataPane extends DataContentsPane {
}; };
contentPane.add(dataPane, BorderLayout.CENTER); contentPane.add(dataPane, BorderLayout.CENTER);
dataPane.setBorder(BorderFactory.createEmptyBorder(10 ,0, 0, 0)); dataPane.setBorder(BorderFactory.createEmptyBorder(10 ,0, 0, 0));
return contentPane; UIExpandablePane advanceExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 280, 20, contentPane);
return advanceExpandablePane;
} }
@Override @Override

40
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -1,27 +1,11 @@
package com.fr.design.mainframe.chart.gui.style.series; package com.fr.design.mainframe.chart.gui.style.series;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.chart.base.AreaColor; import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils; import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.chartglyph.MapHotAreaColor; import com.fr.chart.chartglyph.MapHotAreaColor;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
@ -31,12 +15,20 @@ import com.fr.design.gui.ipoppane.PopupHider;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.design.style.color.ColorControlWindow; import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver { public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10; private static final int MARGIN_TOP = 10;
@ -105,11 +97,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
Component[][] components = createComponents(); Component[][] components = createComponents();
upControlPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); upControlPane = TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize);
this.textFieldList = this.getTextFieldList(); this.textFieldList = this.getTextFieldList();
this.textGroup = new TextFieldGroupPane(); this.textGroup = new TextFieldGroupPane();
@ -122,6 +113,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
refreshGroupPane(colors, getValueArray(number)); refreshGroupPane(colors, getValueArray(number));
} }
protected double[] getRowSIze () {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p};
}
protected UIButtonGroup<Integer> getDesignTypeButtonGroup(){ protected UIButtonGroup<Integer> getDesignTypeButtonGroup(){
return designTypeButtonGroup; return designTypeButtonGroup;
} }

4
designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java

@ -50,9 +50,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createStylePane()}, new Component[]{createStylePane()},
new Component[]{stylePane == null ? null : new JSeparator()},
new Component[]{createSeriesStylePane(new double[]{p,p}, new double[]{p,f})}, new Component[]{createSeriesStylePane(new double[]{p,p}, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createBorderPane()}, new Component[]{createBorderPane()},
new Component[]{createStackedAndAxisPane()}, new Component[]{createStackedAndAxisPane()},
new Component[]{createTrendLinePane()}, new Component[]{createTrendLinePane()},
@ -113,7 +111,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
checkImagePane(); checkImagePane();
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), borderPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), borderPane);
} }
private void checkAll() { private void checkAll() {

10
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartAttrPane.java

@ -0,0 +1,10 @@
package com.fr.plugin.chart.designer;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
/**
* Created by mengao on 2017/8/11.
*/
public abstract class AbstractVanChartAttrPane extends AbstractChartAttrPane {
}

8
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartTabPane.java

@ -0,0 +1,8 @@
package com.fr.plugin.chart.designer;
/**
* Created by mengao on 2017/8/13.
*/
public abstract class AbstractVanChartTabPane<T> extends AbstractVanChartScrollPane<T> {
public abstract String title4PopupWindow();
}

4
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartBeautyPane.java

@ -4,8 +4,8 @@ import com.fr.chart.base.ChartConstants;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -27,7 +27,7 @@ public class VanChartBeautyPane extends BasicBeanPane<Integer> {
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{styleBox}, new Component[]{styleBox},
} ; } ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Plugin-Chart_Style"}, components, rowSize, columnSize); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER); this.add(panel,BorderLayout.CENTER);
} }

3
designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartGradientPane.java

@ -44,8 +44,7 @@ public class VanChartGradientPane extends GradientBackgroundQuickPane {
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{gradientBar, null}, new Component[]{gradientBar, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Gradient_Direction") + ":")}, new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Gradient_Direction")),directionPane},
new Component[]{directionPane}
}; };
JPanel Gradient = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel Gradient = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

4
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithOutTypeSelect.java

@ -1,8 +1,8 @@
package com.fr.plugin.chart.designer.style.axis; package com.fr.plugin.chart.designer.style.axis;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*; import javax.swing.*;
@ -10,7 +10,7 @@ import javax.swing.*;
/** /**
* 无类型选择y轴数值轴 * 无类型选择y轴数值轴
*/ */
public class VanChartAxisScrollPaneWithOutTypeSelect extends BasicScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{ public class VanChartAxisScrollPaneWithOutTypeSelect extends AbstractVanChartScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{
private static final long serialVersionUID = 7700110757493668325L; private static final long serialVersionUID = 7700110757493668325L;
protected VanChartBaseAxisPane axisPane; protected VanChartBaseAxisPane axisPane;

9
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -2,17 +2,17 @@ package com.fr.plugin.chart.designer.style.axis;
import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.Axis;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.type.AxisType;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartTimeAxis; import com.fr.plugin.chart.attr.axis.VanChartTimeAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis; import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.AxisType;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -22,7 +22,7 @@ import java.util.List;
/** /**
* 带有坐标轴类型选择控件可选类型分类时间数值 * 带有坐标轴类型选择控件可选类型分类时间数值
*/ */
public class VanChartAxisScrollPaneWithTypeSelect extends BasicScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScrollPane<VanChartAxis> implements VanChartXYAxisPaneInterface{
private static final long serialVersionUID = -8462279689749700666L; private static final long serialVersionUID = -8462279689749700666L;
private UIComboBoxPane axisTypePane; private UIComboBoxPane axisTypePane;
private VanChartTimeAxisPane timeAxisPane; private VanChartTimeAxisPane timeAxisPane;
@ -56,7 +56,8 @@ public class VanChartAxisScrollPaneWithTypeSelect extends BasicScrollPane<VanCha
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(0,6)); this.setLayout(new BorderLayout(0,6));
JPanel northPane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_type"),jcb); JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_type"),jcb);
northPane.setBorder(BorderFactory.createEmptyBorder(0,10,10,10));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

110
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -21,12 +21,12 @@ import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.type.AxisTickLineType;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartHtmlLabelPane; import com.fr.plugin.chart.designer.component.VanChartHtmlLabelPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.type.AxisTickLineType;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -54,6 +54,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected UINumberDragPane labelTextRotation; protected UINumberDragPane labelTextRotation;
protected UIButtonGroup<Integer> labelGapStyle; protected UIButtonGroup<Integer> labelGapStyle;
protected UITextField labelGapValue; protected UITextField labelGapValue;
protected JPanel labelPanel;
protected LineComboBox axisLineStyle; protected LineComboBox axisLineStyle;
protected ColorSelectBox axisLineColor; protected ColorSelectBox axisLineColor;
@ -61,10 +63,11 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected UIButtonGroup<AxisTickLineType> secondTick; protected UIButtonGroup<AxisTickLineType> secondTick;
protected UIButtonGroup<Integer> position; protected UIButtonGroup<Integer> position;
protected UIToggleButton reversed; protected UIButtonGroup<Boolean> reversed;
protected UIButtonGroup<Integer> axisLimitSize; protected UIButtonGroup<Integer> axisLimitSize;
protected UISpinner maxProportion; protected UISpinner maxProportion;
protected JPanel maxProportionPane;
protected UIButtonGroup valueFormatStyle; protected UIButtonGroup valueFormatStyle;
protected FormatPane valueFormat; protected FormatPane valueFormat;
@ -93,19 +96,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p, p, p, p, p, p, p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null},
new Component[]{createTitlePane(new double[]{p, p, p, p, p}, columnSize, isXAxis),null}, new Component[]{createLabelPane(new double[]{p, p}, columnSize), null},
new Component[]{new JSeparator(),null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},
new Component[]{new JSeparator(),null}, new Component[]{createDisplayStrategy(new double[]{p, p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createDisplayStrategy(new double[]{p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueStylePane(), null}, new Component[]{createValueStylePane(), null},
}; };
@ -125,15 +122,16 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
titleTextRotation.populateBean(-ROTATION_MAX); titleTextRotation.populateBean(-ROTATION_MAX);
} }
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{titleContent,null}, new Component[]{null,null},
new Component[]{titleAlignPane,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),titleContent},
new Component[]{titleUseHtml,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Position")),titleAlignPane},
new Component[]{null,titleUseHtml},
new Component[]{titleTextAttrPane,null}, new Component[]{titleTextAttrPane,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")),titleTextRotation}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")),titleTextRotation},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, panel);
} }
private UIButtonGroup<Integer> getXAxisTitleAlignPane(){ private UIButtonGroup<Integer> getXAxisTitleAlignPane(){
@ -168,11 +166,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
JPanel gapPanel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col); JPanel gapPanel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{showLabel,null},
new Component[]{labelTextAttrPane, null}, new Component[]{labelTextAttrPane, null},
new Component[]{gapPanel,null}, new Component[]{gapPanel,null},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AxisLabel"),showLabel);
labelPanel = TableLayoutHelper.createTableLayoutPane(components, row, col);
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
showLabel.addActionListener(new ActionListener() { showLabel.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -185,7 +185,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
checkLabelGapValuePane(); checkLabelGapValuePane();
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel); JPanel jPanel = new JPanel(new BorderLayout());
jPanel.add(showLabelPane, BorderLayout.NORTH);
jPanel.add(labelPanel, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel);
} }
protected JPanel createLineStylePane(double[] row, double[] col){ protected JPanel createLineStylePane(double[] row, double[] col){
@ -197,11 +200,12 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
secondTick = new UIButtonGroup<AxisTickLineType>(strings, values); secondTick = new UIButtonGroup<AxisTickLineType>(strings, values);
JPanel panel = TableLayoutHelper.createTableLayoutPane(getLineStylePaneComponents(), row, col); JPanel panel = TableLayoutHelper.createTableLayoutPane(getLineStylePaneComponents(), row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_AxisLineStyle"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AxisLineStyle"), panel);
} }
protected Component[][] getLineStylePaneComponents() { protected Component[][] getLineStylePaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{null,null} ,
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_type")),axisLineStyle} , new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_type")),axisLineStyle} ,
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),axisLineColor}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),axisLineColor},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MainGraduationLine")),mainTick}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MainGraduationLine")),mainTick},
@ -211,14 +215,15 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected JPanel createAxisPositionPane(double[] row, double[] col, boolean isXAxis){ protected JPanel createAxisPositionPane(double[] row, double[] col, boolean isXAxis){
position = new UIButtonGroup<Integer>(getAxisPositionNameArray(isXAxis), getAxisPositionValueArray(isXAxis)); position = new UIButtonGroup<Integer>(getAxisPositionNameArray(isXAxis), getAxisPositionValueArray(isXAxis));
reversed = new UIToggleButton(Inter.getLocText("Plugin-ChartF_OpenAxisReversed")); reversed = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{position, null}, new Component[]{null, null},
new Component[]{reversed,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AxisLabel_Position")),position},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_AxisReversed")),reversed},
} ; } ;
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel);
} }
private String[] getAxisPositionNameArray(boolean isXAxis){ private String[] getAxisPositionNameArray(boolean isXAxis){
@ -240,11 +245,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected JPanel createDisplayStrategy(double[] row, double[] col){ protected JPanel createDisplayStrategy(double[] row, double[] col){
maxProportion = new UISpinner(0,100,1,30); maxProportion = new UISpinner(0,100,1,30);
axisLimitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_LimitAreaSize"),Inter.getLocText("Plugin-ChartF_NotLimitAreaSize")}); axisLimitSize = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_LimitAreaSize"),Inter.getLocText("Plugin-ChartF_NotLimitAreaSize")});
Component[][] components = new Component[][]{
new Component[]{axisLimitSize,null}, JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),axisLimitSize);
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AxisProportion")+":"),maxProportion}, maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion);
}; maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col); JPanel panel = new JPanel(new BorderLayout());
panel.add(limitSizePane, BorderLayout.NORTH);
panel.add(maxProportionPane, BorderLayout.CENTER);
axisLimitSize.addActionListener(new ActionListener() { axisLimitSize.addActionListener(new ActionListener() {
@Override @Override
@ -253,7 +260,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel);
} }
protected JPanel createValueStylePane(){ protected JPanel createValueStylePane(){
@ -269,9 +276,17 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
centerPane.add(valueFormat,Inter.getLocText("Plugin-ChartF_Common")); centerPane.add(valueFormat,Inter.getLocText("Plugin-ChartF_Common"));
centerPane.add(htmlLabelPane, Inter.getLocText("Plugin-ChartF_Custom")); centerPane.add(htmlLabelPane, Inter.getLocText("Plugin-ChartF_Custom"));
JPanel contentPane = new JPanel(new BorderLayout(0, 4)); double p = TableLayout.PREFERRED;
contentPane.add(valueFormatStyle, BorderLayout.NORTH); double f = TableLayout.FILL;
contentPane.add(centerPane, BorderLayout.CENTER); 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_AxisLabel_Format"), SwingConstants.LEFT), valueFormatStyle},
new Component[]{null, centerPane},
};
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
valueFormatStyle.addActionListener(new ActionListener() { valueFormatStyle.addActionListener(new ActionListener() {
@Override @Override
@ -280,7 +295,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Use_Format"), contentPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Format"), contentPane);
} }
protected FormatPane createFormatPane(){ protected FormatPane createFormatPane(){
@ -311,17 +326,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkLabelPane() { protected void checkLabelPane() {
if(showLabel != null){ if(showLabel != null){
boolean enabled = showLabel.getSelectedIndex() == 0; boolean enabled = showLabel.getSelectedIndex() == 0;
if(labelTextAttrPane != null){ if(labelPanel != null){
labelTextAttrPane.setEnabled(enabled); labelPanel.setVisible(enabled);
}
if(labelTextRotation != null){
labelTextRotation.setEnabled(enabled);
}
if(labelGapValue != null){
labelGapValue.setEnabled(enabled);
}
if(labelGapStyle != null){
labelGapStyle.setEnabled(enabled);
} }
if(enabled){ if(enabled){
checkLabelGapValuePane(); checkLabelGapValuePane();
@ -329,7 +335,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
} }
} }
private void checkLabelGapValuePane() { protected void checkLabelGapValuePane() {
if(labelGapValue != null && labelGapStyle != null){ if(labelGapValue != null && labelGapStyle != null){
labelGapValue.setEnabled(labelGapStyle.getSelectedIndex() == 1); labelGapValue.setEnabled(labelGapStyle.getSelectedIndex() == 1);
} }
@ -337,8 +343,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
//检查最大显示占比是否可用 //检查最大显示占比是否可用
private void checkMaxProPortionUse() { private void checkMaxProPortionUse() {
if(maxProportion != null && axisLimitSize != null){ if(maxProportionPane != null && axisLimitSize != null){
maxProportion.setEnabled(axisLimitSize.getSelectedIndex() == 0 && axisLimitSize.isEnabled()); maxProportionPane.setVisible(axisLimitSize.getSelectedIndex() == 0 && axisLimitSize.isEnabled());
} }
} }
@ -453,7 +459,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
} }
} }
if(reversed != null){ if(reversed != null){
reversed.setSelected(axis.hasAxisReversed()); reversed.setSelectedIndex(axis.hasAxisReversed() == true ? 0 : 1);
} }
} }
@ -574,7 +580,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
axis.setPosition(position.getSelectedItem()); axis.setPosition(position.getSelectedItem());
} }
if(reversed != null){ if(reversed != null){
axis.setAxisReversed(reversed.isSelected()); axis.setAxisReversed(reversed.getSelectedItem());
} }
} }

50
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java

@ -10,6 +10,7 @@ import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.gui.date.UIDatePicker; import com.fr.design.gui.date.UIDatePicker;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox; 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.gui.itextfield.UITextField;
import com.fr.design.gui.style.FormatPane; import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -18,12 +19,12 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.DateUtils; import com.fr.general.DateUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.type.TimeType;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartTimeAxis; import com.fr.plugin.chart.attr.axis.VanChartTimeAxis;
import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.type.TimeType;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -57,19 +58,12 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, columnSize, isXAxis),null},
new Component[]{createTitlePane(new double[]{p, p, p, p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueDefinition(),null}, new Component[]{createValueDefinition(),null},
new Component[]{new JSeparator(),null}, new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null}, new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null}, new Component[]{createDisplayStrategy(new double[]{p, p,p}, columnSize),null},
new Component[]{createDisplayStrategy(new double[]{p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueStylePane(),null}, new Component[]{createValueStylePane(),null},
}; };
@ -78,7 +72,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private JPanel createValueDefinition(){ private JPanel createValueDefinition(){
timeMinMaxValuePane = new TimeMinMaxValuePane(); timeMinMaxValuePane = new TimeMinMaxValuePane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), timeMinMaxValuePane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), timeMinMaxValuePane);
} }
@Override @Override
@ -145,38 +139,36 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p};
double[] columnSize = {p, f}; double[] columnSize = {f, p, p};
Component[][] maxMin = {
{minCheckBox, minValueField},
{maxCheckBox, maxValueField},
};
JPanel maxMinPane = TableLayoutHelper.createTableLayoutPane(maxMin, rowSize, columnSize);
JPanel mainTickPane = new JPanel(); JPanel mainTickPane = new JPanel();
mainTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); mainTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
mainTickPane.add(mainTickBox);
mainTickPane.add(mainUnitField); mainTickPane.add(mainUnitField);
mainTickPane.add(mainType); mainTickPane.add(mainType);
JPanel secTickPane = new JPanel(); JPanel secTickPane = new JPanel();
secTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); secTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
secTickPane.add(secondTickBox);
secTickPane.add(secondUnitField); secTickPane.add(secondUnitField);
secTickPane.add(secondType); secTickPane.add(secondType);
Component[][] components = { Component[][] components = {
{maxMinPane, null}, {minCheckBox, null, null},
{mainTickPane, null}, {null, new UILabel(Inter.getLocText("FR-Chart-Data_Min")), minValueField},
{secTickPane, null}, {maxCheckBox, null, null},
{null, new UILabel(Inter.getLocText("FR-Chart-Data_Max")), maxValueField},
{mainTickBox, null, null},
{null, new UILabel(Inter.getLocText("Plugin-ChartF_MainType")), mainTickPane},
{secondTickBox, null, null},
{null, new UILabel(Inter.getLocText("Plugin-ChartF_SecType")), secTickPane},
}; };
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize)); this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize));
} }
private void initMin() { private void initMin() {
// 最小值. // 最小值.
minCheckBox = new UICheckBox(Inter.getLocText("FR-Chart-Data_Min")); minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"}));
Date tmp = null; Date tmp = null;
DateEditor dateEditor = new DateEditor(tmp, true, Inter.getLocText("FR-Designer_Date"), UIDatePicker.STYLE_CN_DATETIME1); DateEditor dateEditor = new DateEditor(tmp, true, Inter.getLocText("FR-Designer_Date"), UIDatePicker.STYLE_CN_DATETIME1);
Editor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula")); Editor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula"));
@ -192,7 +184,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMax() { private void initMax() {
// 最大值 // 最大值
maxCheckBox = new UICheckBox(Inter.getLocText("FR-Chart-Data_Max")); maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"}));
Date tmp = null; Date tmp = null;
DateEditor dateEditor = new DateEditor(tmp, true, Inter.getLocText("FR-Designer_Date"), UIDatePicker.STYLE_CN_DATETIME1); DateEditor dateEditor = new DateEditor(tmp, true, Inter.getLocText("FR-Designer_Date"), UIDatePicker.STYLE_CN_DATETIME1);
Editor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula")); Editor formulaEditor = new FormulaEditor(Inter.getLocText("Plugin-ChartF_Formula"));
@ -208,7 +200,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMain() { private void initMain() {
// 主要刻度单位 // 主要刻度单位
mainTickBox = new UICheckBox(Inter.getLocText("Plugin-ChartF_MainType")); mainTickBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Plugin-ChartF_MainType"}));
mainUnitField = new UITextField(); mainUnitField = new UITextField();
mainUnitField.setPreferredSize(new Dimension(20, 20)); mainUnitField.setPreferredSize(new Dimension(20, 20));
mainUnitField.setEditable(false); mainUnitField.setEditable(false);
@ -226,7 +218,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initSecond() { private void initSecond() {
// 次要刻度单位 // 次要刻度单位
secondTickBox = new UICheckBox(Inter.getLocText("Plugin-ChartF_SecType")); secondTickBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Plugin-ChartF_SecType"}));
secondUnitField = new UITextField(); secondUnitField = new UITextField();
secondUnitField.setPreferredSize(new Dimension(20, 20)); secondUnitField.setPreferredSize(new Dimension(20, 20));
secondUnitField.setEditable(false); secondUnitField.setEditable(false);

19
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java

@ -43,19 +43,12 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null}, new Component[]{createTitlePane(new double[]{p, p, p, p,p,p}, columnSize, isXAxis),null},
new Component[]{createTitlePane(new double[]{p, p, p, p,p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null}, new Component[]{createMinMaxValuePane(new double[]{p, p, p,p}, columnSize),null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null}, new Component[]{createAxisPositionPane(new double[]{p, p,p}, columnSize, isXAxis),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p}, columnSize),null}, new Component[]{createDisplayStrategy(new double[]{p, p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},
new Component[]{new JSeparator(),null},
new Component[]{createDisplayStrategy(new double[]{p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueStylePane(),null}, new Component[]{createValueStylePane(),null},
}; };
@ -64,7 +57,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
protected JPanel createMinMaxValuePane(double[] row, double[] col){ protected JPanel createMinMaxValuePane(double[] row, double[] col){
JPanel panel = createCommenValuePane(row,col); JPanel panel = createCommenValuePane(row,col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), panel);
} }
protected JPanel createCommenValuePane(double[] row, double[] col){ protected JPanel createCommenValuePane(double[] row, double[] col){
initMinMaxValuePane(); initMinMaxValuePane();

24
designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java

@ -15,8 +15,8 @@ import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.designer.style.axis.VanChartValueAxisPane; import com.fr.plugin.chart.designer.style.axis.VanChartValueAxisPane;
import com.fr.plugin.chart.designer.style.axis.component.MinMaxValuePaneWithOutTick; import com.fr.plugin.chart.designer.style.axis.component.MinMaxValuePaneWithOutTick;
import com.fr.plugin.chart.designer.style.axis.component.VanChartMinMaxValuePane; import com.fr.plugin.chart.designer.style.axis.component.VanChartMinMaxValuePane;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.GaugeStyle;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -54,11 +54,8 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
case THERMOMETER: case THERMOMETER:
return new Component[][]{ return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueDefinition(), null}, new Component[]{createValueDefinition(), null},
new Component[]{new JSeparator(), null},
new Component[]{createTickColorPane(new double[]{p, p, p}, new double[]{p, f}), null}, new Component[]{createTickColorPane(new double[]{p, p, p}, new double[]{p, f}), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueStylePane()}, new Component[]{createValueStylePane()},
}; };
case RING: case RING:
@ -72,9 +69,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
default: default:
return new Component[][]{ return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueDefinition(), null}, new Component[]{createValueDefinition(), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueStylePane()}, new Component[]{createValueStylePane()},
}; };
} }
@ -83,16 +78,21 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
protected JPanel createLabelPane(double[] row, double[] col){ protected JPanel createLabelPane(double[] row, double[] col){
showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")}); showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")});
labelTextAttrPane = new ChartTextAttrPane(); labelTextAttrPane = new ChartTextAttrPane();
labelPanel = new JPanel(new BorderLayout());
labelPanel.add(labelTextAttrPane);
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = new JPanel(new BorderLayout(0, 6)); JPanel panel = new JPanel(new BorderLayout(0, 6));
panel.add(showLabel, BorderLayout.NORTH); panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AxisLabel"), showLabel), BorderLayout.NORTH);
panel.add(labelTextAttrPane, BorderLayout.CENTER); panel.add(labelPanel, BorderLayout.CENTER);
showLabel.addActionListener(new ActionListener() { showLabel.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
checkLabelPane(); checkLabelPane();
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel); JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return jPanel;
} }
private JPanel createValueDefinition(){ private JPanel createValueDefinition(){
@ -107,7 +107,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
minMaxValuePane = new VanChartMinMaxValuePane(); minMaxValuePane = new VanChartMinMaxValuePane();
break; break;
} }
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), minMaxValuePane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), minMaxValuePane);
} }
private JPanel createTickColorPane(double[] row, double[] col){ private JPanel createTickColorPane(double[] row, double[] col){
@ -118,7 +118,9 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_SecondGraduationLine")), secTickColor}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_SecondGraduationLine")), secTickColor},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_TickColor"), panel); JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_TickColor"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return jPanel;
} }
private boolean isMulti(GaugeStyle style){ private boolean isMulti(GaugeStyle style){

3
designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java

@ -23,11 +23,8 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new JSeparator(),null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createValueStylePane(),null}, new Component[]{createValueStylePane(),null},
}; };

6
designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -33,13 +33,9 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new JSeparator(), null},
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null},
new Component[]{new JSeparator(), null},
new Component[]{createValueStylePane(), null}, new Component[]{createValueStylePane(), null},
}; };
@ -71,7 +67,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), contentPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ValueDefinition"), contentPane);
} }
protected Component[][] getLineStylePaneComponents() { protected Component[][] getLineStylePaneComponents() {

10
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaBackgroundPane.java

@ -7,6 +7,8 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPane; import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPane;
import com.fr.plugin.chart.designer.component.border.VanChartBorderWithRadiusPane; import com.fr.plugin.chart.designer.component.border.VanChartBorderWithRadiusPane;
import com.fr.plugin.chart.designer.style.background.radar.VanChartRadarAxisAreaPane; import com.fr.plugin.chart.designer.style.background.radar.VanChartRadarAxisAreaPane;
@ -45,8 +47,8 @@ public class VanChartAreaBackgroundPane extends AbstractChartTabPane<Chart> {
double[] columnSize = { f }; double[] columnSize = { f };
double[] rowSize = {p,p,p}; double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{chartBorderPane}, new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),chartBorderPane)},
new Component[]{chartBackgroundPane} new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), chartBackgroundPane)},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.add(panel, BorderLayout.CENTER); contentPane.add(panel, BorderLayout.CENTER);
@ -88,8 +90,8 @@ public class VanChartAreaBackgroundPane extends AbstractChartTabPane<Chart> {
protected Component[][] initComponents() { protected Component[][] initComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{chartBorderPane}, new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),chartBorderPane)},
new Component[]{chartBackgroundPane}, new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), chartBackgroundPane)},
new Component[]{chartAxisAreaPane} new Component[]{chartAxisAreaPane}
}; };
} }

18
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java

@ -15,8 +15,8 @@ import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator; import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator;
@ -53,14 +53,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { f }; double[] columnSize = { f };
double[] rowSize = {p,p,p,p,p}; double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createGridLinePane(new double[]{p,p}, new double[]{p,f})}, new Component[]{createGridLinePane(new double[]{p,p,p}, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createAlertLinePane()}, new Component[]{createAlertLinePane()},
new Component[]{new JSeparator()}, new Component[]{createIntervalPane(new double[]{p,p,p,p}, new double[]{p,f})},
new Component[]{createIntervalPane(new double[]{p,p,p}, new double[]{p,f})},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
@ -72,11 +70,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
verticalGridLine = new ColorSelectBox(100); verticalGridLine = new ColorSelectBox(100);
Component[][] components = getGridLinePaneComponents(); Component[][] components = getGridLinePaneComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("ChartF-Grid_Line"),panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("ChartF-Grid_Line"),panel);
} }
protected Component[][] getGridLinePaneComponents() { protected Component[][] getGridLinePaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Horizontal")),horizontalGridLine}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Horizontal")),horizontalGridLine},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Vertical")),verticalGridLine}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Vertical")),verticalGridLine},
}; };
@ -84,7 +83,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
protected JPanel createAlertLinePane(){ protected JPanel createAlertLinePane(){
alertLine = new UICorrelationComboBoxPane(); alertLine = new UICorrelationComboBoxPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"),alertLine); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"),alertLine);
} }
protected JPanel createIntervalPane(double[] row, double[] col){ protected JPanel createIntervalPane(double[] row, double[] col){
@ -108,11 +107,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{
JPanel intervalPane = new JPanel(new BorderLayout(0, 6)); JPanel intervalPane = new JPanel(new BorderLayout(0, 6));
intervalPane.add(isDefaultIntervalBackground, BorderLayout.NORTH); intervalPane.add(isDefaultIntervalBackground, BorderLayout.NORTH);
intervalPane.add(centerPane, BorderLayout.CENTER); intervalPane.add(centerPane, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_IntervalBackground"),intervalPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_IntervalBackground"),intervalPane);
} }
protected Component[][] getIntervalPaneComponents() { protected Component[][] getIntervalPaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Horizontal")),horizontalColorBackground}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Horizontal")),horizontalColorBackground},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Vertical")),verticalColorBackground}, new Component[]{new UILabel(Inter.getLocText("FR-Chart-Direction_Vertical")),verticalColorBackground},
}; };

35
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -19,12 +19,21 @@ import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.attr.radius.VanChartRadiusPlot; import com.fr.plugin.chart.attr.radius.VanChartRadiusPlot;
import com.fr.plugin.chart.base.*; import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrLineEffect;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.custom.style.VanChartCustomStylePane; import com.fr.plugin.chart.custom.style.VanChartCustomStylePane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.*; import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.designer.component.VanChartMarkerPane;
import com.fr.plugin.chart.designer.component.VanChartTrendLinePane;
import com.fr.plugin.chart.designer.component.border.VanChartBorderPane; import com.fr.plugin.chart.designer.component.border.VanChartBorderPane;
import com.fr.plugin.chart.base.AttrLineEffect;
import com.fr.plugin.chart.pie.RadiusCardLayoutPane; import com.fr.plugin.chart.pie.RadiusCardLayoutPane;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
@ -76,26 +85,26 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
} }
//风格 //风格
protected VanChartBeautyPane createStylePane() { protected JPanel createStylePane() {
//如果是自定義組合圖,則不創建填充界面 //如果是自定義組合圖,則不創建填充界面
if (parentPane instanceof VanChartCustomStylePane){ if (parentPane instanceof VanChartCustomStylePane){
stylePane = null; stylePane = null;
}else { }else {
stylePane = new VanChartBeautyPane(); stylePane = new VanChartBeautyPane();
} }
return stylePane; return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"), stylePane);
} }
//趋势线 //趋势线
protected JPanel createTrendLinePane() { protected JPanel createTrendLinePane() {
trendLinePane = new VanChartTrendLinePane(); trendLinePane = new VanChartTrendLinePane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Trend_Line"), trendLinePane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Trend_Line"), trendLinePane);
} }
//线 //线
protected JPanel createLineTypePane() { protected JPanel createLineTypePane() {
lineTypePane = getLineTypePane(); lineTypePane = getLineTypePane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Line"), lineTypePane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Line"), lineTypePane);
} }
protected VanChartLineTypePane getLineTypePane() { protected VanChartLineTypePane getLineTypePane() {
@ -105,19 +114,19 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//标记点类型 //标记点类型
protected JPanel createMarkerPane() { protected JPanel createMarkerPane() {
markerPane = new VanChartMarkerPane(); markerPane = new VanChartMarkerPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Marker"), markerPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Marker"), markerPane);
} }
//填充颜色 //填充颜色
protected JPanel createAreaFillColorPane() { protected JPanel createAreaFillColorPane() {
areaSeriesFillColorPane = new VanChartAreaSeriesFillColorPane(); areaSeriesFillColorPane = new VanChartAreaSeriesFillColorPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_FillColor"), areaSeriesFillColorPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_FillColor"), areaSeriesFillColorPane);
} }
//边框(默认没有圆角) //边框(默认没有圆角)
protected VanChartBorderPane createBorderPane() { protected JPanel createBorderPane() {
borderPane = createDiffBorderPane(); borderPane = createDiffBorderPane();
return borderPane; return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"), borderPane);
} }
//半径界面 //半径界面
@ -187,7 +196,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
} }
protected JPanel createLargeDataModelPane(UIButtonGroup<DataProcessor> modelGroup) { protected JPanel createLargeDataModelPane(UIButtonGroup<DataProcessor> modelGroup) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Large_Model"), modelGroup); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Large_Model"), modelGroup);
} }
protected UIButtonGroup<DataProcessor> createLargeDataModelGroup() { protected UIButtonGroup<DataProcessor> createLargeDataModelGroup() {
@ -208,7 +217,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//不透明度 //不透明度
protected JPanel createAlphaPane() { protected JPanel createAlphaPane() {
transparent = new UINumberDragPane(0, 100); transparent = new UINumberDragPane(0, 100);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), transparent); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Alpha"), transparent);
} }
//堆积和坐标轴设置(自定义柱形图等用到) //堆积和坐标轴设置(自定义柱形图等用到)

10
designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java

@ -12,9 +12,9 @@ import com.fr.design.mainframe.chart.gui.style.series.UIColorPickerPane;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; 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.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.attr.GaugeDetailStyle;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.plugin.chart.pie.RadiusCardLayoutPane; import com.fr.plugin.chart.pie.RadiusCardLayoutPane;
@ -57,9 +57,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createGaugeLayoutPane()}, new Component[]{createGaugeLayoutPane()},
new Component[]{new JSeparator()},
new Component[]{createGaugeStylePane(rowSize, new double[]{p,f})}, new Component[]{createGaugeStylePane(rowSize, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createGaugeBandsPane()} new Component[]{createGaugeBandsPane()}
}; };
@ -74,7 +72,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
changeLabelPosition(); changeLabelPosition();
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Chart_Layout"), gaugeLayout); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart_Layout"), gaugeLayout);
} }
private void changeLabelPosition() { private void changeLabelPosition() {
@ -106,7 +104,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
if(rotate != null){ if(rotate != null){
panel.add(rotate, BorderLayout.NORTH); panel.add(rotate, BorderLayout.NORTH);
} }
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
} }
private Component[][] getDiffComponentsWithGaugeStyle() { private Component[][] getDiffComponentsWithGaugeStyle() {
@ -183,7 +181,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createGaugeBandsPane() { private JPanel createGaugeBandsPane() {
colorPickerPane = new ColorPickerPaneWithFormula("meterString"); colorPickerPane = new ColorPickerPaneWithFormula("meterString");
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Range"), colorPickerPane, 16); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Range"), colorPickerPane);
} }

7
designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java

@ -3,15 +3,14 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.type.RadiusType;
import com.fr.plugin.chart.base.VanChartRadius;
import com.fr.plugin.chart.attr.radius.VanChartRadiusPlot; import com.fr.plugin.chart.attr.radius.VanChartRadiusPlot;
import com.fr.plugin.chart.base.VanChartRadius;
import com.fr.plugin.chart.layout.VanChartCardLayoutPane; import com.fr.plugin.chart.layout.VanChartCardLayoutPane;
import com.fr.plugin.chart.type.RadiusType;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -71,7 +70,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p}; double[] rowSize = {p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),radiusType}, new Component[]{radiusType,null},
new Component[]{cardPane, null}, new Component[]{cardPane, null},
}; };

22
designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java

@ -2,7 +2,7 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -28,7 +28,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
protected UISpinner startAngle; protected UISpinner startAngle;
protected UISpinner endAngle; protected UISpinner endAngle;
protected UISpinner innerRadius; protected UISpinner innerRadius;
private UIToggleButton supportRotation; private UIButtonGroup<Boolean> supportRotation;
public VanChartPieSeriesPane(ChartStylePane parent, Plot plot) { public VanChartPieSeriesPane(ChartStylePane parent, Plot plot) {
super(parent, plot); super(parent, plot);
@ -41,9 +41,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
double[] rowSize = {p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createStylePane()}, new Component[]{createStylePane()},
new Component[]{stylePane == null ? null : new JSeparator()},
new Component[]{createSeriesStylePane(rowSize, new double[]{p,f})}, new Component[]{createSeriesStylePane(rowSize, new double[]{p,f})},
new Component[]{new JSeparator()},
new Component[]{createBorderPane()}, new Component[]{createBorderPane()},
}; };
@ -55,19 +53,21 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
startAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0); startAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0);
endAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0); endAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0);
innerRadius = new UISpinner(0, 100, 1, 0); innerRadius = new UISpinner(0, 100, 1, 0);
supportRotation = new UIToggleButton(Inter.getLocText("Plugin-ChartF_Rotation")); supportRotation = new UIButtonGroup<Boolean>(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_StartAngle")),startAngle}, 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_EndAngle")),endAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius},
new Component[]{createRadiusPane(), null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")), createRadiusPane()},
new Component[]{supportRotation,null} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
} }
//半径界面 //半径界面
@ -93,7 +93,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
startAngle.setValue(piePlot4VanChart.getStartAngle()); startAngle.setValue(piePlot4VanChart.getStartAngle());
endAngle.setValue(piePlot4VanChart.getEndAngle()); endAngle.setValue(piePlot4VanChart.getEndAngle());
innerRadius.setValue(piePlot4VanChart.getInnerRadiusPercent()); innerRadius.setValue(piePlot4VanChart.getInnerRadiusPercent());
supportRotation.setSelected(piePlot4VanChart.isSupportRotation()); supportRotation.setSelectedIndex(piePlot4VanChart.isSupportRotation() == true ?0:1);
} }
} }
@ -114,7 +114,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
piePlot4VanChart.setStartAngle(startAngle.getValue()); piePlot4VanChart.setStartAngle(startAngle.getValue());
piePlot4VanChart.setEndAngle(endAngle.getValue()); piePlot4VanChart.setEndAngle(endAngle.getValue());
piePlot4VanChart.setInnerRadiusPercent(innerRadius.getValue()); piePlot4VanChart.setInnerRadiusPercent(innerRadius.getValue());
piePlot4VanChart.setSupportRotation(supportRotation.isSelected()); piePlot4VanChart.setSupportRotation(supportRotation.getSelectedItem());
} }
} }
} }
Loading…
Cancel
Save