|
|
@ -2,12 +2,15 @@ package com.fr.van.chart.designer.style.background; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
import com.fr.base.Utils; |
|
|
|
import com.fr.base.Utils; |
|
|
|
|
|
|
|
import com.fr.chart.base.AttrColor; |
|
|
|
|
|
|
|
import com.fr.chart.base.AttrLineStyle; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.formula.TinyFormulaPane; |
|
|
|
import com.fr.design.formula.TinyFormulaPane; |
|
|
|
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.UIComboBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
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.i18n.Toolkit; |
|
|
|
import com.fr.design.gui.style.FRFontPane; |
|
|
|
import com.fr.design.gui.style.FRFontPane; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
@ -18,9 +21,10 @@ import com.fr.general.FRFont; |
|
|
|
import com.fr.general.GeneralUtils; |
|
|
|
import com.fr.general.GeneralUtils; |
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; |
|
|
|
import com.fr.plugin.chart.base.VanChartConstants; |
|
|
|
import com.fr.plugin.chart.type.LineType; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
|
|
|
import com.fr.van.chart.designer.component.LineTypeComboBox; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BoxLayout; |
|
|
|
import javax.swing.BoxLayout; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
@ -39,13 +43,16 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
private static final int VALUE_WD = 100; |
|
|
|
private static final int VALUE_WD = 100; |
|
|
|
private static final int TEXT_WD = 200; |
|
|
|
private static final int TEXT_WD = 200; |
|
|
|
private static final long serialVersionUID = -1208941770684286439L; |
|
|
|
private static final long serialVersionUID = -1208941770684286439L; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int PREFERRED_WIDTH = 100; |
|
|
|
|
|
|
|
private static final double LINE_WIDTH_MIN_VALUE = 0.5; |
|
|
|
|
|
|
|
private static final double LINE_WIDTH_DIERTA_VALUE = 0.5; |
|
|
|
|
|
|
|
private static final double LINE_WIDTH_DEFAULT_VALUE = 2; |
|
|
|
|
|
|
|
|
|
|
|
private UIButtonGroup alertAxis; |
|
|
|
private UIButtonGroup alertAxis; |
|
|
|
protected TinyFormulaPane alertValue; |
|
|
|
protected TinyFormulaPane alertValue; |
|
|
|
//线型支持虚线 恢复用注释。下面1行删除。
|
|
|
|
protected LineTypeComboBox alertLineStyle;//线型
|
|
|
|
protected LineComboBox alertLineStyle; |
|
|
|
private UISpinner lineWidthSpinner;//线宽
|
|
|
|
//线型支持虚线 恢复用注释。取消注释。
|
|
|
|
|
|
|
|
// protected LineTypeComboBox alertLineStyle;//线型
|
|
|
|
|
|
|
|
// private UISpinner lineWidthSpinner;//线宽
|
|
|
|
|
|
|
|
protected ColorSelectBox alertLineColor; |
|
|
|
protected ColorSelectBox alertLineColor; |
|
|
|
|
|
|
|
|
|
|
|
private UIButtonGroup alertTextPosition; |
|
|
|
private UIButtonGroup alertTextPosition; |
|
|
@ -56,23 +63,20 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
|
|
|
|
|
|
|
|
private VanChartAlertValue chartAlertValue; |
|
|
|
private VanChartAlertValue chartAlertValue; |
|
|
|
|
|
|
|
|
|
|
|
public VanChartAlertValuePane(){ |
|
|
|
public VanChartAlertValuePane() { |
|
|
|
initComponents(); |
|
|
|
initComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initComponents(){ |
|
|
|
private void initComponents() { |
|
|
|
alertValue = new TinyFormulaPane(); |
|
|
|
alertValue = new TinyFormulaPane(); |
|
|
|
|
|
|
|
|
|
|
|
//設置大小,防止文本過長導致界面“變形”
|
|
|
|
//設置大小,防止文本過長導致界面“變形”
|
|
|
|
alertValue.setPreferredSize(new Dimension(VALUE_WD, HT)); |
|
|
|
alertValue.setPreferredSize(new Dimension(VALUE_WD, HT)); |
|
|
|
|
|
|
|
|
|
|
|
//线型支持虚线 恢复用注释。下面1行删除。
|
|
|
|
alertLineStyle = new LineTypeComboBox(new LineType[]{LineType.SOLID, LineType.DASHED}); |
|
|
|
alertLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE); |
|
|
|
lineWidthSpinner = new UISpinner(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE); |
|
|
|
//线型支持虚线 恢复用注释。取消注释。
|
|
|
|
alertLineColor = new ColorSelectBox(PREFERRED_WIDTH); |
|
|
|
// alertLineStyle = new LineTypeComboBox(new LineType[]{LineType.NORMAL, LineType.DASH});
|
|
|
|
alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); |
|
|
|
// lineWidthSpinner = new UISpinner(0.5, Integer.MAX_VALUE, 0.5, 2);
|
|
|
|
|
|
|
|
alertLineColor = new ColorSelectBox(100); |
|
|
|
|
|
|
|
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Top"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); |
|
|
|
|
|
|
|
alertText = new TinyFormulaPane(); |
|
|
|
alertText = new TinyFormulaPane(); |
|
|
|
//設置大小,防止文本過長導致界面“變形”
|
|
|
|
//設置大小,防止文本過長導致界面“變形”
|
|
|
|
alertText.setPreferredSize(new Dimension(TEXT_WD, HT)); |
|
|
|
alertText.setPreferredSize(new Dimension(TEXT_WD, HT)); |
|
|
@ -83,26 +87,25 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void doLayoutPane(){ |
|
|
|
private void doLayoutPane() { |
|
|
|
this.removeAll(); |
|
|
|
this.removeAll(); |
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
//警戒线设置
|
|
|
|
//警戒线设置
|
|
|
|
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
this.add(top); |
|
|
|
this.add(top); |
|
|
|
top.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null)); |
|
|
|
top.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null)); |
|
|
|
top.add(createTopPane()); |
|
|
|
top.add(createTopPane()); |
|
|
|
//提示文字
|
|
|
|
//提示文字
|
|
|
|
JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
this.add(bottom); |
|
|
|
this.add(bottom); |
|
|
|
bottom.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null)); |
|
|
|
bottom.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null)); |
|
|
|
bottom.add(createBottomPane()); |
|
|
|
bottom.add(createBottomPane()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createTopPane() |
|
|
|
protected JPanel createTopPane() { |
|
|
|
{ |
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] columnSize = {p,p}; |
|
|
|
double[] columnSize = {p, p}; |
|
|
|
double[] rowSize = {p,p,p,p,p}; |
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
Component[][] components = getTopPaneComponents(); |
|
|
|
Component[][] components = getTopPaneComponents(); |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
@ -110,26 +113,25 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
|
|
|
|
|
|
|
|
protected Component[][] getTopPaneComponents() { |
|
|
|
protected Component[][] getTopPaneComponents() { |
|
|
|
return new Component[][]{ |
|
|
|
return new Component[][]{ |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")),alertAxis}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertAxis}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")),alertValue}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Use_Value")), alertValue}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),alertLineStyle}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), alertLineStyle}, |
|
|
|
//线型支持虚线 恢复用注释。取消注释。
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")), lineWidthSpinner}, |
|
|
|
//new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Width")), lineWidthSpinner},
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), alertLineColor}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),alertLineColor}, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createBottomPane(){ |
|
|
|
private JPanel createBottomPane() { |
|
|
|
alertTextPosition.setSelectedIndex(0); |
|
|
|
alertTextPosition.setSelectedIndex(0); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] columnSize = {p,p}; |
|
|
|
double[] columnSize = {p, p}; |
|
|
|
double[] rowSize = {p,p,p,p,p}; |
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")),alertTextPosition}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertTextPosition}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")),alertText}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content")), alertText}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font")),fontName}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Form_Font")), fontName}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FRFont_Size")),fontSize}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Form_FRFont_Size")), fontSize}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),fontColor}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), fontColor}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
@ -137,20 +139,20 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
|
|
|
|
|
|
|
|
private void checkPositionPane() { |
|
|
|
private void checkPositionPane() { |
|
|
|
boolean selectXAxis = VanChartAttrHelper.isXAxis(alertAxis.getSelectedItem().toString()); |
|
|
|
boolean selectXAxis = VanChartAttrHelper.isXAxis(alertAxis.getSelectedItem().toString()); |
|
|
|
if(selectXAxis){ |
|
|
|
if (selectXAxis) { |
|
|
|
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Top"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); |
|
|
|
alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Left"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Right")}); |
|
|
|
alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Alert_Left"), Toolkit.i18nText("Fine-Design_Chart_Alert_Right")}); |
|
|
|
} |
|
|
|
} |
|
|
|
doLayoutPane(); |
|
|
|
doLayoutPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected String title4PopupWindow(){ |
|
|
|
protected String title4PopupWindow() { |
|
|
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line"); |
|
|
|
return Toolkit.i18nText("Fine-Design_Chart_Alert_Line"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populateBean(VanChartAlertValue chartAlertValue){ |
|
|
|
public void populateBean(VanChartAlertValue chartAlertValue) { |
|
|
|
this.chartAlertValue =chartAlertValue; |
|
|
|
this.chartAlertValue = chartAlertValue; |
|
|
|
alertAxis = new UIButtonGroup(chartAlertValue.getAxisNamesArray(), chartAlertValue.getAxisNamesArray()); |
|
|
|
alertAxis = new UIButtonGroup(chartAlertValue.getAxisNamesArray(), chartAlertValue.getAxisNamesArray()); |
|
|
|
alertAxis.setSelectedItem(chartAlertValue.getAxisName()); |
|
|
|
alertAxis.setSelectedItem(chartAlertValue.getAxisName()); |
|
|
|
alertAxis.addChangeListener(new ChangeListener() { |
|
|
|
alertAxis.addChangeListener(new ChangeListener() { |
|
|
@ -163,14 +165,20 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
checkPositionPane(); |
|
|
|
checkPositionPane(); |
|
|
|
|
|
|
|
|
|
|
|
alertValue.populateBean(Utils.objectToString(chartAlertValue.getAlertValueFormula())); |
|
|
|
alertValue.populateBean(Utils.objectToString(chartAlertValue.getAlertValueFormula())); |
|
|
|
//线型支持虚线 恢复用注释。下面1行删除。
|
|
|
|
|
|
|
|
alertLineStyle.setSelectedLineStyle(chartAlertValue.getLineStyle().getLineStyle()); |
|
|
|
AttrColor attrColor = chartAlertValue.getLineColor(); |
|
|
|
//线型支持虚线 恢复用注释。取消注释。
|
|
|
|
AttrLineStyle attrLineStyle = chartAlertValue.getLineStyle(); |
|
|
|
// alertLineStyle.setSelectedItem(chartAlertValue.getLineStyle().getLineType());
|
|
|
|
|
|
|
|
// lineWidthSpinner.setValue(chartAlertValue.getLineStyle().getLineWidth());
|
|
|
|
if (attrColor != null) { |
|
|
|
alertLineColor.setSelectObject(chartAlertValue.getLineColor().getSeriesColor()); |
|
|
|
alertLineColor.setSelectObject(attrColor.getSeriesColor()); |
|
|
|
|
|
|
|
} |
|
|
|
if(VanChartAttrHelper.isXAxis(chartAlertValue.getAxisName())){ |
|
|
|
|
|
|
|
|
|
|
|
if (attrLineStyle != null) { |
|
|
|
|
|
|
|
alertLineStyle.setSelectedItem(attrLineStyle.getLineType()); |
|
|
|
|
|
|
|
lineWidthSpinner.setValue(attrLineStyle.getLineWidth()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (VanChartAttrHelper.isXAxis(chartAlertValue.getAxisName())) { |
|
|
|
alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.BOTTOM ? 1 : 0); |
|
|
|
alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.BOTTOM ? 1 : 0); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.LEFT ? 0 : 1); |
|
|
|
alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.LEFT ? 0 : 1); |
|
|
@ -186,16 +194,22 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
fontColor.setSelectObject(chartAlertValue.getAlertFont().getForeground()); |
|
|
|
fontColor.setSelectObject(chartAlertValue.getAlertFont().getForeground()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public VanChartAlertValue updateBean(){ |
|
|
|
public VanChartAlertValue updateBean() { |
|
|
|
chartAlertValue.setAxisName(alertAxis.getSelectedItem().toString()); |
|
|
|
chartAlertValue.setAxisName(alertAxis.getSelectedItem().toString()); |
|
|
|
|
|
|
|
|
|
|
|
chartAlertValue.setAlertValueFormula(BaseFormula.createFormulaBuilder().build(alertValue.updateBean())); |
|
|
|
chartAlertValue.setAlertValueFormula(BaseFormula.createFormulaBuilder().build(alertValue.updateBean())); |
|
|
|
chartAlertValue.getLineColor().setSeriesColor(alertLineColor.getSelectObject()); |
|
|
|
|
|
|
|
//线型支持虚线 恢复用注释。下面1行删除。
|
|
|
|
AttrColor attrColor = chartAlertValue.getLineColor(); |
|
|
|
chartAlertValue.getLineStyle().setLineStyle(alertLineStyle.getSelectedLineStyle()); |
|
|
|
AttrLineStyle attrLineStyle = chartAlertValue.getLineStyle(); |
|
|
|
//线型支持虚线 恢复用注释。取消注释。
|
|
|
|
|
|
|
|
// chartAlertValue.getLineStyle().setLineType((LineType) alertLineStyle.getSelectedItem());
|
|
|
|
if (attrColor != null) { |
|
|
|
// chartAlertValue.getLineStyle().setLineWidth(lineWidthSpinner.getValue());
|
|
|
|
attrColor.setSeriesColor(alertLineColor.getSelectObject()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (attrLineStyle != null) { |
|
|
|
|
|
|
|
attrLineStyle.setLineType((LineType) alertLineStyle.getSelectedItem()); |
|
|
|
|
|
|
|
attrLineStyle.setLineWidth(lineWidthSpinner.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String contentString = alertText.updateBean(); |
|
|
|
String contentString = alertText.updateBean(); |
|
|
|
Object contentObj; |
|
|
|
Object contentObj; |
|
|
@ -210,7 +224,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> { |
|
|
|
int size = Utils.objectToNumber(fontSize.getSelectedItem(), true).intValue(); |
|
|
|
int size = Utils.objectToNumber(fontSize.getSelectedItem(), true).intValue(); |
|
|
|
Color color = fontColor.getSelectObject(); |
|
|
|
Color color = fontColor.getSelectObject(); |
|
|
|
chartAlertValue.setAlertFont(FRFont.getInstance(name, Font.PLAIN, size, color)); |
|
|
|
chartAlertValue.setAlertFont(FRFont.getInstance(name, Font.PLAIN, size, color)); |
|
|
|
if(VanChartAttrHelper.isXAxis(Utils.objectToString(alertAxis.getSelectedItem()))){ |
|
|
|
if (VanChartAttrHelper.isXAxis(Utils.objectToString(alertAxis.getSelectedItem()))) { |
|
|
|
chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.TOP : Constants.BOTTOM); |
|
|
|
chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.TOP : Constants.BOTTOM); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.LEFT : Constants.RIGHT); |
|
|
|
chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.LEFT : Constants.RIGHT); |
|
|
|