Browse Source

Merge pull request #786 in BA/design from ~MANGO/design:dev to dev

* commit 'c3e8ef59f856ee702c91b98f464ffc600fc7fab0':
  优化代码
  修改国际化文件
  修改国际化
  修改国际化
  修改国际化
  增加国际化
  修改国际化
  地图添加缩放手势
  还原修改部分design代码。
master
superman 8 years ago
parent
commit
c63c8d0f91
  1. 4
      designer_base/src/com/fr/design/locale/designer.properties
  2. 4
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  3. 4
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  4. 4
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  5. 4
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  6. 4
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  7. 83
      designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java
  8. 13
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

4
designer_base/src/com/fr/design/locale/designer.properties

@ -585,5 +585,9 @@ FR-Designer-Move_Tab_First=move to first
FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_End=move to end
FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Next=move to next
FR-Designer-Move_Tab_Prev=move to previous FR-Designer-Move_Tab_Prev=move to previous
FR-Designer_AxisReversed=Axis Reversed
FR-Designer_Logarithmic=Logarithmic
FR-Designer_Chart_Log_Base=Log Base
FR-Designer_Chart_F_Radar_Axis=Chart_F_Radar_Axis
FR-Designer_Too_Large_To_Paste=too large to paste FR-Designer_Too_Large_To_Paste=too large to paste
FR-Designer_Too_Small_To_Paste=Too small to paste FR-Designer_Too_Small_To_Paste=Too small to paste

4
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -586,5 +586,9 @@ FR-Designer-Move_Tab_First=move to first
FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_End=move to end
FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Next=move to next
FR-Designer-Move_Tab_Prev=move to previous FR-Designer-Move_Tab_Prev=move to previous
FR-Designer_AxisReversed=Axis in reverse order
FR-Designer_Logarithmic=Log scale
FR-Designer_Chart_Log_Base=Log Base
FR-Designer_Chart_F_Radar_Axis=Value Axis
FR-Designer_Too_Large_To_Paste=Too large to paste! FR-Designer_Too_Large_To_Paste=Too large to paste!
FR-Designer_Too_Small_To_Paste=Too small to paste! FR-Designer_Too_Small_To_Paste=Too small to paste!

4
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -556,3 +556,7 @@ FR-Designer-Move_Tab_First=
FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_End=
FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Next=
FR-Designer-Move_Tab_Prev= FR-Designer-Move_Tab_Prev=
FR-Designer_AxisReversed=\u8EF8\u9006\u914D\u5217
FR-Designer_Logarithmic=\u5BFE\u6570\u76EE\u76DB\u308A
FR-Designer_Chart_Log_Base=\u5E95\u6570
FR-Designer_Chart_F_Radar_Axis=\u5782\u76F4\u8EF8

4
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -553,3 +553,7 @@ FR-Designer-Move_Tab_First=
FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_End=
FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Next=
FR-Designer-Move_Tab_Prev= FR-Designer-Move_Tab_Prev=
FR-Designer_AxisReversed=\uCD95\uC5ED\uC21C
FR-Designer_Logarithmic=\uB85C\uADF8\uB208\uAE08
FR-Designer_Chart_Log_Base=\uAE30\uC218
FR-Designer_Chart_F_Radar_Axis=\uAC12\uCD95

4
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -590,5 +590,9 @@ FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D
FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E
FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8
FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8
FR-Designer_AxisReversed=\u8F74\u9006\u5E8F
FR-Designer_Logarithmic=\u5BF9\u6570\u523B\u5EA6
FR-Designer_Chart_Log_Base=\u5E95\u6570
FR-Designer_Chart_F_Radar_Axis=\u503C\u8F74
FR-Designer_Too_Large_To_Paste=\u7EC4\u4EF6\u5927\u5C0F\u8D85\u51FA\u8FB9\u754C\uFF0C\u65E0\u6CD5\u7C98\u8D34\uFF01 FR-Designer_Too_Large_To_Paste=\u7EC4\u4EF6\u5927\u5C0F\u8D85\u51FA\u8FB9\u754C\uFF0C\u65E0\u6CD5\u7C98\u8D34\uFF01
FR-Designer_Too_Small_To_Paste=\u6B64\u5904\u65E0\u6CD5\u7C98\u8D34\uFF0C\u5C0F\u4E8E\u7EC4\u4EF6\u6700\u5C0F\u9AD8\u5EA6\uFF01 FR-Designer_Too_Small_To_Paste=\u6B64\u5904\u65E0\u6CD5\u7C98\u8D34\uFF0C\u5C0F\u4E8E\u7EC4\u4EF6\u6700\u5C0F\u9AD8\u5EA6\uFF01

