|
|
|
@ -12,6 +12,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
|
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.gui.style.FormatPane; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
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}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
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[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected boolean showLabelDisplay() { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void addOverlapGroupButton(JPanel panel) { |
|
|
|
|
//do nothing
|
|
|
|
@ -87,7 +92,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
|
|
|
|
|
private JPanel createValueDefinition(){ |
|
|
|
|
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 |
|
|
|
@ -127,7 +132,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
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{ |
|
|
|
@ -174,10 +179,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
secTickPane.add(secondUnitField); |
|
|
|
|
secTickPane.add(secondType); |
|
|
|
|
|
|
|
|
|
minPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.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); |
|
|
|
|
mainPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.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); |
|
|
|
|
minPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Min"),minValueField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
maxPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Max"),maxValueField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
mainPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Main_Type"),mainTickPane, 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)); |
|
|
|
|
maxPane.setBorder(BorderFactory.createEmptyBorder(0,TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0)); |
|
|
|
@ -208,10 +213,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
DateEditor dateEditor = new DateEditor(tmp, true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1); |
|
|
|
|
Editor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Formula")); |
|
|
|
|
DateEditor dateEditor = new DateEditor(tmp, true, Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1); |
|
|
|
|
Editor formulaEditor = new FormulaEditor(Toolkit.i18nText("Fine-Design_Chart_Formula")); |
|
|
|
|
Editor[] editor = new Editor[]{dateEditor, formulaEditor}; |
|
|
|
|
minValueField = new ValueEditorPane(editor); |
|
|
|
|
minCheckBox.addActionListener(new ActionListener() { |
|
|
|
@ -223,10 +228,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
DateEditor dateEditor = new DateEditor(tmp, true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1); |
|
|
|
|
Editor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Formula")); |
|
|
|
|
DateEditor dateEditor = new DateEditor(tmp, true, Toolkit.i18nText("Fine-Design_Basic_Date"), UIDatePicker.STYLE_CN_DATETIME1); |
|
|
|
|
Editor formulaEditor = new FormulaEditor(Toolkit.i18nText("Fine-Design_Chart_Formula")); |
|
|
|
|
Editor[] editor = new Editor[]{dateEditor, formulaEditor}; |
|
|
|
|
maxValueField = new ValueEditorPane(editor); |
|
|
|
|
maxCheckBox.addActionListener(new ActionListener() { |
|
|
|
@ -238,7 +243,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
|
|
|
|
|
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.setPreferredSize(new Dimension(20, 20)); |
|
|
|
|
mainType = new UIComboBox(TYPES); |
|
|
|
@ -254,7 +259,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
|
|
|
|
|
|
|
|
|
|
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.setPreferredSize(new Dimension(20, 20)); |
|
|
|
|
secondType = new UIComboBox(TYPES); |
|
|
|
|