|
|
|
@ -1,5 +1,8 @@
|
|
|
|
|
package com.fr.van.chart.designer.style.background; |
|
|
|
|
|
|
|
|
|
import com.fine.swing.ui.layout.Column; |
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
|
import com.fr.base.Utils; |
|
|
|
|
import com.fr.chart.base.AttrColor; |
|
|
|
@ -14,12 +17,8 @@ import com.fr.design.gui.ispinner.UISpinner;
|
|
|
|
|
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx; |
|
|
|
|
import com.fr.design.gui.style.FRFontPane; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.general.FRFont; |
|
|
|
|
import com.fr.general.GeneralUtils; |
|
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
@ -29,10 +28,10 @@ import com.fr.stable.Constants;
|
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.van.chart.designer.component.LineTypeComboBox; |
|
|
|
|
|
|
|
|
|
import javax.swing.BoxLayout; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
@ -108,26 +107,24 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
|
|
|
|
|
|
|
|
|
|
private void doLayoutPane() { |
|
|
|
|
this.removeAll(); |
|
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
|
Column column = new Column(); |
|
|
|
|
column.setSpacing(10); |
|
|
|
|
this.add(column, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
//警戒线设置
|
|
|
|
|
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
|
this.add(top); |
|
|
|
|
top.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null)); |
|
|
|
|
top.add(createTopPane()); |
|
|
|
|
Component top = FineUIUtils.wrapComponentWithTitle(createTopPane(), Toolkit.i18nText("Fine-Design_Chart_Alert_Set")); |
|
|
|
|
column.add(top); |
|
|
|
|
|
|
|
|
|
//提示文字
|
|
|
|
|
JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
|
this.add(bottom); |
|
|
|
|
bottom.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null)); |
|
|
|
|
bottom.add(createBottomPane()); |
|
|
|
|
Component bottom = FineUIUtils.wrapComponentWithTitle(createBottomPane(), Toolkit.i18nText("Fine-Design_Chart_Alert_Text")); |
|
|
|
|
column.add(bottom); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createTopPane() { |
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double[] columnSize = {p, p}; |
|
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
|
Component[][] components = getTopPaneComponents(); |
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Component[][] getTopPaneComponents() { |
|
|
|
@ -141,10 +138,6 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createBottomPane() { |
|
|
|
|
alertTextPosition.setSelectedIndex(0); |
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double[] columnSize = {p, p}; |
|
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertTextPosition}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content")), alertText}, |
|
|
|
@ -153,7 +146,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
|
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), fontColor}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void checkPositionPane() { |
|
|
|
|