Browse Source

REPORT-10591 自适应插件内置 国际化

research/10.0
XiaXiang 6 years ago
parent
commit
c9fcaab0d0
  1. 8
      designer-base/src/main/java/com/fr/conf/FitAttrState.java
  2. 22
      designer-base/src/main/java/com/fr/design/mainframe/menupane/BrowserFitAttrPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/menupane/FitPreviewPane.java
  4. 6
      designer-base/src/main/java/com/fr/design/mainframe/menupane/ReportFitAttrAction.java
  5. 2
      designer-base/src/main/java/com/fr/design/mainframe/menupane/ReportFitAttrPane.java
  6. 8
      designer-base/src/main/java/com/fr/design/mainframe/menupane/TemplateBrowserFitAttrPane.java
  7. 2
      designer-base/src/main/java/com/fr/design/mainframe/menupane/TemplateFitAttrPane.java
  8. BIN
      designer-base/src/main/resources/com/fr/design/images/reportfit/fit.png
  9. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/00.png
  10. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/10.png
  11. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/11.png
  12. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/20.png
  13. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/21.png
  14. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/30.png
  15. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/00.png
  16. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/10.png
  17. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/11.png
  18. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/20.png
  19. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/21.png
  20. 0
      designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/30.png
  21. 2
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  22. 2
      designer-form/src/main/java/com/fr/design/mainframe/widget/propertypane/BrowserFitPropertyEditor.java

8
designer-base/src/main/java/com/fr/conf/FitAttrState.java

@ -11,7 +11,7 @@ public enum FitAttrState {
DEFAULT(0) {
@Override
public String description() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit_Default");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Default");
}
},
@ -19,21 +19,21 @@ public enum FitAttrState {
HORIZONTAL_FIT(1) {
@Override
public String description() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit_Horizontal");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Horizontal");
}
},
// 双向自适应, 横纵向都是根据页面宽高来计算
DOUBLE_FIT(2) {
@Override
public String description() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit_Horizontal_Vertical");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Horizontal_Vertical");
}
},
NOT_FIT(3) {
@Override
public String description() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit_No");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-No");
}
};

22
designer-base/src/main/java/com/fr/design/mainframe/menupane/BrowserFitAttrPane.java

@ -74,9 +74,9 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
ActionListener actionListener = getPreviewActionListener();
fontRadioGroup = new FontRadioGroup();
fontFitRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Fit"));
fontFitRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit"));
fontFitRadio.setSelected(true);
fontNotFitRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit_No"));
fontNotFitRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-No"));
addRadioToGroup(fontRadioGroup, fontFitRadio, fontNotFitRadio);
fontRadioGroup.addActionListener(actionListener);
@ -96,8 +96,8 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
protected Component[][] initFitComponents() {
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Fit-Font")), fontFitRadio, null, fontNotFitRadio},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Fit-Element")), defaultRadio, horizonRadio, doubleRadio, notFitRadio}
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Font")), fontFitRadio, null, fontNotFitRadio},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Element")), defaultRadio, horizonRadio, doubleRadio, notFitRadio}
};
return components;
}
@ -110,7 +110,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
private JPanel initGlobalOpsPane(final ReportFitAttr globalFitAttr) {
final JPanel globalOpsPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
globalCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Use-Global"));
globalCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-UseGlobal"));
globalOpsPane.add(globalCheck);
globalCheck.addActionListener(new ActionListener() {
@Override
@ -123,14 +123,14 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
fitRadionGroup.selectIndexButton(attr.fitStateInPC());
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled());
remove(BrowserFitAttrPane.this.borderPane);
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Global"));
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Global"));
} else {
ReportFitAttrProvider attr = localFitAttr;
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont());
fitRadionGroup.selectIndexButton(attr.fitStateInPC());
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled());
remove(BrowserFitAttrPane.this.borderPane);
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Local"));
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Local"));
}
fontRadioGroup.setEnabled(isLocalConfig);
fitRadionGroup.setEnabled(isLocalConfig);
@ -140,7 +140,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
}
});
editGlobalOps = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Edit-Global"));
editGlobalOps = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-EditGlobal"));
editGlobalOps.setVisible(false);
editGlobalOps.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
@ -165,7 +165,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Attr-Set");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-AttrSet");
}
@Override
@ -175,7 +175,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
attr = ReportFitConfig.getInstance().getFrmFitAttr();
populateGlobalComponents();
} else {
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Local"));
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Local"));
}
this.localFitAttr = attr;
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont());
@ -188,7 +188,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
fontRadioGroup.setEnabled(false);
fitRadionGroup.setEnabled(false);
editGlobalOps.setVisible(true);
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Global"));
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Global"));
}
//有八种组合, 不过有意义的就是6种, 以此为key去缓存里找对应的预览图片

