Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~zheng/C-design into release/10.0

master
zheng 6 years ago
parent
commit
8b4baf182b
  1. 26
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 4
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  3. 72
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  4. 4
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  5. 33
      designer-base/src/test/java/com/fr/design/DesignerEnvManagerTest.java
  6. 40
      designer-base/src/test/java/com/fr/design/actions/help/TutorialActionTest.java
  7. 63
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java
  8. 24
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java
  9. 2
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartStyleAxisPane.java
  10. 8
      designer-chart/src/main/java/com/fr/design/chart/axis/MinMaxValuePane.java
  11. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java
  12. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java
  13. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java
  14. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java
  15. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java
  16. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java
  17. 2
      designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java
  18. 4
      designer-chart/src/main/java/com/fr/design/chart/report/MapDataPane.java
  19. 5
      designer-chart/src/main/java/com/fr/design/chart/report/MapMoreReportIndexPane.java
  20. 5
      designer-chart/src/main/java/com/fr/design/chart/report/MapMoreTableIndexPane.java
  21. 5
      designer-chart/src/main/java/com/fr/design/chart/report/MapReportDataSinglePane.java
  22. 2
      designer-chart/src/main/java/com/fr/design/chart/report/MapSinglePane.java
  23. 2
      designer-chart/src/main/java/com/fr/design/chart/report/MapTableCubeDataPane.java
  24. 9
      designer-chart/src/main/java/com/fr/design/chart/report/MapTableDataSinglePane.java
  25. 13
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  26. 12
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java
  27. 8
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java
  28. 19
      designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java
  29. 13
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java
  30. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java
  31. 3
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java
  32. 4
      designer-realize/src/main/java/com/fr/design/report/ValueVerifierEditPane.java
  33. 38
      designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java
  34. 950
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  35. 4
      designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java

26
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -19,8 +19,9 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogFormatter;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.xml.GeneralXMLTools;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
import com.fr.stable.EnvChangedListener;
@ -55,6 +56,7 @@ import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.FileHandler;
@ -700,6 +702,28 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return this.language;
}
/**
* 返回语言类型
*/
public Locale getLocale() {
// 性能
if (language <= 1) {
return Locale.CHINA;
}
Locale[] locales = supportLocale();
if (language <= locales.length) {
return locales[language - 1];
}
return Locale.CHINA;
}
// 当前系统支持的语言
protected Locale[] supportLocale() {
Inter.getInstance();
Map<Locale, String> languageMap = InterProviderFactory.getProvider().getSupportLocaleMap();
return languageMap.keySet().toArray(new Locale[languageMap.size()]);
}
/**
* 设置语言参数
*/

