Browse Source

添加国际化,修改PMD

master
kerry 8 years ago
parent
commit
3e1bf1e4ba
  1. 8
      designer_base/src/com/fr/design/locale/designer.properties
  2. 8
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  3. 8
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  4. 8
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  5. 8
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  6. 8
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  7. 18
      designer_base/src/com/fr/design/style/background/BackgroundFactory.java
  8. 26
      designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java
  9. 5
      designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane4Browser.java
  10. 5
      designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java

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

@ -510,3 +510,11 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title=
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=

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

@ -510,3 +510,11 @@ FR-Designer_Create_Tree=Build Tree
FR-Designer_Set_Callback_Function=Set Callback Function
FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title=
FR-Designer_Background_Null=No Background
FR-Designer_Background_Color=Color
FR-Designer_Background_Texture=Texture
FR-Designer_Background_Pattern=Pattern
FR-Designer_Background_Gradient_Color=Gradient Color
FR-Designer_Background_Image=Image
FR-Designer_Background_Clear=Clear
FR-Designer_Background_Image_Select=Select Picture

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

@ -489,3 +489,11 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title=
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=

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

@ -484,3 +484,11 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title=
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=

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

@ -514,3 +514,11 @@ FR-Designer_Create_Tree=\u6784\u5EFA\u6811
FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570
FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6
FR-Designer_ConfirmDialog_Title=FineReport 8.0
FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F
FR-Designer_Background_Color=\u989C\u8272
FR-Designer_Background_Texture=\u7EB9\u7406
FR-Designer_Background_Pattern=\u56FE\u6848
FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272
FR-Designer_Background_Image=\u56FE\u7247
FR-Designer_Background_Clear=\u6E05\u9664
FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247

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

@ -502,3 +502,11 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title=
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=

18
designer_base/src/com/fr/design/style/background/BackgroundFactory.java

@ -34,32 +34,32 @@ public class BackgroundFactory {
private static void registerUniversal(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
map.put(null, BackgroundUIWrapper.create()
.setType(NullBackgroundPane.class).setTitle(Inter.getLocText("Background-Null")));
.setType(NullBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Null")));
map.put(ColorBackground.class, BackgroundUIWrapper.create()
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("Color")));
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color")));
map.put(TextureBackground.class, BackgroundUIWrapper.create()
.setType(TextureBackgroundPane.class).setTitle(Inter.getLocText("Background-Texture")));
.setType(TextureBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Texture")));
map.put(PatternBackground.class, BackgroundUIWrapper.create()
.setType(PatternBackgroundPane.class).setTitle(Inter.getLocText("Background-Pattern")));
.setType(PatternBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Pattern")));
map.put(GradientBackground.class, BackgroundUIWrapper.create()
.setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("Gradient-Color")));
.setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Gradient_Color")));
}
private static void registerImageBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
map.put(ImageBackground.class, BackgroundUIWrapper.create()
.setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("Image")));
.setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
}
private static void registerBrowserImageBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
map.put(ImageBackground.class, BackgroundUIWrapper.create()
.setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("Image")));
.setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
}
private static void registerButtonBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map){
map.put(ColorBackground.class, BackgroundUIWrapper.create()
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("Color")));
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color")));
map.put(ImageBackground.class, BackgroundUIWrapper.create()
.setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("Image")));
.setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
}

26
designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java

@ -34,10 +34,10 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
private ImageFileChooser imageFileChooser = null;
protected UILabel imageSizeLabel = new UILabel();
protected JRadioButton defaultRadioButton = null;
protected JRadioButton tiledRadioButton = null;
private JRadioButton extendRadioButton = null;
private JRadioButton adjustRadioButton = null;
protected UIRadioButton defaultRadioButton = null;
protected UIRadioButton tiledRadioButton = null;
private UIRadioButton extendRadioButton = null;
private UIRadioButton adjustRadioButton = null;
public ImageBackgroundPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -46,7 +46,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
JPanel previewContainerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(previewContainerPane, BorderLayout.CENTER);
JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Preview"));
JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preview"));
previewOwnerPane.setLayout(new BorderLayout());
previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER);
previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST);
@ -66,7 +66,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
selectFilePane.setBorder(BorderFactory.createEmptyBorder(8, 2, 4, 0));
UIButton selectPictureButton = new UIButton(
Inter.getLocText("Image-Select_Picture"));
Inter.getLocText("FR-Designer_Background_Image_Select"));
selectFilePane.add(selectPictureButton, BorderLayout.NORTH);
selectPictureButton.setMnemonic('S');
selectPictureButton.addActionListener(selectPictureActionListener);
@ -74,10 +74,10 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
selectFilePane.add(layoutPane, BorderLayout.CENTER);
//布局
defaultRadioButton = new UIRadioButton(Inter.getLocText("Default"));
tiledRadioButton = new UIRadioButton(Inter.getLocText("Image-Titled"));
extendRadioButton = new UIRadioButton(Inter.getLocText("Image-Extend"));
adjustRadioButton = new UIRadioButton(Inter.getLocText("Image-Adjust"));
defaultRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Default"));
tiledRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Titled"));
extendRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Extend"));
adjustRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Adjust"));
defaultRadioButton.addActionListener(layoutActionListener);
tiledRadioButton.addActionListener(layoutActionListener);
@ -85,7 +85,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
adjustRadioButton.addActionListener(layoutActionListener);
JPanel jp = new JPanel(new GridLayout(4, 1, 15, 15));
for (JRadioButton button : imageLayoutButtons()) {
for (UIRadioButton button : imageLayoutButtons()) {
jp.add(button);
}
layoutPane.add(jp);
@ -100,8 +100,8 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
return selectFilePane;
}
protected JRadioButton[] imageLayoutButtons() {
return new JRadioButton[]{
protected UIRadioButton[] imageLayoutButtons() {
return new UIRadioButton[]{
defaultRadioButton,
tiledRadioButton,
extendRadioButton,

5
designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane4Browser.java

@ -1,5 +1,6 @@
package com.fr.design.style.background.impl;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.stable.ArrayUtils;
import javax.swing.*;
@ -15,9 +16,9 @@ public class ImageBackgroundPane4Browser extends ImageBackgroundPane {
}
@Override
protected JRadioButton[] imageLayoutButtons() {
protected UIRadioButton[] imageLayoutButtons() {
return (JRadioButton[]) ArrayUtils.addAll(super.imageLayoutButtons(), new JRadioButton[] {
return (UIRadioButton[]) ArrayUtils.addAll(super.imageLayoutButtons(), new UIRadioButton[] {
defaultRadioButton,
tiledRadioButton,
});

5
designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java

@ -1,6 +1,5 @@
package com.fr.design.style.background.impl;
import com.fr.base.BaseUtils;
import com.fr.base.Style;
import com.fr.base.background.ImageBackground;
import com.fr.design.gui.ibutton.UIButton;
@ -45,9 +44,9 @@ public class ImageButtonBackgroundPane extends ImageBackgroundPane {
}
private void initButton() {
chooseButton = new UIButton(Inter.getLocText("Image-Select_Picture"));
chooseButton = new UIButton(Inter.getLocText("FR-Designer_Background_Image_Select"));
chooseButton.addActionListener(selectPictureActionListener);
clearButton = new UIButton(Inter.getLocText("Clear"));
clearButton = new UIButton(Inter.getLocText("FR-Designer_Background_Clear"));
clearButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
previewPane.setImage(null);

Loading…
Cancel
Save