|
|
@ -1,5 +1,7 @@ |
|
|
|
package com.fr.van.chart.designer.style.background; |
|
|
|
package com.fr.van.chart.designer.style.background; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
import com.fr.base.Utils; |
|
|
|
import com.fr.base.Utils; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
@ -9,19 +11,14 @@ import com.fr.design.gui.frpane.UINumberDragPane; |
|
|
|
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; |
|
|
|
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
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.style.color.ColorSelectBox; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground; |
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BoxLayout; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 自定义间隔背景设置 |
|
|
|
* 自定义间隔背景设置 |
|
|
@ -38,25 +35,17 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane<VanChart |
|
|
|
private VanChartCustomIntervalBackground customIntervalBackground; |
|
|
|
private VanChartCustomIntervalBackground customIntervalBackground; |
|
|
|
|
|
|
|
|
|
|
|
private void doLayoutPane(){ |
|
|
|
private void doLayoutPane(){ |
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
//
|
|
|
|
|
|
|
|
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
|
|
|
|
|
|
|
this.removeAll(); |
|
|
|
this.removeAll(); |
|
|
|
this.add(top); |
|
|
|
this.add(FineUIUtils.wrapComponentWithTitle(createContentPane(), |
|
|
|
top.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background") + ":", null)); |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background")), BorderLayout.CENTER); |
|
|
|
top.add(createContentPane()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createContentPane() { |
|
|
|
private JPanel createContentPane() { |
|
|
|
bottomValue = new DefaultTinyFormulaPane(); |
|
|
|
bottomValue = new DefaultTinyFormulaPane(); |
|
|
|
topValue = new DefaultTinyFormulaPane(); |
|
|
|
topValue = new DefaultTinyFormulaPane(); |
|
|
|
bottomValue.setPreferredSize(new Dimension(124,20)); |
|
|
|
|
|
|
|
topValue.setPreferredSize(new Dimension(124,20)); |
|
|
|
|
|
|
|
color = new ColorSelectBox(100); |
|
|
|
color = new ColorSelectBox(100); |
|
|
|
transparent = new UINumberDragPaneWithPercent(0,100); |
|
|
|
transparent = new UINumberDragPaneWithPercent(0,100); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
|
|
|
double[] columnSize = {p,p}; |
|
|
|
|
|
|
|
double[] rowSize = {p,p,p}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel axisPane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), backgroundAxis); |
|
|
|
JPanel axisPane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), backgroundAxis); |
|
|
|
|
|
|
|
|
|
|
@ -64,19 +53,19 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane<VanChart |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Bottom_Value")),bottomValue}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Bottom_Value")),bottomValue}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Top_Value")),topValue}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Top_Value")),topValue}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
JPanel temp = TableLayoutHelper.createTableLayoutPane(rangeComponents, rowSize, columnSize); |
|
|
|
JPanel temp = FineLayoutBuilder.compatibleTableLayout(10, rangeComponents, new double[]{1.2, 3}); |
|
|
|
JPanel rangePane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Range"), temp); |
|
|
|
JPanel rangePane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Range"), temp); |
|
|
|
|
|
|
|
|
|
|
|
Component[][] styleComponents = new Component[][]{ |
|
|
|
Component[][] styleComponents = new Component[][]{ |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),color}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),color}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha")),transparent}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha")),transparent}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
temp = TableLayoutHelper.createTableLayoutPane(styleComponents, rowSize, columnSize); |
|
|
|
temp = FineLayoutBuilder.compatibleTableLayout(10, styleComponents, new double[]{1.2, 3}); |
|
|
|
JPanel stylePane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Name"), temp); |
|
|
|
JPanel stylePane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Name"), temp); |
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = getPaneComponents(axisPane, rangePane, stylePane); |
|
|
|
Component[][] components = getPaneComponents(axisPane, rangePane, stylePane); |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Component[][] getPaneComponents(JPanel axisPane, JPanel rangePane, JPanel stylePane) { |
|
|
|
protected Component[][] getPaneComponents(JPanel axisPane, JPanel rangePane, JPanel stylePane) { |
|
|
|