|
|
@ -2,9 +2,12 @@ package com.fr.van.chart.designer.style.axis.gauge; |
|
|
|
|
|
|
|
|
|
|
|
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.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.mainframe.chart.PaneTitleConstants; |
|
|
|
import com.fr.design.mainframe.chart.PaneTitleConstants; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto; |
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
@ -77,13 +80,13 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createLabelPane(double[] row, double[] col){ |
|
|
|
protected JPanel createLabelPane(double[] row, double[] col){ |
|
|
|
showLabel = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Show"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hidden")}); |
|
|
|
showLabel = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")}); |
|
|
|
labelTextAttrPane = getChartTextAttrPane(); |
|
|
|
labelTextAttrPane = getChartTextAttrPane(); |
|
|
|
labelPanel = new JPanel(new BorderLayout()); |
|
|
|
labelPanel = new JPanel(new BorderLayout()); |
|
|
|
labelPanel.add(labelTextAttrPane); |
|
|
|
labelPanel.add(labelTextAttrPane); |
|
|
|
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); |
|
|
|
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); |
|
|
|
JPanel panel = new JPanel(new BorderLayout(0, 6)); |
|
|
|
JPanel panel = new JPanel(new BorderLayout(0, 6)); |
|
|
|
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel), BorderLayout.NORTH); |
|
|
|
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel), BorderLayout.NORTH); |
|
|
|
panel.add(labelPanel, BorderLayout.CENTER); |
|
|
|
panel.add(labelPanel, BorderLayout.CENTER); |
|
|
|
showLabel.addActionListener(new ActionListener() { |
|
|
|
showLabel.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -96,11 +99,17 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane { |
|
|
|
return jPanel; |
|
|
|
return jPanel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected ChartTextAttrPane getChartTextAttrPane() { |
|
|
|
|
|
|
|
if (isMulti(gaugeStyle)) { |
|
|
|
|
|
|
|
return new ChartTextAttrPaneWithAuto(false, true); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return new ChartTextAttrPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createValueDefinition(){ |
|
|
|
private JPanel createValueDefinition(){ |
|
|
|
switch (gaugeStyle){ |
|
|
|
switch (gaugeStyle){ |
|
|
|
case RING: |
|
|
|
case RING: |
|
|
|
minMaxValuePane = new MinMaxValuePaneWithOutTick(); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case SLOT: |
|
|
|
case SLOT: |
|
|
|
minMaxValuePane = new MinMaxValuePaneWithOutTick(); |
|
|
|
minMaxValuePane = new MinMaxValuePaneWithOutTick(); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -108,18 +117,18 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane { |
|
|
|
minMaxValuePane = new VanChartMinMaxValuePane(); |
|
|
|
minMaxValuePane = new VanChartMinMaxValuePane(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), minMaxValuePane); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), minMaxValuePane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createTickColorPane(double[] row, double[] col){ |
|
|
|
private JPanel createTickColorPane(double[] row, double[] col){ |
|
|
|
mainTickColor = new ColorSelectBox(100); |
|
|
|
mainTickColor = new ColorSelectBox(100); |
|
|
|
secTickColor = new ColorSelectBox(100); |
|
|
|
secTickColor = new ColorSelectBox(100); |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Main_Graduation_Line")), mainTickColor}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Main_Graduation_Line")), mainTickColor}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Second_Graduation_Line")), secTickColor}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Second_Graduation_Line")), secTickColor}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); |
|
|
|
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); |
|
|
|
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TickColor"), panel); |
|
|
|
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_TickColor"), panel); |
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); |
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); |
|
|
|
return jPanel; |
|
|
|
return jPanel; |
|
|
|
} |
|
|
|
} |
|
|
|