|
|
|
@ -13,6 +13,7 @@ import com.fr.design.mainframe.chart.gui.style.series.ColorPickerPaneWithFormula
|
|
|
|
|
import com.fr.design.mainframe.chart.gui.style.series.UIColorPickerPane; |
|
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.GaugeDetailStyle; |
|
|
|
|
import com.fr.plugin.chart.base.AttrLabel; |
|
|
|
@ -71,15 +72,15 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createGaugeLayoutPane() { |
|
|
|
|
gaugeLayout = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")}); |
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Page_Setup_Orientation"),gaugeLayout); |
|
|
|
|
gaugeLayout = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")}); |
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Report_Page_Setup_Orientation"),gaugeLayout); |
|
|
|
|
gaugeLayout.addChangeListener(new ChangeListener() { |
|
|
|
|
@Override |
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
changeLabelPosition(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout"), panel); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Layout"), panel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void changeLabelPosition() { |
|
|
|
@ -109,10 +110,10 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
JPanel centerPanel = TableLayoutHelper.createTableLayoutPane(getDiffComponentsWithGaugeStyle(), row, col); |
|
|
|
|
panel.add(centerPanel, BorderLayout.CENTER); |
|
|
|
|
if(rotate != null){ |
|
|
|
|
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Rotation_Direction"), rotate); |
|
|
|
|
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Rotation_Direction"), rotate); |
|
|
|
|
panel.add(panel1, BorderLayout.NORTH); |
|
|
|
|
} |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[][] getDiffComponentsWithGaugeStyle() { |
|
|
|
@ -124,7 +125,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getPaneBackgroundColor(), |
|
|
|
|
getInnerPaneBackgroundColor(), |
|
|
|
|
new Component[]{createRadiusPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null}, |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null}, |
|
|
|
|
getChutePercent() |
|
|
|
|
}; |
|
|
|
|
case SLOT: |
|
|
|
@ -132,7 +133,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getNeedleColor(), |
|
|
|
|
getSlotBackgroundColor(), |
|
|
|
|
new Component[]{createRadiusPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null}, |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null}, |
|
|
|
|
getChutePercent() |
|
|
|
|
}; |
|
|
|
|
case THERMOMETER: |
|
|
|
@ -140,7 +141,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getNeedleColor(), |
|
|
|
|
getSlotBackgroundColor(), |
|
|
|
|
new Component[]{createRadiusPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Length_Set")), null}, |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Length_Set")), null}, |
|
|
|
|
getThermometerWidth() |
|
|
|
|
}; |
|
|
|
|
default: |
|
|
|
@ -150,58 +151,58 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
getHingeBackgroundColor(), |
|
|
|
|
getNeedleColor(), |
|
|
|
|
getPaneBackgroundColor(), |
|
|
|
|
new Component[]{createRadiusPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null} |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getHingeColor() { |
|
|
|
|
hingeColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hinge")),hingeColor}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Hinge")),hingeColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getHingeBackgroundColor() { |
|
|
|
|
hingeBackgroundColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hinge_Background")),hingeBackgroundColor}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Hinge_Background")),hingeBackgroundColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getNeedleColor() { |
|
|
|
|
needleColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Needle")),needleColor}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Needle")),needleColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getPaneBackgroundColor() { |
|
|
|
|
paneBackgroundColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Pane_Background")),paneBackgroundColor}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Pane_Background")),paneBackgroundColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getSlotBackgroundColor() { |
|
|
|
|
slotBackgroundColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Slot_Background")),slotBackgroundColor}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Slot_Background")),slotBackgroundColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getThermometerWidth() { |
|
|
|
|
thermometerWidth = new UISpinner(0, Double.MAX_VALUE, 0.1, 10); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Thermometer_Width")),thermometerWidth}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Thermometer_Width")),thermometerWidth}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getChutePercent() { |
|
|
|
|
chutePercent = new UINumberDragPane(0, 100, 1); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Chute_Percent")),chutePercent}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Chute_Percent")),chutePercent}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initRotate() { |
|
|
|
|
rotate = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AntiClockWise"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ClockWise")}); |
|
|
|
|
rotate = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_AntiClockWise"), Toolkit.i18nText("Fine-Design_Chart_ClockWise")}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getInnerPaneBackgroundColor() { |
|
|
|
|
innerPaneBackgroundColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Inner_Pane_Background")),innerPaneBackgroundColor}; |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Inner_Pane_Background")),innerPaneBackgroundColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createGaugeBandsPane() { |
|
|
|
|
colorPickerPane = new ColorPickerPaneWithFormula(parentPane, "meterString"); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Range"), colorPickerPane); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Range"), colorPickerPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|