diff --git a/designer/src/com/fr/design/webattr/WriteToolBarPane.java b/designer/src/com/fr/design/webattr/WriteToolBarPane.java index 70cf35af90..f9f5991775 100644 --- a/designer/src/com/fr/design/webattr/WriteToolBarPane.java +++ b/designer/src/com/fr/design/webattr/WriteToolBarPane.java @@ -38,7 +38,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { private DragToolBarPane dragToolbarPane; private UIRadioButton topRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Top")); private UIRadioButton bottomRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Bottom")); - private UILabel sheetShowLocationLabel = new UILabel("sheet" + Inter.getLocText(new String[]{"Label", "Page_Number", "Display position"}) + ":"); + private UILabel sheetShowLocationLabel = new UILabel("sheet" + Inter.getLocText(new String[]{"Label", "Page_Number", "FR-Designer_Display_Position"}) + ":"); private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display")); private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display")); private UILabel rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT); @@ -50,6 +50,10 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { private UICheckBox isAutoStash;//自动暂存 public WriteToolBarPane() { + init(); + } + + private void init() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel allPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); this.add(allPanel, BorderLayout.CENTER); @@ -106,7 +110,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { toolBarManager.setToolBarLocation(Location.createTopEmbedLocation()); this.toolBarManagers = new ToolBarManager[]{toolBarManager}; } - + private ActionListener editBtnListener = new ActionListener() { public void actionPerformed(ActionEvent e) { diff --git a/designer/src/com/fr/start/CollectUserInformationDialog.java b/designer/src/com/fr/start/CollectUserInformationDialog.java index 64d5738552..3eb0e45ae2 100644 --- a/designer/src/com/fr/start/CollectUserInformationDialog.java +++ b/designer/src/com/fr/start/CollectUserInformationDialog.java @@ -33,6 +33,15 @@ public class CollectUserInformationDialog extends UIDialog { private static final String TW_LOGIN_HTML = "http://www.finereport.com/tw/products/frlogin"; private static final String JP_LOGIN_HTML = "http://www.finereport.com/jp/products/frlogin"; private static final int ONLINE_VERIFY_TIMEOUT = 30 * 1000; + private static final int DIALOG_WIDTH = 480; + private static final int DIALOG_HEIGHT = 300; + private static final int DESCRIPTION_ROWS = 5; + private static final int KEYPANE_PADDING_TOP = 32; + private static final int KEYPANE_PADDING_LEFT = 2; + private static final int KEYPANE_PADDING_DOWN = 32; + private static final int KEYPANE_PADDING_RIGHT = 2; + private static final int DEFAULTPANE_PADDING_TOP = 2; + private static final int DEFAULTPANE_PADDING = 4; private UITextField keyTextField; private DescriptionTextArea descriptionTextArea; @@ -47,7 +56,7 @@ public class CollectUserInformationDialog extends UIDialog { protected void initComponents() { JPanel defaultPane = (JPanel) this.getContentPane(); defaultPane.setLayout(FRGUIPaneFactory.createM_BorderLayout()); - defaultPane.setBorder(BorderFactory.createEmptyBorder(2, 4, 4, 4)); + defaultPane.setBorder(BorderFactory.createEmptyBorder(DEFAULTPANE_PADDING_TOP, DEFAULTPANE_PADDING, DEFAULTPANE_PADDING, DEFAULTPANE_PADDING)); this.applyClosingAction(); //this.applyEscapeAction(); JPanel centPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -60,7 +69,7 @@ public class CollectUserInformationDialog extends UIDialog { Inter.getLocText("Collect-Enter_your_user_information_code(It's_free_to_get_from_product's_official_website)"), TitledBorder.LEADING, TitledBorder.TOP)); JPanel keyPane = new JPanel(new BorderLayout(4, 4)); - keyPane.setBorder(BorderFactory.createEmptyBorder(32, 2, 32, 2)); + keyPane.setBorder(BorderFactory.createEmptyBorder(KEYPANE_PADDING_TOP, KEYPANE_PADDING_LEFT, KEYPANE_PADDING_DOWN, KEYPANE_PADDING_RIGHT)); topPane.add(keyPane); UILabel avctivenumberLabel = new UILabel(); @@ -72,13 +81,13 @@ public class CollectUserInformationDialog extends UIDialog { macSystemHit(keyPane); UIButton getKeyButton = new UIButton( - Inter.getLocText("Collect-Click!_Get_user_information_code")); + Inter.getLocText("FR-Designer_Get_Activation_Code")); getKeyButton.setMnemonic('F'); keyPane.add(getKeyButton, BorderLayout.EAST); getKeyButton.addActionListener(actionListener); descriptionTextArea = new DescriptionTextArea(); - descriptionTextArea.setRows(5); + descriptionTextArea.setRows(DESCRIPTION_ROWS); descriptionTextArea.setBorder( BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer-Collect_Information_Description"))); descriptionTextArea.setText(Inter.getLocText("Collect-User_Information_DES")); @@ -88,13 +97,13 @@ public class CollectUserInformationDialog extends UIDialog { defaultPane.add(this.createControlButtonPane(), BorderLayout.SOUTH); this.setTitle(Inter.getLocText("Collect-Collect_User_Information")); - this.setSize(480, 300); + this.setSize(DIALOG_WIDTH, DIALOG_HEIGHT); this.setModal(true); GUICoreUtils.centerWindow(this); } private void macSystemHit(JPanel keyPane) { - if(OperatingSystem.isMacOS()) { + if (OperatingSystem.isMacOS()) { UITextArea macHit = new UITextArea(); macHit.setText(Inter.getLocText("FR-Designer-Collect_OSXTips")); macHit.setEditable(false); @@ -119,22 +128,19 @@ public class CollectUserInformationDialog extends UIDialog { private void getKeyAction(){ Locale locale = FRContext.getLocale(); String url = EN_LOGIN_HTML; - if (ComparatorUtils.equals(locale, Locale.TAIWAN)) - { + if (ComparatorUtils.equals(locale, Locale.TAIWAN)) { url = TW_LOGIN_HTML; } - if (ComparatorUtils.equals(locale, Locale.CHINA)) - { + if (ComparatorUtils.equals(locale, Locale.CHINA)) { url = CN_LOGIN_HTML; } - if (ComparatorUtils.equals(locale, Locale.JAPAN)) - { + if (ComparatorUtils.equals(locale, Locale.JAPAN)) { url = JP_LOGIN_HTML; } try { Desktop.getDesktop().browse(new URI(url)); } catch (Exception ioe) { - + // do nothing } }; @@ -189,5 +195,6 @@ public class CollectUserInformationDialog extends UIDialog { * */ public void checkValid() throws Exception { + // do nothing } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index c8f5ba3176..ddf8de49c3 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -3,6 +3,7 @@ package com.fr.design.data.datapane; import com.fr.base.BaseUtils; import com.fr.base.TableData; import com.fr.data.TableDataSource; +import com.fr.data.impl.TableDataSourceDependent; import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; @@ -45,6 +46,7 @@ import java.util.Map; public class TableDataTreePane extends BasicTableDataTreePane { private static TableDataTreePane singleton = new TableDataTreePane(); + private static final int TIP_DISMISS_DELAY = 3000; public synchronized static BasicTableDataTreePane getInstance(DesignModelAdapter tc) { @@ -71,25 +73,21 @@ public class TableDataTreePane extends BasicTableDataTreePane { private PreviewTableDataAction previewTableDataAction; private TableDataTreePane() { + init(); + } + + private void init() { this.setLayout(new BorderLayout(4, 0)); this.setBorder(null); dataTree = new TableDataTree(); ToolTipManager.sharedInstance().registerComponent(dataTree); - ToolTipManager.sharedInstance().setDismissDelay(3000); + ToolTipManager.sharedInstance().setDismissDelay(TIP_DISMISS_DELAY); ToolTipManager.sharedInstance().setInitialDelay(0); addMenuDef = new MenuDef(Inter.getLocText("FR-Action_Add")); addMenuDef.setIconPath(IconPathConstants.ADD_POPMENU_ICON_PATH); createAddMenuDef(); - GeneralContext.addPluginReadListener(new PluginReadListener() { - @Override - public void success(Status status) { - addMenuDef.clearShortCuts(); - createAddMenuDef(); - } - }); - editAction = new EditAction(); removeAction = new RemoveAction(); previewTableDataAction = new PreviewTableDataAction(dataTree); @@ -112,13 +110,9 @@ public class TableDataTreePane extends BasicTableDataTreePane { jPanel.add(buttonPane, BorderLayout.NORTH); jPanel.add(scrollPane, BorderLayout.CENTER); this.add(jPanel, BorderLayout.CENTER); - dataTree.addMouseListener(new MouseAdapter() { - @Override - public void mousePressed(MouseEvent e) { - checkButtonEnabled(); - } - }); - dataTree.addKeyListener(getTableTreeNodeListener(editAction, previewTableDataAction, removeAction, op, dataTree)); + + initListeners(); + // TreeCellEditor dataTree.setEditable(true); TableDataTreeCellEditor treeCellEditor = new TableDataTreeCellEditor(new UITextField(), dataTree, this); @@ -128,6 +122,23 @@ public class TableDataTreePane extends BasicTableDataTreePane { checkButtonEnabled(); } + private void initListeners() { + GeneralContext.addPluginReadListener(new PluginReadListener() { + @Override + public void success(Status status) { + addMenuDef.clearShortCuts(); + createAddMenuDef(); + } + }); + dataTree.addMouseListener(new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + checkButtonEnabled(); + } + }); + dataTree.addKeyListener(getTableTreeNodeListener(editAction, previewTableDataAction, removeAction, op, dataTree)); + } + protected void checkButtonEnabled() { super.checkButtonEnabled(editAction, previewTableDataAction, removeAction, op, dataTree); @@ -187,6 +198,9 @@ public class TableDataTreePane extends BasicTableDataTreePane { tc.renameTableData(oldName, nPanel.getObjectName(), false); TableDataSource tds = tc.getBook(); TableData td = uPanel.updateBean(); + if (td instanceof TableDataSourceDependent) { + ((TableDataSourceDependent) td).setTableDataSource(tds); + } String tdName = nPanel.getObjectName(); tds.putTableData(tdName, td); Map map = new HashMap(); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 7e96574d4c..71bbf55272 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -1,4 +1,4 @@ -# generated time: 星期二 十月 24 16:58:25 CST 2017 +# generated time: \u661F\u671F\u4E8C \u5341\u6708 24 16:58:25 CST 2017 FR-Designer-BBSLogin_Account= FR-Designer-BBSLogin_Connection-Failure= FR-Designer-BBSLogin_Forgot-Password= @@ -1943,4 +1943,5 @@ FR-Designer_Sheet_Label_Page_Display_Position=Sheet tab display location: FR-Designer_Provide_Choose_All=Provide Select All FR-Designer_Decimal_Places=Decimal Places: FR-Base-Load_Resource_File=Load resource file - +FR-Designer_Get_Activation_Code=Click\! Get user information code +FR-Designer_Display_Position=Display position diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 2ca39665a6..7b26e8cb55 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -1,4 +1,4 @@ -# generated time: 星期二 十月 24 16:58:25 CST 2017 +# generated time: \u661F\u671F\u4E8C \u5341\u6708 24 16:58:25 CST 2017 FR-Designer-BBSLogin_Account=User name FR-Designer-BBSLogin_Connection-Failure=Connection failure, check your network status FR-Designer-BBSLogin_Forgot-Password=Forget Password @@ -1944,4 +1944,5 @@ FR-Designer_Sheet_Label_Page_Display_Position=Sheet tab display location: FR-Designer_Provide_Choose_All=Provide Select All FR-Designer_Decimal_Places=Decimal Places: FR-Base-Load_Resource_File=Load Configuration File - +FR-Designer_Get_Activation_Code=Get Activation Code +FR-Designer_Display_Position=Position diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index c0ef55e166..548c6b0385 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -1,4 +1,4 @@ -# generated time: 星期二 十月 24 16:58:25 CST 2017 +# generated time: \u661F\u671F\u4E8C \u5341\u6708 24 16:58:25 CST 2017 FR-Designer-BBSLogin_Account=\u30E6\u30FC\u30B6\u30FC\u540D FR-Designer-BBSLogin_Connection-Failure=\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u73FE\u5728\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u72B6\u614B\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 FR-Designer-BBSLogin_Forgot-Password=\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5FD8\u308C\u305F @@ -1944,4 +1944,5 @@ FR-Designer_Sheet_Label_Page_Display_Position=Sheet\u30E9\u30D9\u30EB\u30DA\u30F FR-Designer_Provide_Choose_All=\u5168\u9078\u629E\u53EF\u80FD FR-Designer_Decimal_Places=\u5C0F\u6570\u67A0\u6570: FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9 - +FR-Designer_Get_Activation_Code=\u30AF\u30EA\u30C3\u30AF\u3057\u3066\!\u30A2\u30AF\u30C6\u30A3\u30D9\u30FC\u30C8\u30B3\u30FC\u30C9\u3092\u53D6\u5F97 +FR-Designer_Display_Position=\u8868\u793A\u4F4D\u7F6E diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 51b97b98bc..a121f57ed7 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -1,4 +1,4 @@ -# generated time: 星期二 十月 24 16:58:25 CST 2017 +# generated time: \u661F\u671F\u4E8C \u5341\u6708 24 16:58:25 CST 2017 FR-Designer-BBSLogin_Account=\u7528\u6237\u540D FR-Designer-BBSLogin_Connection-Failure=\uB124\uD2B8\uC6CC\uD06C\uB9C1\uD06C\uC2E4\uD328.\uD604\uC7AC\uB124\uD2B8\uC6CC\uD06C\uC0C1\uD0DC\uB97C\uAC80\uC0AC\uD574\uC8FC\uC2ED\uC2DC\uC624. FR-Designer-BBSLogin_Forgot-Password=\u5FD8\u8BB0\u5BC6\u7801 @@ -1943,4 +1943,5 @@ FR-Designer_Sheet_Label_Page_Display_Position= FR-Designer_Provide_Choose_All=\uC81C\uACF5\uBAA8\uB450\uC120\uD0DD FR-Designer_Decimal_Places=\uC18C\uC218\uC218\uB7C9: FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C - +FR-Designer_Get_Activation_Code=\!\uB97C\uD074\uB9AD\uD558\uC5EC\uD65C\uC131\uCF54\uB4DC\uB97C\uC5BB\uC2B5\uB2C8\uB2E4. +FR-Designer_Display_Position=\uC704\uCE58\uBCF4\uC774\uAE30 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index b02c6d1942..d47f0b4e80 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -1,4 +1,4 @@ -# generated time: 星期二 十月 24 16:58:25 CST 2017 +# generated time: \u661F\u671F\u4E8C \u5341\u6708 24 16:58:25 CST 2017 FR-Designer-BBSLogin_Account=\u7528\u6237\u540D FR-Designer-BBSLogin_Connection-Failure=\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u7F51\u7EDC\u72B6\u6001 FR-Designer-BBSLogin_Forgot-Password=\u5FD8\u8BB0\u5BC6\u7801 @@ -1943,4 +1943,5 @@ FR-Designer_Sheet_Label_Page_Display_Position=sheet\u6807\u7B7E\u9875\u663E\u793 FR-Designer_Provide_Choose_All=\u63D0\u4F9B\u5168\u9009 FR-Designer_Decimal_Places=\u5C0F\u6570\u6570\u76EE\uFF1A FR-Base-Load_Resource_File=\u52A0\u8F7D\u914D\u7F6E\u6587\u4EF6 - +FR-Designer_Get_Activation_Code=\u70B9\u51FB\!\u83B7\u53D6\u6FC0\u6D3B\u7801 +FR-Designer_Display_Position=\u663E\u793A\u4F4D\u7F6E diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 4524283848..d4afa8791e 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -1,4 +1,4 @@ -# generated time: 星期二 十月 24 16:58:25 CST 2017 +# generated time: \u661F\u671F\u4E8C \u5341\u6708 24 16:58:25 CST 2017 FR-Designer-BBSLogin_Account=\u767B\u5165\u5E33\u865F FR-Designer-BBSLogin_Connection-Failure=\u767B\u5165\u9023\u63A5\u5931\u6557\uFF0C\u8ACB\u6AA2\u67E5\u7576\u524D\u7DB2\u8DEF\u72C0\u614B FR-Designer-BBSLogin_Forgot-Password=\u5FD8\u8A18\u5BC6\u78BC @@ -1944,4 +1944,5 @@ FR-Designer_Sheet_Label_Page_Display_Position=sheet\u6A19\u7C64\u9801\u986F\u793 FR-Designer_Provide_Choose_All=\u63D0\u4F9B\u5168\u9078 FR-Designer_Decimal_Places=\u5C0F\u6578\u6578\u76EE\uFF1A FR-Base-Load_Resource_File=\u52A0\u8F09\u914D\u7F6E\u6A94\u6848 - +FR-Designer_Get_Activation_Code=\u9EDE\u64CA\!\u7372\u53D6\u7528\u6236\u8A0A\u606F\u78BC +FR-Designer_Display_Position=\u986F\u793A\u4F4D\u7F6E