|
|
@ -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); |
|
|
|