Browse Source

CHART-15902 完善轴标签属性

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
01ba904a16
  1. 49
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  2. 35
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java
  3. 15
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java
  4. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  5. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

49
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -121,6 +121,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
this.add(createContentPane(isXAxis), BorderLayout.CENTER); this.add(createContentPane(isXAxis), BorderLayout.CENTER);
} }
protected boolean showLabelDisplay() {
return true;
}
protected JPanel createContentPane(boolean isXAxis) { protected JPanel createContentPane(boolean isXAxis) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
@ -207,44 +211,50 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
showLabel = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")}); showLabel = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")});
labelDisplayComboBox = new AxisLabelDisplayComboBox(); labelDisplayComboBox = new AxisLabelDisplayComboBox();
labelDisplayPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show"), labelDisplayComboBox);
labelDisplayPane.setVisible(showLabelDisplay());
labelTextAttrPane = getChartTextAttrPane(); labelTextAttrPane = getChartTextAttrPane();
labelTextRotation = new UINumberDragPane(-ROTATION_MAX, ROTATION_MAX); labelTextRotation = new UINumberDragPane(-ROTATION_MAX, ROTATION_MAX);
labelGapStyle = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Automatic"), Toolkit.i18nText("Fine-Design_Chart_Fixed")}); labelGapStyle = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Automatic"), Toolkit.i18nText("Fine-Design_Chart_Fixed")});
labelGapValue = new UITextField(); labelGapValue = new UITextField();
Component[][] gapComponents = new Component[][]{ Component[][] gapComponents = new Component[][]{
new Component[]{null, null},
new Component[]{ new Component[]{
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_TextRotation")), FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_TextRotation")),
UIComponentUtils.wrapWithBorderLayoutPane(labelTextRotation) UIComponentUtils.wrapWithBorderLayoutPane(labelTextRotation)
}, },
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Label_Interval")), labelGapStyle}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Label_Interval")), labelGapStyle}
new Component[]{null, null}
}; };
JPanel gapDetailPane = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col); JPanel gapDetailPane = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col);
labelDisplayPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show"), labelDisplayComboBox);
labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText(""), labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText(""), labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
labelGapPane = new JPanel(new BorderLayout()); labelGapPane = new JPanel(new BorderLayout());
labelGapPane.add(gapDetailPane, BorderLayout.CENTER); labelGapPane.add(gapDetailPane, BorderLayout.CENTER);
labelGapPane.add(labelGapValuePane, BorderLayout.SOUTH); labelGapPane.add(labelGapValuePane, BorderLayout.SOUTH);
Component[][] components = new Component[][]{
new Component[]{labelDisplayPane, null},
new Component[]{labelTextAttrPane, null},
new Component[]{labelGapPane, null},
};
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel); JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel);
labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); labelPanel = new JPanel(new BorderLayout());
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
labelPanel.add(labelDisplayPane, BorderLayout.NORTH);
labelPanel.add(labelTextAttrPane, BorderLayout.CENTER);
labelPanel.add(labelGapPane, BorderLayout.SOUTH);
showLabel.addActionListener(new ActionListener() { showLabel.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
checkLabelPane(); checkLabelPane();
} }
}); });
labelDisplayComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkLabelGapPane();
}
});
labelGapStyle.addActionListener(new ActionListener() { labelGapStyle.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -495,6 +505,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkAllUse() { protected void checkAllUse() {
checkCardPane(); checkCardPane();
checkLabelPane(); checkLabelPane();
checkLabelGapPane();
checkTitlePane(); checkTitlePane();
//区域显示策略 恢复用注释。删除下面一行。 //区域显示策略 恢复用注释。删除下面一行。
checkMaxProPortionUse(); checkMaxProPortionUse();
@ -554,6 +565,16 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
checkLabelGapValuePane(); checkLabelGapValuePane();
} }
protected void checkLabelGapPane() {
boolean visible = true;
if (showLabelDisplay() && labelDisplayPane != null && labelDisplayComboBox != null) {
visible = labelDisplayComboBox.getSelectedIndex() == 0;
}
labelGapPane.setVisible(visible);
}
protected void checkLabelGapValuePane() { protected void checkLabelGapValuePane() {
if (labelGapValuePane != null && labelGapStyle != null) { if (labelGapValuePane != null && labelGapStyle != null) {
boolean visible = labelGapStyle.getSelectedIndex() == 1; boolean visible = labelGapStyle.getSelectedIndex() == 1;
@ -654,6 +675,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
// if (overlapHandleTypeGroup != null) { // if (overlapHandleTypeGroup != null) {
// overlapHandleTypeGroup.setSelectedItem(axis.getOverlapHandleType()); // overlapHandleTypeGroup.setSelectedItem(axis.getOverlapHandleType());
// } // }
if (labelDisplayComboBox != null) {
labelDisplayComboBox.populateBean(axis.getLabelDisplay());
}
if (labelGapStyle != null) { if (labelGapStyle != null) {
labelGapStyle.setSelectedIndex(axis.isAutoLabelGap() ? 0 : 1); labelGapStyle.setSelectedIndex(axis.isAutoLabelGap() ? 0 : 1);
} }
@ -790,6 +814,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
// if (overlapHandleTypeGroup != null) { // if (overlapHandleTypeGroup != null) {
// axis.setOverlapHandleType(overlapHandleTypeGroup.getSelectedItem()); // axis.setOverlapHandleType(overlapHandleTypeGroup.getSelectedItem());
// } // }
if (labelDisplayComboBox != null) {
axis.setLabelDisplay(labelDisplayComboBox.updateBean());
}
if (labelGapStyle != null) { if (labelGapStyle != null) {
axis.setAutoLabelGap(labelGapStyle.getSelectedIndex() == 0); axis.setAutoLabelGap(labelGapStyle.getSelectedIndex() == 0);
} }

35
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java

@ -12,6 +12,7 @@ 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.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.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -69,7 +70,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
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[]{createTitlePane(new double[]{p, p, p, p, p,p}, column, isXAxis),null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, column, isXAxis),null},
new Component[]{createLabelPane(new double[]{p, p}, column),null}, new Component[]{createLabelPane(new double[]{p, p, p}, column),null},
new Component[]{createValueDefinition(),null}, new Component[]{createValueDefinition(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis),null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis),null},
@ -80,6 +81,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
} }
protected boolean showLabelDisplay() {
return false;
}
@Override @Override
protected void addOverlapGroupButton(JPanel panel) { protected void addOverlapGroupButton(JPanel panel) {
//do nothing //do nothing
@ -87,7 +92,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private JPanel createValueDefinition(){ private JPanel createValueDefinition(){
timeMinMaxValuePane = new TimeMinMaxValuePane(); timeMinMaxValuePane = new TimeMinMaxValuePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), timeMinMaxValuePane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), timeMinMaxValuePane);
} }
@Override @Override
@ -127,7 +132,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
*/ */
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TimeAxis"); return Toolkit.i18nText("Fine-Design_Chart_TimeAxis");
} }
private class TimeMinMaxValuePane extends JPanel{ private class TimeMinMaxValuePane extends JPanel{
@ -174,10 +179,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
secTickPane.add(secondUnitField); secTickPane.add(secondUnitField);
secTickPane.add(secondType); secTickPane.add(secondType);
minPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Min"),minValueField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); minPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Min"),minValueField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
maxPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Max"),maxValueField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); maxPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Max"),maxValueField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
mainPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Main_Type"),mainTickPane, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); mainPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Main_Type"),mainTickPane, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
secPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_SecType"),secTickPane, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); secPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_SecType"),secTickPane, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
minPane.setBorder(BorderFactory.createEmptyBorder(0,TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); minPane.setBorder(BorderFactory.createEmptyBorder(0,TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
maxPane.setBorder(BorderFactory.createEmptyBorder(0,TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); maxPane.setBorder(BorderFactory.createEmptyBorder(0,TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
@ -208,10 +213,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMin() { private void initMin() {
// 最小值. // 最小值.
minCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Min_Value")); minCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Custom_Min_Value"));
Date tmp = null; Date tmp = null;
DateEditor dateEditor = new DateEditor(tmp, true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1); DateEditor dateEditor = new DateEditor(tmp, true, Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1);
Editor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Formula")); Editor formulaEditor = new FormulaEditor(Toolkit.i18nText("Fine-Design_Chart_Formula"));
Editor[] editor = new Editor[]{dateEditor, formulaEditor}; Editor[] editor = new Editor[]{dateEditor, formulaEditor};
minValueField = new ValueEditorPane(editor); minValueField = new ValueEditorPane(editor);
minCheckBox.addActionListener(new ActionListener() { minCheckBox.addActionListener(new ActionListener() {
@ -223,10 +228,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMax() { private void initMax() {
// 最大值 // 最大值
maxCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Max_Value")); maxCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Custom_Max_Value"));
Date tmp = null; Date tmp = null;
DateEditor dateEditor = new DateEditor(tmp, true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1); DateEditor dateEditor = new DateEditor(tmp, true, Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1);
Editor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Formula")); Editor formulaEditor = new FormulaEditor(Toolkit.i18nText("Fine-Design_Chart_Formula"));
Editor[] editor = new Editor[]{dateEditor, formulaEditor}; Editor[] editor = new Editor[]{dateEditor, formulaEditor};
maxValueField = new ValueEditorPane(editor); maxValueField = new ValueEditorPane(editor);
maxCheckBox.addActionListener(new ActionListener() { maxCheckBox.addActionListener(new ActionListener() {
@ -238,7 +243,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initMain() { private void initMain() {
// 主要刻度单位 // 主要刻度单位
mainTickBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Main_Type")); mainTickBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Custom_Main_Type"));
mainUnitField = new UITextField(); mainUnitField = new UITextField();
mainUnitField.setPreferredSize(new Dimension(20, 20)); mainUnitField.setPreferredSize(new Dimension(20, 20));
mainType = new UIComboBox(TYPES); mainType = new UIComboBox(TYPES);
@ -254,7 +259,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private void initSecond() { private void initSecond() {
// 次要刻度单位 // 次要刻度单位
secondTickBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Second_Type")); secondTickBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Custom_Second_Type"));
secondUnitField = new UITextField(); secondUnitField = new UITextField();
secondUnitField.setPreferredSize(new Dimension(20, 20)); secondUnitField.setPreferredSize(new Dimension(20, 20));
secondType = new UIComboBox(TYPES); secondType = new UIComboBox(TYPES);

15
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java

@ -5,6 +5,7 @@ import com.fr.chart.base.ChartBaseUtils;
import com.fr.design.chart.ChartSwingUtils; import com.fr.design.chart.ChartSwingUtils;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
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.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
@ -50,7 +51,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
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[]{createTitlePane(new double[]{p, p, p, p, p, p}, column, isXAxis), null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, column, isXAxis), null},
new Component[]{createLabelPane(new double[]{p, p}, column), null}, new Component[]{createLabelPane(new double[]{p, p, p}, column), null},
new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},
@ -61,6 +62,10 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
} }
protected boolean showLabelDisplay() {
return false;
}
@Override @Override
protected void addOverlapGroupButton(JPanel panel) { protected void addOverlapGroupButton(JPanel panel) {
//do nothing //do nothing
@ -68,12 +73,12 @@ 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.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), panel);
} }
protected JPanel createCommenValuePane(double[] row, double[] col){ protected JPanel createCommenValuePane(double[] row, double[] col){
initMinMaxValuePane(); initMinMaxValuePane();
logBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_LogBase_Value")); logBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Custom_LogBase_Value"));
logBaseField = new UITextField(); logBaseField = new UITextField();
logBox.addActionListener(new ActionListener() { logBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -87,7 +92,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
// logPane.add(logBaseField); // logPane.add(logBaseField);
logPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Log_Base_Value"), logBaseField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); logPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Log_Base_Value"), logBaseField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
logPane.setBorder(BorderFactory.createEmptyBorder(0, TableLayout4VanChartHelper.COMPONENT_INTERVAL, 0, 0)); logPane.setBorder(BorderFactory.createEmptyBorder(0, TableLayout4VanChartHelper.COMPONENT_INTERVAL, 0, 0));
@ -125,7 +130,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
*/ */
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Axis"); return Toolkit.i18nText("Fine-Design_Chart_Value_Axis");
} }
@Override @Override

11
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.designer.style.axis.radar;
import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -29,7 +30,7 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
double[] column = {f, s}; double[] column = {f, s};
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[]{createLabelPane(new double[]{p, p}, column),null}, new Component[]{createLabelPane(new double[]{p, p, p}, column),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[]{createValueStylePane(),null}, new Component[]{createValueStylePane(),null},
}; };
@ -37,11 +38,15 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
} }
protected boolean showLabelDisplay() {
return false;
}
protected Component[][] getLineStylePaneComponents() { protected Component[][] getLineStylePaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{null,null} , new Component[]{null,null} ,
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Type")),axisLineStyle} , new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), axisLineStyle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),axisLineColor}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), axisLineColor},
}; };
} }

22
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -3,9 +3,9 @@ package com.fr.van.chart.designer.style.axis.radar;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
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.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis; import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
@ -41,7 +41,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
double[] column = {f, s}; double[] column = {f, s};
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[]{createLabelPane(new double[]{p, p}, column), null}, new Component[]{createLabelPane(new double[]{p, p, p}, column), null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), 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[]{createValueStylePane(), null}, new Component[]{createValueStylePane(), null},
@ -61,15 +61,15 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
valueStyle = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count"), valueStyle = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified")}); Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified")});
JPanel commenPane = createCommenValuePane(new double[]{p, p, p}, columnSize); JPanel commenPane = createCommenValuePane(new double[]{p, p, p}, columnSize);
tableDataPane = new RadarTableDataPane(); tableDataPane = new RadarTableDataPane();
centerPane = new JPanel(new CardLayout()); centerPane = new JPanel(new CardLayout());
centerPane.add(commenPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count")); centerPane.add(commenPane, Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count"));
centerPane.add(tableDataPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified")); centerPane.add(tableDataPane, Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified"));
JPanel contentPane = new JPanel(new BorderLayout()); JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(valueStyle, BorderLayout.NORTH); contentPane.add(valueStyle, BorderLayout.NORTH);
@ -81,7 +81,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
} }
}); });
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), contentPane); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), contentPane);
contentPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0)); contentPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel; return panel;
} }
@ -89,8 +89,8 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
protected Component[][] getLineStylePaneComponents() { protected Component[][] getLineStylePaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Type")), axisLineStyle}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), axisLineStyle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")), axisLineColor}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), axisLineColor},
}; };
} }
@ -102,9 +102,9 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
if (centerPane != null && valueStyle != null) { if (centerPane != null && valueStyle != null) {
CardLayout cardLayout = (CardLayout) centerPane.getLayout(); CardLayout cardLayout = (CardLayout) centerPane.getLayout();
if (valueStyle.getSelectedIndex() == 0) { if (valueStyle.getSelectedIndex() == 0) {
cardLayout.show(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count")); cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count"));
} else { } else {
cardLayout.show(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified")); cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified"));
} }
} }
} }

Loading…
Cancel
Save