From ff84369039240851e4f1f6fb3ba7f2ab585de2e1 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 6 Jun 2017 09:53:08 +0800 Subject: [PATCH 1/7] =?UTF-8?q?REPORT-2773=20mac=E4=B8=AD=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=BF=AB=E6=8D=B7=E9=94=AE=E7=9A=84=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/report/UnitFieldPane.java | 3 +++ .../common/inputevent/InputEventBaseOnOS.java | 23 ++++++++++++++++ .../com/fr/design/gui/frpane/UITextPane.java | 3 +++ .../fr/design/gui/itextarea/UITextArea.java | 24 +++-------------- .../design/gui/itextfield/UINumberField.java | 16 +++++------ .../fr/design/gui/itextfield/UITextField.java | 27 +++++-------------- 6 files changed, 46 insertions(+), 50 deletions(-) diff --git a/designer/src/com/fr/design/report/UnitFieldPane.java b/designer/src/com/fr/design/report/UnitFieldPane.java index b091738d05..6e5717031d 100644 --- a/designer/src/com/fr/design/report/UnitFieldPane.java +++ b/designer/src/com/fr/design/report/UnitFieldPane.java @@ -6,6 +6,8 @@ package com.fr.design.report; import java.awt.Dimension; import javax.swing.JFormattedTextField; + +import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.gui.ilable.UILabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -67,6 +69,7 @@ public class UnitFieldPane extends JPanel { valueSpinner = new UIBasicSpinner(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0)); textField = ((JSpinner.DefaultEditor) valueSpinner.getEditor()).getTextField(); textField.setColumns(4); + InputEventBaseOnOS.addBasicEditInputMap(textField); this.add(valueSpinner); unitLable = new UnitLabel(unitType, valueSpinner.getPreferredSize().height); this.add(unitLable); diff --git a/designer_base/src/com/fr/common/inputevent/InputEventBaseOnOS.java b/designer_base/src/com/fr/common/inputevent/InputEventBaseOnOS.java index 29b6b9ce36..c0e195ced1 100644 --- a/designer_base/src/com/fr/common/inputevent/InputEventBaseOnOS.java +++ b/designer_base/src/com/fr/common/inputevent/InputEventBaseOnOS.java @@ -2,9 +2,13 @@ package com.fr.common.inputevent; import com.fr.stable.OperatingSystem; +import javax.swing.*; +import javax.swing.text.DefaultEditorKit; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; +import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; + /** * Created by hzzz on 2017/5/26. */ @@ -18,4 +22,23 @@ public class InputEventBaseOnOS { public static boolean isControlDown(KeyEvent e) { return IS_MACOS ? e.isMetaDown() : e.isControlDown(); } + + public static void addBasicEditInputMap(JComponent jComponent) { + InputMap inputMap = jComponent.getInputMap(); + while (inputMap.getParent() != null) { + inputMap = inputMap.getParent(); + } + if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER)) == null) { + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER), DefaultEditorKit.selectAllAction); + } + if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER)) == null) { + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), DefaultEditorKit.copyAction); + } + if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)) == null) { + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER), DefaultEditorKit.pasteAction); + } + if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER)) == null) { + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER), DefaultEditorKit.cutAction); + } + } } diff --git a/designer_base/src/com/fr/design/gui/frpane/UITextPane.java b/designer_base/src/com/fr/design/gui/frpane/UITextPane.java index ab7fed53a3..16a35ce2ff 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UITextPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UITextPane.java @@ -1,5 +1,6 @@ package com.fr.design.gui.frpane; +import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; @@ -22,11 +23,13 @@ public class UITextPane extends JTextPane implements UIObserver { public UITextPane() { super(); + InputEventBaseOnOS.addBasicEditInputMap(this); iniListener(); } public UITextPane(StyledDocument doc) { super(doc); + InputEventBaseOnOS.addBasicEditInputMap(this); iniListener(); } diff --git a/designer_base/src/com/fr/design/gui/itextarea/UITextArea.java b/designer_base/src/com/fr/design/gui/itextarea/UITextArea.java index 6e04eacb86..534be62ee3 100644 --- a/designer_base/src/com/fr/design/gui/itextarea/UITextArea.java +++ b/designer_base/src/com/fr/design/gui/itextarea/UITextArea.java @@ -1,5 +1,6 @@ package com.fr.design.gui.itextarea; +import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.utils.gui.GUICoreUtils; @@ -7,33 +8,14 @@ import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; -import javax.swing.text.DefaultEditorKit; import java.awt.*; -import java.awt.event.KeyEvent; - -import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; public class UITextArea extends JTextArea implements UIObserver { private UIObserverListener uiObserverListener; public UITextArea(int i, int j) { super(i, j); - InputMap inputMap = this.getInputMap(); - while (inputMap.getParent() != null) { - inputMap = inputMap.getParent(); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER), DefaultEditorKit.selectAllAction); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), DefaultEditorKit.copyAction); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER), DefaultEditorKit.pasteAction); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER), DefaultEditorKit.cutAction); - } + InputEventBaseOnOS.addBasicEditInputMap(this); initComponents(); } @@ -44,11 +26,13 @@ public class UITextArea extends JTextArea implements UIObserver { public UITextArea() { super(); + InputEventBaseOnOS.addBasicEditInputMap(this); initComponents(); } public UITextArea(String s) { super(s); + InputEventBaseOnOS.addBasicEditInputMap(this); initComponents(); } diff --git a/designer_base/src/com/fr/design/gui/itextfield/UINumberField.java b/designer_base/src/com/fr/design/gui/itextfield/UINumberField.java index eb24fab9b5..439e98d561 100644 --- a/designer_base/src/com/fr/design/gui/itextfield/UINumberField.java +++ b/designer_base/src/com/fr/design/gui/itextfield/UINumberField.java @@ -1,20 +1,17 @@ package com.fr.design.gui.itextfield; -import java.awt.Dimension; -import java.awt.GridLayout; -import java.awt.Toolkit; - -import javax.swing.JFrame; -import javax.swing.text.AttributeSet; -import javax.swing.text.BadLocationException; -import javax.swing.text.PlainDocument; - import com.fr.base.Utils; import com.fr.design.gui.ilable.UILabel; import com.fr.general.ComparatorUtils; import com.fr.stable.CoreConstants; import com.fr.stable.StringUtils; +import javax.swing.*; +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.PlainDocument; +import java.awt.*; + /** * Number Field. */ @@ -54,7 +51,6 @@ public class UINumberField extends UITextField { this.maxDecimalLength = maxDecimalLength; this.minValue = minValue; this.maxValue = maxValue; - setFieldDocument(); } diff --git a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java index 4f15b1f81b..7df91335c2 100644 --- a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java +++ b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java @@ -1,5 +1,6 @@ package com.fr.design.gui.itextfield; +import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; @@ -10,12 +11,8 @@ import com.fr.stable.Constants; import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; -import javax.swing.text.DefaultEditorKit; import javax.swing.text.Document; import java.awt.*; -import java.awt.event.KeyEvent; - -import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; /** * @author Jerry @@ -31,42 +28,32 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs public UITextField() { super(); - InputMap inputMap = this.getInputMap(); - while (inputMap.getParent() != null) { - inputMap = inputMap.getParent(); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER), DefaultEditorKit.selectAllAction); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), DefaultEditorKit.copyAction); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER), DefaultEditorKit.pasteAction); - } - if (inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER)) == null) { - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER), DefaultEditorKit.cutAction); - } + InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } public UITextField(int columns) { super(columns); + InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } public UITextField(String text, int columns) { super(text, columns); + InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } public UITextField(String text) { super(text); + InputEventBaseOnOS.addBasicEditInputMap(this); + initListener(); } public UITextField(Document doc, String text, int columns) { super(doc, text, columns); + InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } From 79b0c94c75ccd777da8ab05060d5c7c8d8099582 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 6 Jun 2017 11:01:32 +0800 Subject: [PATCH 2/7] PMD --- .../src/com/fr/design/report/UnitFieldPane.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/designer/src/com/fr/design/report/UnitFieldPane.java b/designer/src/com/fr/design/report/UnitFieldPane.java index 6e5717031d..e74155a932 100644 --- a/designer/src/com/fr/design/report/UnitFieldPane.java +++ b/designer/src/com/fr/design/report/UnitFieldPane.java @@ -43,13 +43,13 @@ public class UnitFieldPane extends JPanel { } public void setUnitType(int unitType) { - if (unitType == Constants.UNIT_CM) { - this.setText(Inter.getLocText("Unit_CM")); - } else if (unitType == Constants.UNIT_INCH) { - this.setText(Inter.getLocText("PageSetup-inches")); - } else { - this.setText(Inter.getLocText("PageSetup-mm")); - } + if (unitType == Constants.UNIT_CM) { + this.setText(Inter.getLocText("FR-Designer_Unit_CM")); + } else if (unitType == Constants.UNIT_INCH) { + this.setText(Inter.getLocText("FR-Designer_Unit_INCH")); + } else { + this.setText(Inter.getLocText("FR-Designer_Unit_MM-mm")); + } //ajust the heigt of unitLabel. Dimension unitDimension = new Dimension(this.getPreferredSize().width, From d85e904dff7372b76ae1f2220de533b15afc9e2b Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 6 Jun 2017 15:29:08 +0800 Subject: [PATCH 3/7] =?UTF-8?q?REPORT-2561=20=E5=A4=A7=E5=B1=8F-=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=97=B6=E9=92=9F=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=A1=A8=E5=B7=A6=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/properties/WidgetPropertyTable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java index f69771a54a..b57e050b6a 100644 --- a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java +++ b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java @@ -26,6 +26,7 @@ import com.fr.general.ComparatorUtils; public class WidgetPropertyTable extends AbstractPropertyTable { private FormDesigner designer; + private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度 public WidgetPropertyTable(FormDesigner designer) { super(); @@ -86,7 +87,9 @@ public class WidgetPropertyTable extends AbstractPropertyTable { setModel(model); this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); TableColumn tc = this.getColumn(this.getColumnName(0)); - tc.setPreferredWidth(30); + tc.setPreferredWidth(LEFT_COLUMN_WIDTH); + tc.setMinWidth(LEFT_COLUMN_WIDTH); + tc.setMaxWidth(LEFT_COLUMN_WIDTH); this.repaint(); } From d6e14d54ae4d5131009a94b14c8ef05bdcd28be9 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 8 Jun 2017 17:26:42 +0800 Subject: [PATCH 4/7] =?UTF-8?q?REPORT-2561=20=E5=A4=A7=E5=B1=8F-=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=97=B6=E9=92=9F=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=A1=A8=E5=B7=A6=E7=A7=BB=EF=BC=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/properties/WidgetPropertyTable.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java index b57e050b6a..c33d4296c0 100644 --- a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java +++ b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java @@ -27,6 +27,8 @@ public class WidgetPropertyTable extends AbstractPropertyTable { private FormDesigner designer; private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度 + private static final int RIGHT_COLUMN_WIDTH = 138; // "属性值"列的宽度 + public WidgetPropertyTable(FormDesigner designer) { super(); @@ -85,11 +87,13 @@ public class WidgetPropertyTable extends AbstractPropertyTable { } TableModel model = new BeanTableModel(); setModel(model); - this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); TableColumn tc = this.getColumn(this.getColumnName(0)); - tc.setPreferredWidth(LEFT_COLUMN_WIDTH); tc.setMinWidth(LEFT_COLUMN_WIDTH); tc.setMaxWidth(LEFT_COLUMN_WIDTH); + TableColumn tcRight = this.getColumn(this.getColumnName(1)); + tcRight.setMinWidth(RIGHT_COLUMN_WIDTH); + tcRight.setMaxWidth(RIGHT_COLUMN_WIDTH); + this.repaint(); } From d3f52129030b2236508c737297e7de5e2f64419b Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 9 Jun 2017 15:38:40 +0800 Subject: [PATCH 5/7] =?UTF-8?q?REPORT-2860=209.0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer_en_US.properties | 4 ++-- .../src/com/fr/design/locale/designer_ja_JP.properties | 4 ++-- .../src/com/fr/design/locale/designer_ko_KR.properties | 4 ++-- .../src/com/fr/design/locale/designer_zh_CN.properties | 4 ++-- .../src/com/fr/design/locale/designer_zh_TW.properties | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) 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 774beedf58..25c2921e11 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 @@ -1044,7 +1044,7 @@ FR-Designer-Tree_Width=Tree Width Record=Record Poly-Report_Component=Aggregate Report Component Options=Options -NS-war-remote=Error codes\:1117 Compression deployment does not support remote design +NS-war-remote=Error codes\:11100017 Compression deployment does not support remote design Sche-Minute=Minute Three_Rows_Of_Three_Grid=A grid with 3 rows and 3 columns WorkSheet=Free Report @@ -1412,7 +1412,7 @@ Rename=Rename Widget-Load_By_Async=Async load Shape=Shape BindColumn-This_Condition_has_been_existed=The Condition Already Exists -NS-exception_readError=Error codes\:1305 Template file parsing error +NS-exception_readError=Error codes\:11300005 Template file parsing error Set_Column_Title_Start=Set Duplicate Title Columns Fri=Fri M_Report-Report_Parameter=Report Parameter 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 9cb8cd654e..794181a57d 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 @@ -1039,7 +1039,7 @@ FR-Designer-Tree_Width=\u5E45 Record=\u8A18\u9332 Poly-Report_Component=\u805A\u5408\u5E33\u7968\u30A2\u30BB\u30F3\u30D6\u30EA Options=\u30AA\u30D7\u30B7\u30E7\u30F3 -NS-war-remote=\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\:1117 \u5727\u7E2E\u914D\u7F6E\u306F\u9060\u9694\u30C7\u30B6\u30A4\u30F3\u306B\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093 +NS-war-remote=\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\:11100017 \u5727\u7E2E\u914D\u7F6E\u306F\u9060\u9694\u30C7\u30B6\u30A4\u30F3\u306B\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093 Sche-Minute=\u5206 Three_Rows_Of_Three_Grid=3\u4E57\u306E3\u3064\u306E\u884C WorkSheet=\u30EF\u30FC\u30AF\u30B7\u30FC\u30C8 @@ -1407,7 +1407,7 @@ Rename=\u540D\u79F0\u306E\u5909\u66F4 Widget-Load_By_Async=\u975E\u540C\u671F\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9 Shape=\u56F3\u5F62 BindColumn-This_Condition_has_been_existed=\u5F53\u8A72\u6761\u4EF6\u306F\u5B58\u5728\u3057\u3066\u3044\u307E\u3059 -NS-exception_readError=\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\:1305 \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u89E3\u6790\u306B\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3057\u305F +NS-exception_readError=\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\:11300005 \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u89E3\u6790\u306B\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3057\u305F Set_Column_Title_Start=\u91CD\u8907\u3059\u308B\u6A19\u984C\u5217\u3092\u8A2D\u5B9A Fri=\u91D1 M_Report-Report_Parameter=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC 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 93a796d79f..593f372a5b 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 @@ -1040,7 +1040,7 @@ FR-Designer-Tree_Width=\uB108\uBE44 Record=\uB808\uCF54\uB4DC Poly-Report_Component=\uCDE8\uD569\uBB38\uC11C\uC5B4\uC148\uBE14\uB9AC Options=\uC635\uC158 -NS-war-remote=\uC624\uB958\uCF54\uB4DC\:1117 \uC555\uCD95\uC124\uCE58\uB97C\uC9C0\uC6D0\uD558\uC9C0\uC54A\uC2B5\uB2C8\uB2E4. \uC6D0\uACA9\uB514\uC790\uC778 +NS-war-remote=\uC624\uB958\uCF54\uB4DC\:11100017 \uC555\uCD95\uC124\uCE58\uB97C\uC9C0\uC6D0\uD558\uC9C0\uC54A\uC2B5\uB2C8\uB2E4. \uC6D0\uACA9\uB514\uC790\uC778 Sche-Minute=\uBD84 Three_Rows_Of_Three_Grid=3\uD589 3\uC5F4\uC758\uADF8\uB9AC\uB4DC WorkSheet=\uC790\uC720\uBB38\uC11C @@ -1408,7 +1408,7 @@ Rename=\uB9AC\uB124\uC784 Widget-Load_By_Async=\uBE44\uB3D9\uAE30\uB85C\uB529 Shape=\uADF8\uB798\uD504 BindColumn-This_Condition_has_been_existed=\uC774\uC870\uAC74\uC740\uC774\uBBF8\uC874\uC7AC\uD569\uB2C8\uB2E4. -NS-exception_readError=\uC624\uB958\uCF54\uB4DC\:1305 \uD15C\uD50C\uB9BF\uD30C\uC77C\uD574\uC11D\uC624\uB958 +NS-exception_readError=\uC624\uB958\uCF54\uB4DC\:11300005 \uD15C\uD50C\uB9BF\uD30C\uC77C\uD574\uC11D\uC624\uB958 Set_Column_Title_Start=\uC911\uBCF5\uC81C\uBAA9\uC5F4\uC124\uC815 Fri=5 M_Report-Report_Parameter=\uD15C\uD50C\uB9BF\uB9E4\uAC1C\uBCC0\uC218 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 008f2df8d5..08d9d3285e 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 @@ -1039,7 +1039,7 @@ FR-Designer-Tree_Width=\u5BBD\u5EA6 Record=\u8BB0\u5F55 Poly-Report_Component=\u805A\u5408\u62A5\u8868\u7EC4\u4EF6 Options=\u9009\u9879 -NS-war-remote=\u9519\u8BEF\u4EE3\u7801\:1117 \u538B\u7F29\u90E8\u7F72\u4E0D\u652F\u6301\u8FDC\u7A0B\u8BBE\u8BA1 +NS-war-remote=\u9519\u8BEF\u4EE3\u7801\:11100017 \u538B\u7F29\u90E8\u7F72\u4E0D\u652F\u6301\u8FDC\u7A0B\u8BBE\u8BA1 Sche-Minute=\u5206 Three_Rows_Of_Three_Grid=\u4E09\u884C\u4E09\u5217\u7684\u683C\u5B50 WorkSheet=\u81EA\u7531\u62A5\u8868 @@ -1407,7 +1407,7 @@ Rename=\u91CD\u547D\u540D Widget-Load_By_Async=\u5F02\u6B65\u52A0\u8F7D Shape=\u56FE\u5F62 BindColumn-This_Condition_has_been_existed=\u6B64\u6761\u4EF6\u5DF2\u7ECF\u5B58\u5728 -NS-exception_readError=\u9519\u8BEF\u4EE3\u7801\:1305 \u6A21\u677F\u6587\u4EF6\u89E3\u6790\u51FA\u9519 +NS-exception_readError=\u9519\u8BEF\u4EE3\u7801\:11300005 \u6A21\u677F\u6587\u4EF6\u89E3\u6790\u51FA\u9519 Set_Column_Title_Start=\u8BBE\u7F6E\u91CD\u590D\u6807\u9898\u5217 Fri=\u4E94 M_Report-Report_Parameter=\u6A21\u677F\u53C2\u6570 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 4a8a86d71d..156339cfe1 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 @@ -1039,7 +1039,7 @@ FR-Designer-Tree_Width=\u5BEC\u5EA6 Record=\u8A18\u9304 Poly-Report_Component=\u8907\u5408\u5F0F\u5831\u8868\u5143\u4EF6 Options=\u9078\u9805 -NS-war-remote=\u932F\u8AA4\u4EE3\u78BC\:1117 \u58D3\u7E2E\u90E8\u7F72\u4E0D\u652F\u6301\u9060\u7A0B\u8A2D\u8A08 +NS-war-remote=\u932F\u8AA4\u4EE3\u78BC\:11100017 \u58D3\u7E2E\u90E8\u7F72\u4E0D\u652F\u6301\u9060\u7A0B\u8A2D\u8A08 Sche-Minute=\u5206 Three_Rows_Of_Three_Grid=\u4E09\u5217\u4E09\u6B04\u7684\u683C\u5B50 WorkSheet=\u81EA\u7531\u5831\u8868 @@ -1407,7 +1407,7 @@ Rename=\u91CD\u547D\u540D Widget-Load_By_Async=\u975E\u540C\u6B65\u8F09\u5165 Shape=\u5716\u5F62 BindColumn-This_Condition_has_been_existed=\u6B64\u689D\u4EF6\u5DF2\u7D93\u5B58\u5728 -NS-exception_readError=\u932F\u8AA4\u4EE3\u78BC\:1305 \u6A21\u677F\u6A94\u6848\u89E3\u6790\u51FA\u932F +NS-exception_readError=\u932F\u8AA4\u4EE3\u78BC\:11300005 \u6A21\u677F\u6A94\u6848\u89E3\u6790\u51FA\u932F Set_Column_Title_Start=\u8A2D\u5B9A\u91CD\u8907\u6A19\u984C\u6B04 Fri=\u4E94 M_Report-Report_Parameter=\u6A21\u677F\u53C3\u6578 From 9ce19d1b69929ccde74c1b38e68723932f5e5136 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 9 Jun 2017 17:12:28 +0800 Subject: [PATCH 6/7] =?UTF-8?q?REPORT-2561=20=E5=A4=A7=E5=B1=8F-=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=97=B6=E9=92=9F=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=A1=A8=E5=B7=A6=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../properties/WidgetPropertyTable.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java index c33d4296c0..a4ffae3106 100644 --- a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java +++ b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java @@ -4,10 +4,12 @@ import java.awt.event.MouseEvent; import java.util.ArrayList; import javax.swing.JTable; +import javax.swing.event.TableModelEvent; import javax.swing.table.TableColumn; import javax.swing.table.TableModel; import com.fr.design.beans.GroupModel; +import com.fr.design.event.ChangeEvent; import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.design.gui.itable.PropertyGroup; import com.fr.design.mainframe.FormDesigner; @@ -27,8 +29,6 @@ public class WidgetPropertyTable extends AbstractPropertyTable { private FormDesigner designer; private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度 - private static final int RIGHT_COLUMN_WIDTH = 138; // "属性值"列的宽度 - public WidgetPropertyTable(FormDesigner designer) { super(); @@ -87,15 +87,20 @@ public class WidgetPropertyTable extends AbstractPropertyTable { } TableModel model = new BeanTableModel(); setModel(model); + this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); TableColumn tc = this.getColumn(this.getColumnName(0)); tc.setMinWidth(LEFT_COLUMN_WIDTH); tc.setMaxWidth(LEFT_COLUMN_WIDTH); - TableColumn tcRight = this.getColumn(this.getColumnName(1)); - tcRight.setMinWidth(RIGHT_COLUMN_WIDTH); - tcRight.setMaxWidth(RIGHT_COLUMN_WIDTH); this.repaint(); } + + private void setRightColumnWidth(boolean automode) { + int rightColumnWidth = this.getWidth() - LEFT_COLUMN_WIDTH; + TableColumn tcRight = this.getColumn(this.getColumnName(1)); + tcRight.setMinWidth(automode ? 0 : rightColumnWidth); + tcRight.setMaxWidth(automode ? this.getWidth() : rightColumnWidth); + } private void setDesigner(FormDesigner designer) { this.designer = designer; @@ -117,7 +122,14 @@ public class WidgetPropertyTable extends AbstractPropertyTable { } return null; } - + + @Override + public void columnMarginChanged(javax.swing.event.ChangeEvent e) { + setRightColumnWidth(false); + super.columnMarginChanged(e); + setRightColumnWidth(true); + } + /** * 待说明 */ From a49ee35fa1db355bd89d77558c7e633dba2d5e6a Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 9 Jun 2017 17:14:48 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/properties/WidgetPropertyTable.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java index a4ffae3106..531d7abc5f 100644 --- a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java +++ b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java @@ -4,12 +4,10 @@ import java.awt.event.MouseEvent; import java.util.ArrayList; import javax.swing.JTable; -import javax.swing.event.TableModelEvent; import javax.swing.table.TableColumn; import javax.swing.table.TableModel; import com.fr.design.beans.GroupModel; -import com.fr.design.event.ChangeEvent; import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.design.gui.itable.PropertyGroup; import com.fr.design.mainframe.FormDesigner;