4
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -578,5 +578,9 @@ FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D
FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E
FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5
FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5
FR-Designer_AxisReversed=\u8EF8\u9006\u5E8F
FR-Designer_Logarithmic=\u5C0D\u6578\u523B\u5EA6
FR-Designer_Chart_Log_Base=\u5E95\u6578
FR-Designer_Chart_F_Radar_Axis=\u503C\u8EF8
FR-Designer_Too_Large_To_Paste=\u7D44\u4EF6\u5927\u5C0F\u8D85\u51FA\u908A\u754C\uFF0C\u7121\u6CD5\u7C98\u8CBC\uFF01 FR-Designer_Too_Large_To_Paste=\u7D44\u4EF6\u5927\u5C0F\u8D85\u51FA\u908A\u754C\uFF0C\u7121\u6CD5\u7C98\u8CBC\uFF01
FR-Designer_Too_Small_To_Paste=\u6B64\u8655\u7121\u6CD5\u7C98\u8CBC\uFF0C\u5C0F\u65BC\u7D44\u4EF6\u6700\u5C0F\u9AD8\u5EA6\uFF01 FR-Designer_Too_Small_To_Paste=\u6B64\u8655\u7121\u6CD5\u7C98\u8CBC\uFF0C\u5C0F\u65BC\u7D44\u4EF6\u6700\u5C0F\u9AD8\u5EA6\uFF01

83
designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java