2
designer-base/src/main/java/com/fr/design/mainframe/menupane/FitPreviewPane.java

@ -67,7 +67,7 @@ public class FitPreviewPane extends BasicPane {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Preview");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Preview");
}

6
designer-base/src/main/java/com/fr/design/mainframe/menupane/ReportFitAttrAction.java

@ -28,7 +28,7 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit-Template");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Template");
}
@Override
@ -44,7 +44,7 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit-Elementcase");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Elementcase");
}
@Override
@ -67,7 +67,7 @@ public class ReportFitAttrAction extends JTemplateAction {
}
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/fit.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/reportfit/fit.png"));
}
/**

2
designer-base/src/main/java/com/fr/design/mainframe/menupane/ReportFitAttrPane.java

@ -50,7 +50,7 @@ public class ReportFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
* @return 标题
*/
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit-Attr");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Attr");
}
}

8
designer-base/src/main/java/com/fr/design/mainframe/menupane/TemplateBrowserFitAttrPane.java

@ -21,8 +21,8 @@ public class TemplateBrowserFitAttrPane extends BrowserFitAttrPane {
@Override
protected Component[][] initFitComponents() {
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Fit-Font")), fontFitRadio, null, fontNotFitRadio},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Fit-Element")), horizonRadio, doubleRadio, notFitRadio}
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Font")), fontFitRadio, null, fontNotFitRadio},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Element")), horizonRadio, doubleRadio, notFitRadio}
};
return components;
}
@ -41,9 +41,9 @@ public class TemplateBrowserFitAttrPane extends BrowserFitAttrPane {
} else if (fitAttr.fitStateInPC() == 0) {
attr = new ReportFitAttr();
attr.setFitStateInPC(3);
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Local"));
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Local"));
} else {
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Local"));
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Local"));
}
this.localFitAttr = attr;
fontRadioGroup.selectFontFit((attr).isFitFont());

2
designer-base/src/main/java/com/fr/design/mainframe/menupane/TemplateFitAttrPane.java

@ -50,6 +50,6 @@ public class TemplateFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> {
* @return 标题
*/
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit-Attr");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Attr");
}
}

BIN
designer-base/src/main/resources/com/fr/design/images/reportfit/fit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/00.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/00.png

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 745 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/10.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/10.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/11.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/11.png

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/20.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/20.png

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/21.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/21.png

Before

Width:  |  Height:  |  Size: 788 B

After

Width:  |  Height:  |  Size: 788 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/30.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/30.png

Before

Width:  |  Height:  |  Size: 788 B

After

Width:  |  Height:  |  Size: 788 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/gray/00.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/00.png

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 745 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/gray/10.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/10.png

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/gray/11.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/11.png

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/gray/20.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/20.png

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/gray/21.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/21.png

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 782 B

0
designer-base/src/main/resources/com/fr/design/images/reportfit.preview/gray/30.png → designer-base/src/main/resources/com/fr/design/images/reportfit/preview/gray/30.png

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 783 B

2
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -504,7 +504,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override
public ShortCut[] shortcut4TemplateMenu() {
if (this.index == FORM_TAB) {
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]);
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]);
} else {
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, this.elementCaseDesign.shortcut4TemplateMenu());
}

2
designer-form/src/main/java/com/fr/design/mainframe/widget/propertypane/BrowserFitPropertyEditor.java

@ -25,7 +25,7 @@ public class BrowserFitPropertyEditor {
}
try {
CRPropertyDescriptor propertyDescriptors = new CRPropertyDescriptor("fitStateInPC", temp).setEditorClass(BrowserFitEditor.class)
.setRendererClass(BrowserFitRender.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Fit-In-Web"))
.setRendererClass(BrowserFitRender.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-In-Web"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced");
return propertyDescriptors;
} catch (IntrospectionException e) {

Loading…
Cancel
Save