Browse Source

CHART-9435 修改国际化方法路径

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
7f09adc46d
  1. 39
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java
  2. 15
      designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java

39
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

@ -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);
}

15
designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java

@ -8,6 +8,7 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -53,21 +54,21 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
startAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0);
endAngle = new UISpinner(MIN_ANGLE, MAX_ANGLE, 1, 0);
innerRadius = new UISpinner(0, 100, 1, 0);
supportRotation = new UIButtonGroup<Boolean>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
supportRotation = new UIButtonGroup<Boolean>(new String[]{Toolkit.i18nText("Fine-Design_Chart_On"), Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Angle")),startAngle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Angle")),endAngle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Inner_Radius")),innerRadius},
new Component[]{createRadiusPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Radius_Set")),null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Rotation")),supportRotation}
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Start_Angle")),startAngle},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_End_Angle")),endAngle},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Inner_Radius")),innerRadius},
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")),null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Rotation")),supportRotation}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
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);
}
public void populateBean(Plot plot) {

Loading…
Cancel
Save