@ -30,7 +30,8 @@ public class MinMaxValuePane extends JPanel {
protected UICheckBox isCustomSecUnitBox; protected UICheckBox isCustomSecUnitBox;
protected UITextField secUnitField; protected UITextField secUnitField;
public MinMaxValuePane() {
public MinMaxValuePane() {
minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"})); minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"}));
minValueField = new UITextField(6); minValueField = new UITextField(6);
maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"})); maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"}));
@ -39,41 +40,45 @@ public class MinMaxValuePane extends JPanel {
mainUnitField = new UITextField(6); mainUnitField = new UITextField(6);
isCustomSecUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_SecondGraduationUnit")); isCustomSecUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_SecondGraduationUnit"));
secUnitField = new UITextField(6); secUnitField = new UITextField(6);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p, f };
double[] rowSize = { p, p, p, p, p, p, p, p};
Component[][] components = getPanelComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
for(int i = 0; i < components.length; i+=2) {
((UICheckBox)components[i][0]).addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkBoxUse();
}
});
ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]);
}
}
protected Component[][] getPanelComponents() {
return new Component[][]{
new Component[]{minCheckBox},
new Component[]{minValueField},
new Component[]{maxCheckBox},
new Component[]{maxValueField},
new Component[]{isCustomMainUnitBox},
new Component[]{mainUnitField},
new Component[]{isCustomSecUnitBox},
new Component[]{secUnitField},
};
}
private void checkBoxUse() { double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
Component[][] components = getPanelComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, getRowSize(p), columnSize);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
addComponentListener(components);
}
protected double[] getRowSize(double p) {
return new double[]{p, p, p, p};
}
public void addComponentListener(Component[][] components) {
for (int i = 0; i < components.length; i++) {
((UICheckBox) components[i][0]).addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkBoxUse();
}
});
ChartSwingUtils.addListener((UICheckBox) components[i][0], (UITextField) components[i][1]);
}
}
protected Component[][] getPanelComponents() {
return new Component[][]{
new Component[]{minCheckBox, minValueField},
new Component[]{maxCheckBox, maxValueField},
new Component[]{isCustomMainUnitBox, mainUnitField},
new Component[]{isCustomSecUnitBox, secUnitField},
};
}
protected void checkBoxUse() {
minValueField.setEnabled(minCheckBox.isSelected()); minValueField.setEnabled(minCheckBox.isSelected());
maxValueField.setEnabled(maxCheckBox.isSelected()); maxValueField.setEnabled(maxCheckBox.isSelected());
@ -104,7 +109,7 @@ public class MinMaxValuePane extends JPanel {
if(axis.getMinValue() != null) { if(axis.getMinValue() != null) {
minValueField.setText(axis.getMinValue().toString()); minValueField.setText(axis.getMinValue().toString());
} }
} }
// 最大值 // 最大值
if (axis.isCustomMaxValue()) { if (axis.isCustomMaxValue()) {
@ -112,7 +117,7 @@ public class MinMaxValuePane extends JPanel {
if(axis.getMaxValue() != null) { if(axis.getMaxValue() != null) {
maxValueField.setText(axis.getMaxValue().toString()); maxValueField.setText(axis.getMaxValue().toString());
} }
} }
// 主次刻度单位 // 主次刻度单位
if (axis.isCustomMainUnit()) { if (axis.isCustomMainUnit()) {
@ -120,7 +125,7 @@ public class MinMaxValuePane extends JPanel {
if(axis.getMainUnit() != null) { if(axis.getMainUnit() != null) {
mainUnitField.setText(axis.getMainUnit().toString()); mainUnitField.setText(axis.getMainUnit().toString());
} }
} }
if(axis.isCustomSecUnit()) { if(axis.isCustomSecUnit()) {
isCustomSecUnitBox.setSelected(true); isCustomSecUnitBox.setSelected(true);
@ -153,7 +158,7 @@ public class MinMaxValuePane extends JPanel {
updateUnit(axis); updateUnit(axis);
} }
private void updateUnit(Axis axis) { protected void updateUnit(Axis axis) {
// 主要刻度 // 主要刻度
if (isCustomMainUnitBox.isSelected()){ if (isCustomMainUnitBox.isSelected()){
String increment = mainUnitField.getText(); String increment = mainUnitField.getText();

13
designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -72,7 +72,7 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane = new ChartAxisLineStylePane(); axisLineStylePane = new ChartAxisLineStylePane();
zeroPane = aliagnZero4Second(); zeroPane = aliagnZero4Second();
axisReversed = new UICheckBox(Inter.getLocText("AxisReversed")); axisReversed = new UICheckBox(Inter.getLocText("FR-Designer_AxisReversed"));
unitCombox = new UIComboBox(ChartConstants.UNIT_I18N_VALUES); unitCombox = new UIComboBox(ChartConstants.UNIT_I18N_VALUES);
formatPane = new FormatPane(); formatPane = new FormatPane();
axisLabelPane = new ChartAxisLabelPane(); axisLabelPane = new ChartAxisLabelPane();
@ -151,11 +151,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f};
double[] rowSize = { p, p, p}; double[] rowSize = { p, p};
Component[][] component = new Component[][]{ Component[][] component = new Component[][]{
new Component[]{null,initMinMaxValue(),null}, new Component[]{null,initMinMaxValue(),null},
new Component[]{null, addLogarithmicPane2ValuePane(), null}, new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()},
new Component[]{null, null, addLogText()},
}; };
return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize);
} }
@ -172,8 +171,8 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
// 返回对数相关界面. 百分比 没有此界面. // 返回对数相关界面. 百分比 没有此界面.
protected JPanel addLogarithmicPane2ValuePane() { protected JPanel addLogarithmicPane2ValuePane() {
JPanel labelLogPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); JPanel labelLogPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
labelLogPane.add(logBox = new UICheckBox(Inter.getLocText("Logarithmic")+":")); labelLogPane.add(logBox = new UICheckBox(Inter.getLocText("FR-Designer_Logarithmic")+":"));
labelLogPane.add(new UILabel(Inter.getLocText("Chart_Log_Base"))); labelLogPane.add(new UILabel(Inter.getLocText("FR-Designer_Chart_Log_Base")));
logBaseField = new UITextField(4); logBaseField = new UITextField(4);
logBaseField.setText("10"); logBaseField.setText("10");
@ -222,7 +221,7 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
* @return 返回标题. * @return 返回标题.
*/ */
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Chart_F_Radar_Axis"); return Inter.getLocText("FR-Designer_Chart_F_Radar_Axis");
} }
@Override @Override

Loading…
Cancel
Save