4
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -81,7 +81,9 @@ public class AboutPane extends JPanel {
contentPane.add(urlActionPane);
contentPane.add(emailPane);
contentPane.add(getRemarkPane());
if (FRContext.getLocale().equals(Locale.CHINA) || FRContext.getLocale().equals(Locale.TAIWAN)){
contentPane.add(getRemarkPane());
}
if (shouldShowThanks()) {
addThankPane(contentPane);

72
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -1,24 +1,28 @@
package com.fr.design.actions.help;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.Utils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient;
import com.fr.stable.OperatingSystem;
import com.fr.general.http.HttpToolbox;
import com.fr.stable.CommonUtils;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.third.org.apache.http.HttpStatus;
import com.fr.third.org.apache.http.StatusLine;
import com.fr.third.org.apache.http.client.methods.HttpGet;
import javax.swing.KeyStroke;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import java.net.URI;
public class TutorialAction extends UpdateAction {
@ -56,28 +60,44 @@ public class TutorialAction extends UpdateAction {
* @param evt 事件
*/
public void actionPerformed(ActionEvent evt) {
String helpURL = CloudCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale());
if (helpURL != null) {
HttpClient client = new HttpClient(helpURL);
if(client.getResponseCode() != -1) {
try {
Desktop.getDesktop().browse(new URI(helpURL));
return;
} catch (Exception e) {
//出了异常的话, 依然打开本地教程
}
String helpURL = CloudCenter.getInstance().acquireUrlByKind(createDocKey());
if (isServerOnline(helpURL)) {
try {
Desktop.getDesktop().browse(new URI(helpURL));
return;
} catch (Exception e) {
}
}
if (OperatingSystem.isMacOS()) {
if (OperatingSystem.isUnix()) {
nativeExcuteMacInstallHomePrograms("helptutorial.app");
}
else {
} else {
Utils.nativeExcuteInstallHomePrograms("helptutorial.exe");
}
}
// 生成帮助文档 sitecenter key, help.zh_CN.10
protected String createDocKey() {
String locale = FRContext.getLocale().toString();
return CommonUtils.join(new String[]{ "help", locale, ProductConstants.MAIN_VERSION }, ".");
}
// 判断是否可以访问在线文档
protected boolean isServerOnline(String url) {
if (StringUtils.isEmpty(url)) {
return false;
}
HttpGet getHelp = new HttpGet(url);
try {
StatusLine statusLine = HttpToolbox.getHttpClient(url).execute(getHelp).getStatusLine();
return statusLine.getStatusCode() == HttpStatus.SC_OK;
} catch (Exception ignore) {
// 网络异常
return false;
}
}
public static final MenuKeySet HELP_TUTORIAL = new MenuKeySet() {
@Override
public char getMnemonic() {

4
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -535,7 +535,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_No-Privilege") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Permission_Denied") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE);
return false;
}
collectInfo();
@ -585,7 +585,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_No-Privilege") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Permission_Denied") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE);
return false;
}
editingFILE = fileChooser.getSelectedFILE();

33
designer-base/src/test/java/com/fr/design/DesignerEnvManagerTest.java

@ -0,0 +1,33 @@
package com.fr.design;
import com.fr.locale.InterProviderFactory;
import junit.framework.TestCase;
import java.util.HashSet;
import java.util.Locale;
public class DesignerEnvManagerTest extends TestCase{
public void testGetLocale() {
DesignerEnvManager envManager = new DesignerEnvManager();
assertEquals("默认值", envManager.getLocale(), Locale.CHINA);
HashSet<Locale> result = new HashSet<>();
Locale[] locales = envManager.supportLocale();
int len = locales.length;
assertEquals(len, InterProviderFactory.getProvider().getSupportLocaleMap().size());
for (int i = 0; i < len; i++) {
envManager.setLanguage(i + 1);
Locale locale = envManager.getLocale();
result.add(locale);
}
assertEquals("每个int都有对应的locale", result.size(), len);
envManager.setLanguage(998);
assertEquals("上边界", envManager.getLocale(), Locale.CHINA);
envManager.setLanguage(-998);
assertEquals("下边界", envManager.getLocale(), Locale.CHINA);
}
}

40
designer-base/src/test/java/com/fr/design/actions/help/TutorialActionTest.java

@ -0,0 +1,40 @@
package com.fr.design.actions.help;
import com.fr.general.GeneralContext;
import com.fr.stable.ProductConstants;
import junit.framework.TestCase;
import java.util.Locale;
import java.util.UUID;
public class TutorialActionTest extends TestCase{
public void testCreateKey() {
TutorialAction action = new TutorialAction();
GeneralContext.setLocale(Locale.US);
String enKey = action.createDocKey();
assertTrue(enKey.indexOf(Locale.US.toString()) != -1);
assertTrue(enKey.indexOf(ProductConstants.MAIN_VERSION) != -1);
GeneralContext.setLocale(Locale.CHINA);
String zhKey = action.createDocKey();
assertTrue(zhKey.indexOf(Locale.CHINA.toString()) != -1);
Locale pt = new Locale("pt", "PT");
GeneralContext.setLocale(pt);
String ptKey = action.createDocKey();
assertTrue(ptKey.indexOf(pt.toString()) != -1);
GeneralContext.setLanguage(998);
assertTrue(action.createDocKey().indexOf(Locale.CHINA.toString()) != -1);
}
public void testServerOnline() {
TutorialAction action = new TutorialAction();
assertFalse(action.isServerOnline(null));
assertFalse(action.isServerOnline("中文"));
assertTrue("百度暂时不会挂", action.isServerOnline("http://www.baidu.com"));
assertTrue("https测试", action.isServerOnline("https://www.baidu.com"));
assertFalse("连上是正常的", action.isServerOnline("https://www.fine-" + UUID.randomUUID() + ".com"));
}
}

63
designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java

@ -1,63 +0,0 @@
package com.fr.design.chart.axis;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import com.fr.chart.chartattr.ChartAlertValue;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import java.util.ArrayList;
import java.util.List;
public class ChartAlertLinePane extends JListControlPane {
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("ChartF-Alert-Line"),
ChartAlertValue.class, ChartAlertValuePane.class)
};
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Edit", "ChartF-Alert-Line"});
}
public void populate(ChartAlertValue[] alertList) {
if (alertList == null) {
alertList = new ChartAlertValue[0];
}
List<NameObject> nameObjectList = new ArrayList<NameObject>();
for (int i = 0; i < alertList.length; i++) {
ChartAlertValue value = alertList[i];
nameObjectList.add(new NameObject(value.getAlertPaneSelectName(), value));
}
if (!nameObjectList.isEmpty()) {
populate(nameObjectList.toArray(new NameObject[nameObjectList.size()]));
}
}
public ChartAlertValue[] updateAlertValues() {
Nameable[] res = update();
NameObject[] res_array = new NameObject[res.length];
java.util.Arrays.asList(res).toArray(res_array);
if (res_array.length < 1) {
return new ChartAlertValue[0];
}
List alertValueList = new ArrayList();
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
ChartAlertValue chartAlertValue = (ChartAlertValue) nameObject.getObject();
chartAlertValue.setAlertPaneSelectName(nameObject.getName());
alertValueList.add(chartAlertValue);
}
return (ChartAlertValue[]) alertValueList.toArray(new ChartAlertValue[alertValueList.size()]);
}
}

24
designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java

@ -61,12 +61,12 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
JPanel alertLinePane =FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
pane.add(alertLinePane);
alertLinePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ChartF-Alert-Line", "Set"})));
alertLinePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line_Setting")));
JPanel valuePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
alertLinePane.add(valuePane);
valuePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ChartF_Alert", "Value"}) + ":"));
valuePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Value") + ":"));
textField = new UITextField();
textField.setColumns(4);
@ -88,14 +88,14 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
JPanel lineStylePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
alertLinePane.add(lineStylePane);
lineStylePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Line-Style") + ":"));
lineStylePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Line_Style") + ":"));
lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
lineStylePane.add(lineCombo);
JPanel lineColorPane =FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
alertLinePane.add(lineColorPane);
lineColorPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ChartF-Alert-Line", "Color"}) + ":"));
lineColorPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line_Color") + ":"));
colorBox = new ColorSelectBox(80);
lineColorPane.add(colorBox);
@ -105,7 +105,7 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
JPanel tipPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
pane.add(tipPane);
tipPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Tip") + ":", null));
tipPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Tip") + ":", null));
JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
tipPane.add(centerPane);
@ -130,10 +130,10 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
double[] rowSize = {t, t, t, t, t};
double[] columnSize = {0.1, 0.2, 0.5, 0.2};
Component[][] components= {
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Content") + ":"), contentField = new UITextField(3)},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FRFont") + ":"), fontNameBox},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FRFont-Size") + ":"), fontSizeBox},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Layout") + ": "), leftButton = new UIRadioButton(getLeftName())},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Content") + ":"), contentField = new UITextField(3)},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Font") + ":"), fontNameBox},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Font_Size") + ":"), fontSizeBox},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Layout") + ": "), leftButton = new UIRadioButton(getLeftName())},
{null, null, rightButton = new UIRadioButton(getRightName())},
};
@ -148,16 +148,16 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
}
protected String getLeftName() {// 居左 居右
return com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Left");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_At_The_Left");
}
protected String getRightName() {
return com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Right");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_At_The_Right");
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("ChartF-Alert-Line");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line");
}
private void showFormulaPane() {

2
designer-chart/src/main/java/com/fr/design/chart/axis/ChartStyleAxisPane.java

@ -27,7 +27,7 @@ import com.fr.design.dialog.BasicPane;
public abstract class ChartStyleAxisPane extends BasicPane implements ListSelectionListener {
protected static final String CATE_AXIS = com.fr.design.i18n.Toolkit.i18nText("ChartF-Category_Axis");
protected static final String VALUE_AXIS = com.fr.design.i18n.Toolkit.i18nText("Chart_F_Radar_Axis");
protected static final String SECOND_AXIS = com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Second", "Chart_F_Radar_Axis"});
protected static final String SECOND_AXIS = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Second_Value_Axis");
private JList mainList;
private CardLayout cardLayout;
private JPanel cardDisplayPane = null;

8
designer-chart/src/main/java/com/fr/design/chart/axis/MinMaxValuePane.java

@ -31,13 +31,13 @@ public class MinMaxValuePane extends JPanel {
protected UITextField secUnitField;
public MinMaxValuePane() {
minCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Custom", "Min_Value"}));
minCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Custom_Min_Value"));
minValueField = new UITextField(6);
maxCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Custom", "Max_Value"}));
maxCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Custom_Max_Value"));
maxValueField = new UITextField(6);
isCustomMainUnitBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Custom", "FR-Chart_MainGraduationUnit"}));
isCustomMainUnitBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Main_Graduation_Unit"));
mainUnitField = new UITextField(6);
isCustomSecUnitBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Custom", "FR-Chart_SecondGraduationUnit"}));
isCustomSecUnitBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Second_Graduation_Unit"));
secUnitField = new UITextField(6);
double p = TableLayout.PREFERRED;

2
designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java

@ -11,7 +11,7 @@ public class SetAnalysisLineStyleAction extends ChartComponentAction{
public SetAnalysisLineStyleAction(ChartComponent chartComponent) {
super(chartComponent);
this.setName(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Set", "AnalysisLine"}));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Analysis_Line"));
}
@Override

2
designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java

@ -18,7 +18,7 @@ import com.fr.stable.StringUtils;
public class SetAxisStyleAction extends ChartComponentAction {
public SetAxisStyleAction(ChartComponent chartComponent) {
super(chartComponent);
this.setName(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Set", "ChartF-Axis", "Format"}));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Axis_Format"));
}
public void actionPerformed(ActionEvent e) {

2
designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java

@ -18,7 +18,7 @@ public class SetChartStyleAciton extends ChartComponentAction {
public SetChartStyleAciton(ChartComponent chartComponent) {
super(chartComponent);
this.setName(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-ChartFloat", "Style"}));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style"));
}
public void actionPerformed(ActionEvent e) {

2
designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java

@ -11,7 +11,7 @@ public class SetDataLabelStyleAction extends ChartComponentAction{
public SetDataLabelStyleAction(ChartComponent chartComponent) {
super(chartComponent);
this.setName(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Set", "Data-Label"}));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Data_Label"));
}
@Override

2
designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java

@ -19,7 +19,7 @@ public class SetPlotStyleAction extends ChartComponentAction {
public SetPlotStyleAction(ChartComponent chartComponent) {
super(chartComponent);
this.setName(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Set", "ChartF-Plot"}));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Plot"));
}
public void actionPerformed(ActionEvent e) {

2
designer-chart/src/main/java/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java

@ -19,7 +19,7 @@ public class SetTitleStyleAction extends ChartComponentAction {
public SetTitleStyleAction(ChartComponent chartComponent) {
super(chartComponent);
this.setName(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Set", "Title", "Style"}));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Title_Style"));
}
public void actionPerformed(ActionEvent e) {

2
designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java

@ -84,7 +84,7 @@ public class GisMapReportDataContentPane extends FurtherBasicBeanPane<GisMapRepo
this.add(northPane, BorderLayout.NORTH);
String[] columnNames = new String[]{com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Filed", "Title"}), com.fr.design.i18n.Toolkit.i18nText("Area_Value")};
String[] columnNames = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Title"), com.fr.design.i18n.Toolkit.i18nText("Area_Value")};
seriesPane = new UICorrelationPane(columnNames) {
public UITableEditor createUITableEditor() {
return new InnerTableEditor();

4
designer-chart/src/main/java/com/fr/design/chart/report/MapDataPane.java

@ -99,7 +99,7 @@ public class MapDataPane extends DataContentsPane {
return list;
}
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Chart-Map", "Data"});
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Map_Data");
}
};
pane.add(mainPane, BorderLayout.CENTER);
@ -127,7 +127,7 @@ public class MapDataPane extends DataContentsPane {
* @return 标题
*/
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Chart-Map", "Data"});
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Map_Data");
}
@Override

5
designer-chart/src/main/java/com/fr/design/chart/report/MapMoreReportIndexPane.java

@ -52,13 +52,14 @@ public class MapMoreReportIndexPane extends BasicBeanPane<MapSingleLayerReportDe
this.add(northPane, BorderLayout.NORTH);
northPane.setLayout(new FlowLayout(FlowLayout.LEFT));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Area_Name") + ":"));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":"));
areaNamePane = new TinyFormulaPane();
areaNamePane.setPreferredSize(new Dimension(120, 20));
northPane.add(areaNamePane);
tabPane = new UICorrelationPane(new String[]{com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Filed", "Title"}), com.fr.design.i18n.Toolkit.i18nText("Area_Value")}){
tabPane = new UICorrelationPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Title"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Value")){
public UITableEditor createUITableEditor() {
return new InnerTableEditor();
}

5
designer-chart/src/main/java/com/fr/design/chart/report/MapMoreTableIndexPane.java

@ -63,13 +63,14 @@ public class MapMoreTableIndexPane extends BasicBeanPane<MapSingleLayerTableDefi
this.add(northPane, BorderLayout.NORTH);
northPane.setLayout(new FlowLayout(FlowLayout.LEFT));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Area_Name") + ":"));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":"));
areaNameBox = new UIComboBox();
areaNameBox.setPreferredSize(new Dimension(120, 20));
northPane.add(areaNameBox);
tabPane = new UICorrelationPane(new String[]{com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Filed", "Title"}), com.fr.design.i18n.Toolkit.i18nText("Area_Value")}){
tabPane = new UICorrelationPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Title"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Value")){
public UITableEditor createUITableEditor() {
return new InnerTableEditor();
}

5
designer-chart/src/main/java/com/fr/design/chart/report/MapReportDataSinglePane.java

@ -50,12 +50,13 @@ public class MapReportDataSinglePane extends FurtherBasicBeanPane<MapSingleLayer
northPane.setLayout(new FlowLayout(FlowLayout.CENTER));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Area_Name") + ":", SwingConstants.RIGHT));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":", SwingConstants.RIGHT));
areaNamePane = new TinyFormulaPane();
areaNamePane.setPreferredSize(new Dimension(120, 20));
northPane.add(areaNamePane);
String[] columnNames = new String[]{com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Filed", "Title"}), com.fr.design.i18n.Toolkit.i18nText("Area_Value")};
String[] columnNames = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Title"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Value")};
seriesPane = new UICorrelationPane(columnNames) {
public UITableEditor createUITableEditor() {
return new InnerTableEditor();

2
designer-chart/src/main/java/com/fr/design/chart/report/MapSinglePane.java

@ -80,7 +80,7 @@ public class MapSinglePane extends FurtherBasicBeanPane<TopDefinitionProvider> {
* 界面标题
*/
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"SingleLayer", "Chart-Map"});
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Single_Layer_Map");
}
/**

2
designer-chart/src/main/java/com/fr/design/chart/report/MapTableCubeDataPane.java

@ -33,7 +33,7 @@ public class MapTableCubeDataPane extends FurtherBasicBeanPane<MapMoreLayerTable
pane.setLayout(new FlowLayout(FlowLayout.LEFT));
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Select_Data_Set") + ":", SwingConstants.RIGHT);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Select") + ":", SwingConstants.RIGHT);
dataFromBox = new DatabaseTableDataPane(label) {
protected void userEvent() {

9
designer-chart/src/main/java/com/fr/design/chart/report/MapTableDataSinglePane.java

@ -50,7 +50,7 @@ public class MapTableDataSinglePane extends FurtherBasicBeanPane<MapSingleLayerT
northPane.setLayout(new FlowLayout(FlowLayout.LEFT));
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Select_Data_Set") + ":", SwingConstants.RIGHT);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Select") + ":", SwingConstants.RIGHT);
northPane.add(fromTableData = new DatabaseTableDataPane(label) {
@Override
@ -65,7 +65,7 @@ public class MapTableDataSinglePane extends FurtherBasicBeanPane<MapSingleLayerT
fromTableData.setPreferredSize(new Dimension(180, 20));
northPane.add(fromTableData);
UILabel nameLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Area_Name") + ":", SwingConstants.RIGHT);
UILabel nameLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":", SwingConstants.RIGHT);
areaNameBox = new UIComboBox();
areaNameBox.setPreferredSize(new Dimension(80, 20));
@ -81,7 +81,8 @@ public class MapTableDataSinglePane extends FurtherBasicBeanPane<MapSingleLayerT
pane.add(areaNamePane, BorderLayout.NORTH);
String[] titles = {com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Filed", "Title"}), com.fr.design.i18n.Toolkit.i18nText("Area_Value")};
String[] titles = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Title"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Value")};
titleValuePane = new UICorrelationPane(titles){
public UITableEditor createUITableEditor() {
return new InnerTableEditor();
@ -126,7 +127,7 @@ public class MapTableDataSinglePane extends FurtherBasicBeanPane<MapSingleLayerT
* 界面弹出标题
*/
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("DS-TableData");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata");
}
private void stopEditing() {

13
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -10,6 +10,7 @@ import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.properties.items.Item;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
@ -42,6 +43,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
private UIComboBox zoomOutComboBox;// 缩小逻辑下拉框
private AttributeChangeListener changeListener;
private UILabel tipLabel;
private UICheckBox allowFullCheckBox;//允许全屏
public ChartEditorDefinePane(XCreator xCreator) {
this.xCreator = xCreator;
@ -94,18 +96,20 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
tipLabel = new UILabel();
tipLabel.setForeground(Color.gray);
updateTipLabel();
allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Allow_Full_Screen"));
Component[][] components = new Component[][]{
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())},
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_Out_Logic"), SwingConstants.LEFT), zoomOutComboBox},
new Component[] {tipLabel, null}
new Component[] {tipLabel, null},
new Component[] {allowFullCheckBox}
};
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p};
double[] rowSize = {p, p, p, p};
double[] columnSize = {p,f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -154,6 +158,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
ChartMobileFitAttrStateProvider zoomOutAttr = chartEditor.getMobileAttr().getZoomOutAttr();
this.zoomOutComboBox.setSelectedItem(new Item(zoomOutAttr.description(), zoomOutAttr));
updateTipLabel();
boolean allowFullScreen = chartEditor.getMobileAttr().isAllowFullScreen();
this.allowFullCheckBox.setSelected(allowFullScreen);
// 数据 populate 完成后,再设置监听
this.bindListeners2Widgets();
@ -179,6 +185,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
ChartMobileAttrProvider mobileAttr = ((BaseChartEditor)xCreator.toData()).getMobileAttr();
mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION);
mobileAttr.setZoomOutAttr((ChartMobileFitAttrState)((Item)zoomOutComboBox.getSelectedItem()).getValue());
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
}
}

12
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

@ -49,6 +49,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
private UILabel maxHeightLabel;
private UISpinner maxHeightSpinner; // 最大高度Spinner
private AttributeChangeListener changeListener;
private UICheckBox allowFullCheckBox;
public ElementCaseDefinePane (XCreator xCreator) {
this.xCreator = xCreator;
@ -84,17 +85,20 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
maxHeightSpinner.setVisible(false);
maxHeightLabel.setVisible(false);
allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Allow_Full_Screen"));
Component[][] components = new Component[][]{
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Mobile-Horizontal"), SwingConstants.LEFT), hComboBox},
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Mobile-Vertical"), SwingConstants.LEFT), vComboBox},
new Component[] {heightRestrictCheckBox, null},
new Component[] {allowFullCheckBox},
new Component[] {maxHeightLabel, maxHeightSpinner}
};
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p};
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p,f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -134,6 +138,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
this.maxHeightLabel.setVisible(elementCaseEditor.isHeightRestrict());
this.maxHeightSpinner.setVisible(elementCaseEditor.isHeightRestrict());
this.maxHeightSpinner.setValue(elementCaseEditor.getHeightPercent());
this.allowFullCheckBox.setSelected(elementCaseEditor.isAllowFullScreen());
}
@Override
@ -156,6 +161,8 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
case "maxHeightSpinner":
((ElementCaseEditor)xCreator.toData()).setHeightPercent(maxHeightSpinner.getValue());
break;
case "allowFullCheckBox":
((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(allowFullCheckBox.isSelected());
}
}
@ -164,6 +171,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
this.vComboBox.setGlobalName("vComboBox");
this.heightRestrictCheckBox.setGlobalName("heightRestrictCheckBox");
this.maxHeightSpinner.setGlobalName("maxHeightSpinner");
this.allowFullCheckBox.setGlobalName("allowFullCheckBox");
}
}

8
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -121,7 +121,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
centerPane.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0));
centerPane.add(textPane, BorderLayout.CENTER);
UILabel formulaLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nTextArray(new String[] {"BiasD-Input_Slope_Line_text_separated_by_'|'", "Example"}, new String[] {" ", ": Season|Product"}) );
UILabel formulaLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Slope_Line_Tip", "'|'", "Season|Product"));
textPane.add(formulaLabel, BorderLayout.NORTH);
formulaLabel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 0));
@ -136,8 +136,8 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
JPanel choicePane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
choice1 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("BiasD-From-upper_left_to_lower_right")));
choice2 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("BiasD-From-lower_left_to_upper_right")));
choice1 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Slope_Line_Upper_Left_To_Lower_Right")));
choice2 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Slope_Line_Lower_Left_To_Upper_Right")));
choice1.addActionListener(leftUp);
choice2.addActionListener(leftDown);
@ -154,7 +154,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("BiasD-Slope_Line");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Slope_Line");
}
public void populate(BiasTextPainter biasTextPainter) {

19
designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java

@ -19,7 +19,6 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.CellExpandAttr;
@ -339,12 +338,10 @@ public class DSColumnAdvancedPane extends BasicPane {
+ " " + com.fr.design.i18n.Toolkit.i18nText("BindColumn-Even_Selected_(2,4,6...)")), FlowLayout.LEFT);
JPanel specifyPane = GUICoreUtils.createFlowPane(new JComponent[]{
serialTextField, new UILabel(
com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{
"Format", "BindColumn-Result_Serial_Number_Start_From_1", "Inner_Parameter", "Group_Count"},
new String[]{": 1,2-3,5,8 ", ",", "$__count__"})
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_DSColumn_Result_Group_Format", "1,2-3,5,8", "$__count__")
)
}, FlowLayout.LEFT);
serialTextField.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("StyleFormat-Sample") + ":=JOINARRAY(GREPARRAY(RANGE($__count__), item!=4), \",\")");
serialTextField.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Format") + ":=JOINARRAY(GREPARRAY(RANGE($__count__), item!=4), \",\")");
selectCountCardPane.add(undefinedPane, "UNDEFINE");
selectCountCardPane.add(topFormulaPane, "TOP");
selectCountCardPane.add(bottomFormulaPane, "BOTTOM");
@ -410,18 +407,6 @@ public class DSColumnAdvancedPane extends BasicPane {
}
}
}
private JFormattedTextField getTextField(JSpinner spinner) {
JComponent editor = spinner.getEditor();
if (editor instanceof JSpinner.DefaultEditor) {
return ((JSpinner.DefaultEditor) editor).getTextField();
} else {
System.err.println("Unexpected editor type: "
+ spinner.getEditor().getClass()
+ " isn't a descendant of DefaultEditor");
return null;
}
}
}
private static class JFormulaField extends JPanel {

13
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -12,6 +12,7 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.server.StyleListAction;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DecodeDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.FILE;
@ -53,7 +54,7 @@ class CptApp extends AbstractWorkBookApp {
WorkBook tpl = new WorkBook();
// richer:打开报表通知
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."}));
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Opening_And_Waiting", file.getName()) + "...");
TempNameStyle namestyle = TempNameStyle.getInstance();
namestyle.clear();
String checkStr = StringUtils.EMPTY;
@ -61,7 +62,7 @@ class CptApp extends AbstractWorkBookApp {
checkStr = ResourceIOUtils.inputStream2String(file.asInputStream());
tpl.readStream(file.asInputStream());
} catch (Exception exp) {
String errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? com.fr.design.i18n.Toolkit.i18nText("FR-Designer_No-Privilege")
String errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Toolkit.i18nText("Fine-Design_Template_Permission_Denied")
: com.fr.design.i18n.Toolkit.i18nText("NS-exception_readError");
FineLoggerFactory.getLogger().error(errorMessage + file, exp);
}
@ -91,13 +92,13 @@ class CptApp extends AbstractWorkBookApp {
jd.setResizable(false);
jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));
String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", "");
UILabel jl = new UILabel(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message}));
UILabel jl = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Global_Style_Missed", message));
jl.setHorizontalAlignment(SwingConstants.CENTER);
jd.add(jl, BorderLayout.CENTER);
JPanel jp = new JPanel();
// ”是“按钮,点击之后将生成一个全局样式,并写入xml
UIButton confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Yes"));
UIButton confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Yes"));
confirmButton.addActionListener(new ActionListener() {
@Override
@ -115,7 +116,7 @@ class CptApp extends AbstractWorkBookApp {
}
});
UIButton noButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_No"));
UIButton noButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_No"));
noButton.addActionListener(new ActionListener() {
@Override
@ -127,7 +128,7 @@ class CptApp extends AbstractWorkBookApp {
jp.add(confirmButton);
jp.add(noButton);
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("FR-Custom_styles_lost"));
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Custom_Style_Missed"));
jd.add(jp, BorderLayout.SOUTH);
GUICoreUtils.centerWindow(jd);
jd.setVisible(true);

2
designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java

@ -26,7 +26,7 @@ class CptxApp extends AbstractWorkBookApp {
@Override
public WorkBook asIOFile(FILE file) {
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."}));
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Opening_And_Waiting", file.getName()) + "...");
WorkBookX tpl;
InputStream inputStream;
try {

3
designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

@ -53,8 +53,7 @@ class FormApp extends AbstractAppProvider {
// peter:打开新报表.
Form tpl = new Form();
// richer:打开报表通知
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"},
new String[]{"\"" + file.getName() + "\"" + ",", "..."}));
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("file.getName()", file.getName()) + "...");
try {
tpl.readStream(file.asInputStream());
} catch (Exception exp) {

4
designer-realize/src/main/java/com/fr/design/report/ValueVerifierEditPane.java

@ -18,8 +18,8 @@ import java.awt.*;
public class ValueVerifierEditPane extends JPanel {
private UITableEditorPane<Object[]> tableEditorPane;
private final String[] columnNames = new String[] {
com.fr.design.i18n.Toolkit.i18nTextArray(new String[] {"Verify-Verify_Formula", "Verify-ToolTips"}, new String[] {"(", ")"}),
com.fr.design.i18n.Toolkit.i18nText("Verify-Error_Information") };
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Formula_Verify"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Formula_Verify_Warn_Text") };
public ValueVerifierEditPane() {
// ben:UITableEditorPane;

38
designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java

@ -4,10 +4,8 @@ import com.fr.base.BaseUtils;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.core.WidgetOptionFactory;
import com.fr.form.ui.CustomToolBarButton;
import com.fr.form.ui.Widget;
import com.fr.report.web.button.AppletPrint;
import com.fr.report.web.button.Edit;
import com.fr.report.web.button.Email;
import com.fr.report.web.button.ExcelO;
import com.fr.report.web.button.ExcelP;
@ -16,13 +14,11 @@ import com.fr.report.web.button.Export;
import com.fr.report.web.button.FlashPrint;
import com.fr.report.web.button.NewPrint;
import com.fr.report.web.button.PDF;
import com.fr.report.web.button.PDF2;
import com.fr.report.web.button.PDFPrint;
import com.fr.report.web.button.PageSetup;
import com.fr.report.web.button.Print;
import com.fr.report.web.button.PrintPreview;
import com.fr.report.web.button.Scale;
import com.fr.report.web.button.ServerPrint;
import com.fr.report.web.button.Word;
import com.fr.report.web.button.page.First;
import com.fr.report.web.button.page.Last;
@ -45,8 +41,6 @@ import com.fr.report.web.button.write.Submit;
import com.fr.report.web.button.write.SubmitForcibly;
import com.fr.report.web.button.write.Verify;
import com.fr.report.web.button.write.WriteOfflineHTML;
import com.fr.stable.bridge.BridgeMark;
import com.fr.stable.bridge.StableFactory;
public class ReportWebWidgetConstants {
private ReportWebWidgetConstants() {
@ -61,25 +55,12 @@ public class ReportWebWidgetConstants {
return new WidgetOption[]{PAGESETUP, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, SETPRINTEROFFSET, PRINTPREVIEW, CUSTOM_BUTTON};
}
public static WidgetOption[] getPreviewToolBarInstance() {
return new WidgetOption[]{FIRST, PREVIOUS, PAGENAVI, NEXT, LAST, SCALE, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT,
SETPRINTEROFFSET, CUSTOM_BUTTON};
}
public static WidgetOption[] getWriteToolBarInstance() {
return new WidgetOption[]{SUBMIT, VERIFY, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, IMPORTEXCELDATA, SHOWCELLVALUE,
APPENDCOLUMNROW, DELETECOLUMNROW, SETPRINTEROFFSET, WRITEOFFLINEHTML, CUSTOM_BUTTON, WRITESTASH, WRITESTASHCLEAR, IMPORTEXCELDATA_CUSTOMIZED,
IMPORTEXCEL, IMPORTEXCEL_COVER, IMPORTEXCEL_CLEAN, IMPORTEXCEL_APPEND};
}
public static WidgetOption[] getFormToolBarInstance() {
return new WidgetOption[]{EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, SETPRINTEROFFSET, CUSTOM_BUTTON};
}
// 查询
public static final WidgetOption SEARCH = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Query", "Form-Button"}),
BaseUtils.readIcon("/com/fr/web/images/form/resources/preview_16.png"), StableFactory.getMarkedClass(BridgeMark.SUBMIT_BUTTON, Widget.class));
// 提交按钮
public static final WidgetOption SUBMIT = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Utils-Submit"), BaseUtils.readIcon("/com/fr/web/images/save.png"),
Submit.class);
@ -96,36 +77,29 @@ public class ReportWebWidgetConstants {
public static final WidgetOption PDF = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_ReportServerP-PDF"), BaseUtils.readIcon("/com/fr/web/images/pdf.png"),
PDF.class);
// PDF导出,解决linux下无中文字体的导出字体混乱
public static final WidgetOption PDF2 = WidgetOptionFactory.createByWidgetClass(
com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ReportServerP-PDF", "ReportServerP-PDF2-INFO"}, new String[]{"(", ")"}), BaseUtils.readIcon("/com/fr/web/images/pdf.png"), PDF2.class);
// 客户端PDF打印
public static final WidgetOption PDFPRINT = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Utils-Print[Client]"),
BaseUtils.readIcon("/com/fr/web/images/pdfPrint.png"), PDFPrint.class);
// 服务器端打印
public static final WidgetOption SERVERPRINT = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_ReportServerP-Print[Server]"),
BaseUtils.readIcon("/com/fr/web/images/serverPrint.png"), ServerPrint.class);
// 邮件发送
public static final WidgetOption EMAIL = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Email"), BaseUtils.readIcon("/com/fr/web/images/email.png"), Email.class);
public static final WidgetOption PRINTPREVIEW = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("PrintP-Print_Preview"),
BaseUtils.readIcon("/com/fr/web/images/preview.png"), PrintPreview.class);
public static final WidgetOption EDIT = WidgetOptionFactory.createByWidgetClass("Edit", Edit.class);
// 导出成Excel 分页导出
public static final WidgetOption EXCELP = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Excel", "FR-Designer_Export_Excel_Page"}, new String[]{"(", ")"}),
public static final WidgetOption EXCELP = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Export_Excel_Page"),
BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelP.class);
// 导出成Excel 原样导出
public static final WidgetOption EXCELO = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Excel", "FR-Designer_Export_Excel_Simple"}, new String[]{"(", ")"}),
public static final WidgetOption EXCELO = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Export_Excel_Simple"),
BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelO.class);
// 导出成Excel 分页分Sheet导出
public static final WidgetOption EXCELS = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Excel", "FR-Designer_Export_Excel_PageToSheet"}, new String[]{"(", ")"}),
public static final WidgetOption EXCELS = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Export_Excel_Page_To_Sheet"),
BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelS.class);
// 导出成Word
public static final WidgetOption WORD = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Word"), BaseUtils.readIcon("/com/fr/web/images/word.png"), Word.class);
public static final WidgetOption WORD = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Export_Word"), BaseUtils.readIcon("/com/fr/web/images/word.png"), Word.class);
// 页面设置
public static final WidgetOption PAGESETUP = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("PageSetup-Page_Setup"), BaseUtils.readIcon("/com/fr/web/images/pageSetup.png"), PageSetup.class);
// 导出
@ -133,7 +107,7 @@ public class ReportWebWidgetConstants {
.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Export"), BaseUtils.readIcon("/com/fr/web/images/export.png"), Export.class);
// 当前页/总页数
public static final WidgetOption PAGENAVI = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"HJS-Current_Page", "HF-Number_of_Page"}, new String[]{"/", ""}),
public static final WidgetOption PAGENAVI = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Widget_Page_Navi_Text"),
BaseUtils.readIcon("/com/fr/web/images/pageNumber.png"), PageNavi.class);
// 首页
public static final WidgetOption FIRST = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_ReportServerP-First"), BaseUtils.readIcon("/com/fr/web/images/first.png"),

950
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

File diff suppressed because it is too large Load Diff

4
designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java

@ -1,11 +1,11 @@
package com.fr.start.module;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
import com.fr.design.utils.DesignUtils;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.module.Activator;
import com.fr.stable.ProductConstants;
@ -64,7 +64,7 @@ public class PreStartActivator extends Activator {
private void initLanguage() {
//这两句的位置不能随便调换,因为会影响语言切换的问题
FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage());
GeneralContext.setLocale(DesignerEnvManager.getEnvManager(false).getLocale());
}
@Override

Loading…
Cancel
Save