From 592ecab81068e75e910101d33e5a2a417f96b847 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 11 May 2017 11:46:39 +0800 Subject: [PATCH 001/101] =?UTF-8?q?REPORT-2644=20master=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer.properties | 10 +++++----- .../src/com/fr/design/locale/designer_en_US.properties | 10 +++++----- .../src/com/fr/design/locale/designer_ja_JP.properties | 6 +++--- .../src/com/fr/design/locale/designer_ko_KR.properties | 8 ++++---- .../src/com/fr/design/locale/designer_zh_CN.properties | 10 +++++----- .../src/com/fr/design/locale/designer_zh_TW.properties | 10 +++++----- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 04adf59115..f59310b657 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -481,7 +481,7 @@ FR-Designer_Data_Analysis_Settings=Data Analysis Settings FR-Designer_Browser_Background=Browser Background FR-Designer_Import_Css=Import Css FR-Designer_Import_JavaScript=Import JavaScript -FR-Designer-Datasource-Param_DES= you can type "${abc}" as a parameter, here, abc is a parameter name.
 for example\: select * from table where id\ +FR-Designer-Datasource-Param_DES= you can type "${abc}" as a parameter, here, abc is a parameter name.
 for example\: select * from table where id\=${abc}.
 select * from table where id\='${abc}'.(if the field id is typeof string) FR-Designer-DS-Database_Query=Database Query FR-Designer_Is_Share_DBTableData=Is_Share_DBTableData FR-Designer-LayerPageReport_PageQuery=Query for page @@ -857,7 +857,7 @@ RP_Authority_Edit=Authority Warnning=Warning RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \ +Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd= FR-Hyperlink_ChartHyperlink= M_Edit-FormatBrush=Format Painter @@ -988,7 +988,7 @@ Background-Background_is_NULL=No Background FR-Designer_Sytle-FRFont=Font Gradation=Gradation The_current_list_is_empty=The current list is empty -Formula_Dictionary_Display_Examples=the real value is \ +Formula_Dictionary_Display_Examples=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, \nthe result is 1, 2, ..., 100 and -1, -2, ..., -100. Schedule-Template_Parameter=Template Parameter JSShow=Show In Action Level_coordinates=Level coordinates @@ -1370,7 +1370,7 @@ Not_Exsit=not exist in WorkSheet. Utils-Insert_Row=Insert Row Utils-Delete_Row=Delete Row not_support_authority_edit=this element does not support authority edit -Formula_Tips=The formula must be from the beginning of the "\ +Formula_Tips=The formula must be from the beginning of the "\="\! FR-Action_Copy= Compile_Success=Compile Success BackgroundTexture-RecycledPaper=Recycled Paper @@ -1535,7 +1535,7 @@ FR-Designer_Cancel= Button-Group-Display-Columns=Display Column Count Widget-Height=Height Examples=Examples -Formula_Dictionary_Display_Example=the real value is \ +Formula_Dictionary_Display_Example=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, \nthe result is 1, 2, ..., 100 and -1, -2, ..., -100. StyleAlignment-Horizontal=Horizontal HyperLink_Must_Alone_Reset=HyperLink_Must_Alone_Reset ExpandD-Expand_Direction=Display Data Direction 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 c25016ea9a..d427dd367a 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 @@ -481,7 +481,7 @@ FR-Designer_Import_Css=Reference Css FR-Designer_Import_JavaScript=Reference JavaScript FR-Designer-LayerPageReport_PageQuery=Page Break query FR-Designer-LayerPageReport_Define_PageQuerySQL=Define sql for page break query -FR-Designer-Datasource-Param_DES= You can type "${abc}" as a parameter, here, abc is a parameter name.
 for example\: select * from table where id\ +FR-Designer-Datasource-Param_DES= You can type "${abc}" as a parameter, here, abc is a parameter name.
 for example\: select * from table where id\=${abc}.
 select * from table where id\='${abc}'.(if the type of id is string) FR-Designer-DS-Database_Query=DB Query FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Event=Event @@ -857,7 +857,7 @@ RP_Authority_Edit=Permission Warnning=Warning RoleName_Can_Not_Be_Null=Role name can not be null or duplicate Application=Applications -Formula_Dictionary_Display_Examples_Html=Real value range is \ +Formula_Dictionary_Display_Examples_Html=Real value range is \=range(100), displayed formula of every $$$ in the range is \=0 - $$$,
the real result is 1, 2, ..., 100 and diaplay result is -1, -2, ..., -100.
  ECP-error_pwd=Password Error FR-Hyperlink_ChartHyperlink=Chart Hyperlink M_Edit-FormatBrush=Format Painter @@ -988,7 +988,7 @@ Background-Background_is_NULL=No Background FR-Designer_Sytle-FRFont=Font Gradation=Gradation The_current_list_is_empty=The current list is empty -Formula_Dictionary_Display_Examples=\Real value range is \ +Formula_Dictionary_Display_Examples=\Real value range is \=range(100), displayed formula of every $$$ in the range is \=0 - $$$, \n the real result is 1, 2, ..., 100 and diaplay result is -1, -2, ..., -100. Schedule-Template_Parameter=Template Parameter JSShow=Dynamic display Level_coordinates=Hierarchy coordinate @@ -1370,7 +1370,7 @@ Not_Exsit=Not exist in report Utils-Insert_Row=Insert Row Utils-Delete_Row=Delete Row not_support_authority_edit=this element does not support authority edit -Formula_Tips=The formula must be begin with "\ +Formula_Tips=The formula must be begin with "\="\! FR-Action_Copy=Copy Compile_Success=Compile Successfully BackgroundTexture-RecycledPaper=Recycled Paper @@ -1535,7 +1535,7 @@ FR-Designer_Cancel=Cancel Button-Group-Display-Columns=Number of columns displayed Widget-Height=Control Height Examples=Examples -Formula_Dictionary_Display_Example=Real value range is \ +Formula_Dictionary_Display_Example=Real value range is \=range(100), displayed formula of every $$$ in the range is \=0 - $$$, \n the real result is 1, 2, ..., 100 and diaplay result is -1, -2, ..., -100. StyleAlignment-Horizontal=Horizontal HyperLink_Must_Alone_Reset=Multiple hyperlink ExpandD-Expand_Direction=Extension Direction 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 f30ec0d694..2718ab1a72 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 @@ -458,7 +458,7 @@ FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F FR-Designer_Import_Css=Css\u5F15\u7528 FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528 -FR-Designer-Datasource-Param_DES=  "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070
 select * from table where id\ +FR-Designer-Datasource-Param_DES=  "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070
 select * from table where id\=${abc}\u3002
 select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)\uFFFD FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql @@ -988,7 +988,7 @@ Background-Background_is_NULL=\u80CC\u666F\u306A\u3057 FR-Designer_Sytle-FRFont=\u30D5\u30A9\u30F3\u30C8 Gradation=\u30EC\u30D9\u30EB The_current_list_is_empty=\u73FE\u5728\u306E\u30EA\u30B9\u30C8\u306F\u7A7A -Formula_Dictionary_Display_Examples=\u5B9F\u969B\u5024\u7BC4\u56F2\u306F \ +Formula_Dictionary_Display_Examples=\u5B9F\u969B\u5024\u7BC4\u56F2\u306F \=range(100)\u3001\u5BFE\u5FDC\u7684\u306A\u5B9F\u969B\u5024\u7BC4\u56F2\n \u306E\u4E2D\u306B\u5404$$$\u3067\u8868\u793A\u3059\u308B\u6570\u5F0F\u306F \=0 - $$$\uFF0C\n \u306A\u308C\u3070\u6700\u7D42\u306E\u5B9F\u969B\u5024\u306F1, 2, ..., 100, \n \u8868\u793A\u5024\u306F-1, -2, ... , -100\u3002 Schedule-Template_Parameter=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF JSShow=\u52D5\u7684\u8868\u793A Level_coordinates=\u30EC\u30D9\u30EB\u5EA7\u6A19 @@ -1535,7 +1535,7 @@ FR-Designer_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB Button-Group-Display-Columns=\u5217\u6570\u3092\u8868\u793A Widget-Height=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u9AD8\u3055 Examples=\u4F8B -Formula_Dictionary_Display_Example=\u5B9F\u969B\u306E\u5024\u306E\u7BC4\u56F2\u306F Formula_Dictionary_Display_Examples\ +Formula_Dictionary_Display_Example=\u5B9F\u969B\u306E\u5024\u306E\u7BC4\u56F2\u306F Formula_Dictionary_Display_Examples\= \u5B9F\u969B\u306E\u5024\u306E\u7BC4\u56F2\u306F Formula_Dictionary_Display_Examples_Html\=\u5B9F\u969B\u306E\u5024\u306E\u7BC4\u56F2\u306F Formula_Editor\=\u6570\u5F0F\u30A8\u30C7\u30A3\u30BF StyleAlignment-Horizontal=\u6A2A\u4F4D\u7F6E HyperLink_Must_Alone_Reset=\u8907\u6570\u306E\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF ExpandD-Expand_Direction=\u5C55\u958B\u65B9\u5411 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 dfda9c4c93..83eba5a4e4 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 @@ -453,7 +453,7 @@ FR-Designer_Data_Analysis_Settings=\uB370\uC774\uD130\uBD84\uC11D\uC124\uC815 FR-Designer_Browser_Background=\uC6F9\uBE0C\uB77C\uC6B0\uC800\uBC30\uACBD FR-Designer_Import_Css=Css\uC778\uC6A9 FR-Designer_Import_JavaScript=JavaScript\uC778\uC6A9 -FR-Designer-Datasource-Param_DES= , "${abc}"\uB97C\uB9E4\uAC1C\uBCC0\uC218\uB85C\uC785\uB825\uD560\uC218\uC788\uC73C\uBA70,abc\uB294\uB9E4\uAC1C\uBCC0\uC218\uC758\uBA85\uCE6D\uC785\uB2C8\uB2E4. \uC608\uFF1A
 select * from table where id\ +FR-Designer-Datasource-Param_DES= , "${abc}"\uB97C\uB9E4\uAC1C\uBCC0\uC218\uB85C\uC785\uB825\uD560\uC218\uC788\uC73C\uBA70,abc\uB294\uB9E4\uAC1C\uBCC0\uC218\uC758\uBA85\uCE6D\uC785\uB2C8\uB2E4. \uC608\uFF1A
 select * from table where id\='${abc}'. (id\uD544\uB4DC\uAC00\uBB38\uC790\uC5F4\uC720\uD615\uC77C\uACBD\uC6B0) FR-Designer-DS-Database_Query=\uB370\uC774\uD130\uBCA0\uC774\uC2A4\uCC3E\uC544\uBCF4\uAE30 FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 @@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1 Warnning=\uC54C\uB9BC RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 -Formula_Dictionary_Display_Examples_Html=\uC2E4\uC81C\uAC12\uBC94\uC704:\ +Formula_Dictionary_Display_Examples_Html=\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) @@ -988,7 +988,7 @@ Background-Background_is_NULL=\uBC30\uACBD\uC5C6\uC74C FR-Designer_Sytle-FRFont=\uAE00\uAF34 Gradation=\uB2E8\uACC4 The_current_list_is_empty=\uD604\uC7AC\uB9AC\uC2A4\uD2B8\uBE44\uC5B4\uC788\uC74C -Formula_Dictionary_Display_Examples=\\uc2e4\uC81C\uAC12\uBC94\uC704:\ +Formula_Dictionary_Display_Examples=\\uc2e4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C\n \uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100, \n \uD45C\uC2DC\uAC12: -1, -2, ... , -100. Schedule-Template_Parameter=\uD15C\uD50C\uB9BF\uB9E4\uAC1C\uBCC0\uC218 JSShow=\uB3D9\uC801\uB514\uC2A4\uD50C\uB808\uC774 Level_coordinates=\uACC4\uCE35\uBCF4\uC870\uC88C\uD45C @@ -1535,7 +1535,7 @@ FR-Designer_Cancel=\uCDE8\uC18C Button-Group-Display-Columns=\uC5F4\uC758\uC218\uB97C\uB098\uD0C0\uB0C4 Widget-Height=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uB192\uC774 Examples=\uC608\uC2DC -Formula_Dictionary_Display_Example=\uC2E4\uC81C\uAC12\uBC94\uC704:\ +Formula_Dictionary_Display_Example=\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C\n\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100, \uD45C\uC2DC\uAC12: -1, -2, ... , -100. StyleAlignment-Horizontal=\uC218\uD3C9\uC815\uB82C HyperLink_Must_Alone_Reset=\uC5EC\uB7EC\uAC1C\uD558\uC774\uD37C\uB9C1\uD06C ExpandD-Expand_Direction=\uD655\uB300\uBC29\uD5A5 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 1347e7ec39..4bbe248d1c 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 @@ -484,7 +484,7 @@ FR-Designer_Data_Analysis_Settings=\u6570\u636E\u5206\u6790\u8BBE\u7F6E FR-Designer_Browser_Background=\u6D4F\u89C8\u5668\u80CC\u666F FR-Designer_Import_Css=\u5F15\u7528Css FR-Designer_Import_JavaScript=\u5F15\u7528JavaScript -FR-Designer-Datasource-Param_DES= \u60A8\u53EF\u4EE5\u952E\u5165"${abc}"\u505A\u4E3A\u4E00\u4E2A\u53C2\u6570\uFF0C\u8FD9\u91CCabc\u662F\u53C2\u6570\u7684\u540D\u79F0\u3002\u4F8B\u5982\uFF1A
 select * from table where id\ +FR-Designer-Datasource-Param_DES= \u60A8\u53EF\u4EE5\u952E\u5165"${abc}"\u505A\u4E3A\u4E00\u4E2A\u53C2\u6570\uFF0C\u8FD9\u91CCabc\u662F\u53C2\u6570\u7684\u540D\u79F0\u3002\u4F8B\u5982\uFF1A
 select * from table where id\=${abc}\u3002
 select * from table where id\='${abc}'\u3002(\u5982\u679Cid\u5B57\u6BB5\u4E3A\u5B57\u7B26\u4E32\u7C7B\u578B) FR-Designer-DS-Database_Query=\u6570\u636E\u5E93\u67E5\u8BE2 FR-Designer-LayerPageReport_PageQuery=\u5206\u9875\u67E5\u8BE2 FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u8BE2sql @@ -857,7 +857,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91 Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D Application=\u5E94\u7528\u7A0B\u5E8F -Formula_Dictionary_Display_Examples_Html=\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \ +Formula_Dictionary_Display_Examples_Html=\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C
\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) @@ -988,7 +988,7 @@ Background-Background_is_NULL=\u6CA1\u6709\u80CC\u666F FR-Designer_Sytle-FRFont=\u5B57\u4F53 Gradation=\u5C42\u6B21 The_current_list_is_empty=\u5F53\u524D\u5217\u8868\u4E3A\u7A7A -Formula_Dictionary_Display_Examples=\ \u5B9E\u9645\u503C\u8303\u56F4\u4E3A \ +Formula_Dictionary_Display_Examples=\ \u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\n \u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\n \u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100, \n \u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002 Schedule-Template_Parameter=\u6A21\u677F\u53C2\u6570 JSShow=\u52A8\u6001\u5C55\u793A Level_coordinates=\u5C42\u6B21\u5750\u6807 @@ -1370,7 +1370,7 @@ Not_Exsit=\u4E0D\u5B58\u5728\u4E8E\u62A5\u8868 Utils-Insert_Row=\u63D2\u5165\u884C Utils-Delete_Row=\u5220\u9664\u884C not_support_authority_edit=\u8BE5\u5143\u7D20\u4E0D\u652F\u6301\u6743\u9650\u63A7\u5236 -Formula_Tips=\u516C\u5F0F\u5FC5\u987B\u4EE5"\ +Formula_Tips=\u516C\u5F0F\u5FC5\u987B\u4EE5"\="\u53F7\u5F00\u5934\uFF01 FR-Action_Copy=\u590D\u5236 Compile_Success=\u7F16\u8BD1\u6210\u529F BackgroundTexture-RecycledPaper=\u518D\u751F\u7EB8 @@ -1535,7 +1535,7 @@ FR-Designer_Cancel=\u53D6\u6D88 Button-Group-Display-Columns=\u5C55\u793A\u5217\u6570 Widget-Height=\u63A7\u4EF6\u9AD8\u5EA6 Examples=\u4F8B\u5B50 -Formula_Dictionary_Display_Example=\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \ +Formula_Dictionary_Display_Example=\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100), \u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\n\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100, \u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002 StyleAlignment-Horizontal=\u6C34\u5E73\u5BF9\u9F50 HyperLink_Must_Alone_Reset=\u591A\u4E2A\u8D85\u94FE ExpandD-Expand_Direction=\u6269\u5C55\u65B9\u5411 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 8e9eeb4a14..5556a7ca1d 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 @@ -472,7 +472,7 @@ FR-Designer_Data_Analysis_Settings=\u8CC7\u6599\u5206\u6790\u8A2D\u5B9A FR-Designer_Browser_Background=\u700F\u89BD\u5668\u80CC\u666F FR-Designer_Import_Css=\u5F15\u7528Css FR-Designer_Import_JavaScript=\u5F15\u7528JavaScript -FR-Designer-Datasource-Param_DES= \u60A8\u53EF\u4EE5\u9375\u5165"${abc}"\u505A\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u9019\u91CCabc\u662F\u53C3\u6578\u7684\u540D\u7A31\u3002\u4F8B\u5982\uFF1A
 select * from table where idDatasource-Procedurewaring\ +FR-Designer-Datasource-Param_DES= \u60A8\u53EF\u4EE5\u9375\u5165"${abc}"\u505A\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u9019\u91CCabc\u662F\u53C3\u6578\u7684\u540D\u7A31\u3002\u4F8B\u5982\uFF1A
 select * from table where idDatasource-Procedurewaring\=\u7CFB\u7D71\u4E0D\u80FD\u81EA\u52D5\u7372\u53D6\u8A72\u5B58\u5132\u7A0B\u5E8F\u7684\u53C3\u6578\uFF0C\u8ACB\u624B\u52D5\u65B0\u589E\! FR-Designer-DS-Database_Query=\u8CC7\u6599\u5EAB\u67E5\u8A62 FR-Designer-LayerPageReport_PageQuery=\u5206\u9801\u67E5\u8A62 FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u8A62sql @@ -857,7 +857,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 Application=\u61C9\u7528\u7A0B\u5F0F -Formula_Dictionary_Display_Examples_Html=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \ +Formula_Dictionary_Display_Examples_Html=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) @@ -988,7 +988,7 @@ Background-Background_is_NULL=\u6C92\u6709\u80CC\u666F FR-Designer_Sytle-FRFont=\u5B57\u9AD4 Gradation=\u5C64\u6B21 The_current_list_is_empty=\u7576\u524D\u6B04\u8868\u70BA\u7A7A -Formula_Dictionary_Display_Examples=\ \u5BE6\u969B\u503C\u7BC4\u570D\u70BA \ +Formula_Dictionary_Display_Examples=\ \u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\n \u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C\n \u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100, \n \u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002 Schedule-Template_Parameter=\u7BC4\u672C\u53C3\u6578 JSShow=\u52D5\u614B\u5C55\u793A Level_coordinates=\u5C64\u6B21\u5750\u6A19 @@ -1370,7 +1370,7 @@ Not_Exsit=\u4E0D\u5B58\u5728\u65BC\u5831\u8868 Utils-Insert_Row=\u63D2\u5165\u5217 Utils-Delete_Row=\u522A\u9664\u5217 not_support_authority_edit=\u8A72\u5143\u7D20\u4E0D\u652F\u6301\u8A31\u53EF\u6B0A\u63A7\u5236 -Formula_Tips=\u516C\u5F0F\u5FC5\u9808\u4EE5"\ +Formula_Tips=\u516C\u5F0F\u5FC5\u9808\u4EE5"\="\u865F\u958B\u982D FR-Action_Copy=\u8907\u88FD Compile_Success=\u7DE8\u8B6F\u6210\u529F BackgroundTexture-RecycledPaper=\u518D\u751F\u7D19 @@ -1535,7 +1535,7 @@ FR-Designer_Cancel=\u53D6\u6D88 Button-Group-Display-Columns=\u5C55\u793A\u6B04\u6578 Widget-Height=\u63A7\u5236\u9805\u9AD8\u5EA6 Examples=\u4F8B\u5B50 -Formula_Dictionary_Display_Example=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA Formula_Dictionary_Display_Examples\ +Formula_Dictionary_Display_Example=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA Formula_Dictionary_Display_Examples\= \u5BE6\u969B\u503C\u7BC4\u570D\u70BA Formula_Dictionary_Display_Examples_Html\=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA Formula_Editor\=\u516C\u5F0F\u7DE8\u8F2F\u5668 StyleAlignment-Horizontal=\u6C34\u5E73\u5C0D\u9F4A HyperLink_Must_Alone_Reset=\u591A\u500B\u8D85\u93C8 ExpandD-Expand_Direction=\u64F4\u5C55\u65B9\u5411 From e10fbeb70d1bb10ad8c87c104d58c45805c4ed37 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 11 May 2017 11:50:35 +0800 Subject: [PATCH 002/101] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E5=9B=BD=E9=99=85=E5=8C=96?= 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 ++-- 1 file changed, 2 insertions(+), 2 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 d427dd367a..adb1ce6fef 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 @@ -1786,7 +1786,7 @@ Form-DataTable=DataTable Sub_Report_ToolTips=Sub Report ToolTips Right_Top=Upper right M_Edit-Merge_Cell=Merge Cell -FR-Designer_Restore_Default=Back to default\ +FR-Designer_Restore_Default=Back to default Component_Interval=Components Interval Cover_None=Override None Datasource-From_Database=DB table @@ -1894,7 +1894,7 @@ All_Border_Line=All Border FR-Utils-Please_Input_a_New_Name=Input a New Name FR-Base_Formula_Plugin=Plugin Function Two_Rows_Of_Three_Grid=A grid with 2 rows and 3 columns -FR-Designer_Certificate_Pass=Certificate Password\ +FR-Designer_Certificate_Pass=Certificate Password Bubble-Series_Name=Series Name M-New_Multi_Report=New Aggregate Report BackgroundTexture-PinkTissuePaper=Pink Sandpaper From d9f7bf50f452cd6838862c86ed79256b29765bd7 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 15 May 2017 10:25:02 +0800 Subject: [PATCH 003/101] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20=E5=90=88=E4=BB=A3=E7=A0=81=E6=BC=8F=E4=BA=86?= =?UTF-8?q?=E4=B8=AANPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/loghandler/LogHandlerBar.java | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index eeba6c2fd6..5d9997f807 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -1,24 +1,16 @@ package com.fr.design.mainframe.loghandler; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.Insets; -import java.awt.ItemSelectable; -import java.awt.LayoutManager; +import com.fr.base.BaseUtils; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import javax.swing.Timer; - -import com.fr.base.BaseUtils; -import com.fr.design.gui.ibutton.UIButton; -import com.fr.general.Inter; - public class LogHandlerBar extends JPanel implements ItemSelectable { private static final long serialVersionUID = 1L; @@ -116,7 +108,9 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { }; if (timer != null) { timer.addActionListener(taskAction); - timer.start(); + if (timer != null) { + timer.start(); + } } } From f0fcb3fc95becbcaa447aaf0e15a3940e8d50970 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 15 May 2017 10:28:11 +0800 Subject: [PATCH 004/101] 1 --- .../com/fr/design/mainframe/loghandler/LogHandlerBar.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index 5d9997f807..4fbef485d8 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -108,9 +108,10 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { }; if (timer != null) { timer.addActionListener(taskAction); - if (timer != null) { - timer.start(); - } + } + // taskAction里还有可能置空timer. + if (timer != null) { + timer.start(); } } From ef0f5f8a1331fbbac59f29d1e916356e90b30564 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 16 May 2017 16:47:23 +0800 Subject: [PATCH 005/101] =?UTF-8?q?REPORT-2675=20release=E5=88=A0=E4=BA=86?= =?UTF-8?q?fr.properties=E6=96=87=E4=BB=B6=E5=90=8E,=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=9B=BD=E9=99=85=E5=8C=96=E6=89=BE=E4=B8=8D?= =?UTF-8?q?=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer.properties | 8 ++++++++ .../src/com/fr/design/locale/designer_en_US.properties | 8 ++++++++ .../src/com/fr/design/locale/designer_ja_JP.properties | 8 ++++++++ .../src/com/fr/design/locale/designer_ko_KR.properties | 8 ++++++++ .../src/com/fr/design/locale/designer_zh_CN.properties | 8 ++++++++ .../src/com/fr/design/locale/designer_zh_TW.properties | 8 ++++++++ 6 files changed, 48 insertions(+) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index f59310b657..6ee8b40b78 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -1986,3 +1986,11 @@ FR-Designer_Role=Role FR-Designer_Permissions=Permissions FR-Designer_Form_Button=Button FR-Designer_WF_Name=Name +FR-Designer_Double=Double +FR-Designer_Query= +FR-Designer_Font=Font +FR-Designer_Confirm= +FR-Designer_Parameter= +FR-Designer-Plugin_Plugin=Plugin +FR-Designer_Background=Background +Template=Template 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 adb1ce6fef..08d160f415 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 @@ -1986,3 +1986,11 @@ FR-Designer_Role=Role FR-Designer_Permissions=Permissions FR-Designer_Form_Button=Button FR-Designer_WF_Name=Name +FR-Designer_Double=Decimal +FR-Designer_Query=Query +FR-Designer_Font=Font +FR-Designer_Confirm=OK +FR-Designer_Parameter=Parameter +FR-Designer-Plugin_Plugin=Plugin +FR-Designer_Background=BG +Template=Template 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 2718ab1a72..786a4de9bf 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 @@ -1986,3 +1986,11 @@ FR-Designer_Permissions=\u6A29\u9650 FR-Designer_Form_Button=\u30DC\u30BF\u30F3 FR-Designer_WF_Name=\u540D\u79F0 FR-Designer_Role=\u5F79\u5272 +FR-Designer_Double=\u5C0F\u6570 +FR-Designer_Query=\u30AF\u30A8\u30EA +FR-Designer_Font=\u30D5\u30A9\u30F3\u30C8 +FR-Designer_Confirm=OK +FR-Designer_Parameter=\u30D1\u30E9\u30E1\u30FC\u30BF +FR-Designer-Plugin_Plugin=\u30D7\u30E9\u30B0\u30A4\u30F3 +FR-Designer_Background=\u80CC\u666F +Template=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 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 83eba5a4e4..80d304ff05 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 @@ -1986,3 +1986,11 @@ FR-Designer_Permissions= FR-Designer_Form_Button= FR-Designer_WF_Name= FR-Designer_Role= +FR-Designer_Double=\uC18C\uC218 +FR-Designer_Query=\uCC3E\uC544\uBCF4\uAE30 +FR-Designer_Font=\uAE00\uAF34 +FR-Designer_Confirm=\uD655\uC778 +FR-Designer_Parameter=\uB9E4\uAC1C\uBCC0\uC218 +FR-Designer-Plugin_Plugin=\uD50C\uB7EC\uADF8\uC778 +FR-Designer_Background=\uBC30\uACBD +Template=\uD15C\uD50C\uB9BF 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 4bbe248d1c..d06b8a260e 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 @@ -1986,3 +1986,11 @@ FR-Designer_Role=\u89D2\u8272 FR-Designer_Permissions=\u6743\u9650 FR-Designer_Form_Button=\u6309\u94AE FR-Designer_WF_Name=\u540D\u79F0 +FR-Designer_Double=\u5C0F\u6570 +FR-Designer_Query=\u67E5\u8BE2 +FR-Designer_Font=\u5B57\u4F53 +FR-Designer_Confirm=\u786E\u8BA4 +FR-Designer_Parameter=\u53C2\u6570 +FR-Designer-Plugin_Plugin=\u63D2\u4EF6 +FR-Designer_Background=\u80CC\u666F +Template=\u6A21\u7248 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 5556a7ca1d..f5fa67f1c2 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 @@ -1986,3 +1986,11 @@ FR-Designer_Role=\u89D2\u8272 FR-Designer_Permissions=\u6B0A\u9650 FR-Designer_Form_Button=\u6309\u9215 FR-Designer_WF_Name=\u540D\u7A31 +FR-Designer_Double=\u5C0F\u6578 +FR-Designer_Query=\u67E5\u8A62 +FR-Designer_Font=\u5B57\u9AD4 +FR-Designer_Confirm=\u78BA\u8A8D +FR-Designer_Parameter=\u53C3\u6578 +FR-Designer-Plugin_Plugin=\u63D2\u4EF6 +FR-Designer_Background=\u586B\u6EFF\u8272\u5F69 +Template=\u7BC4\u672C From 5bedbdc937cbf2b673c4e4c9f571eef6795eb0bb Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 16 May 2017 17:14:23 +0800 Subject: [PATCH 006/101] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_ja_JP.properties | 236 +++++++++--------- 1 file changed, 118 insertions(+), 118 deletions(-) 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 786a4de9bf..0ffea0ef6a 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 @@ -11,7 +11,7 @@ FR-Designer-BBSLogin_Switch-Account=\u30A2\u30AB\u30A6\u30F3\u30C8\u5207\u308A\u FR-Designer-BBSLogin_Privite-Message=\u500B\u4EBA\u30E1\u30C3\u30BB\u30FC\u30B8 FR-Designer-BBSLogin_Times=\u56DE FR-Designer-BBSLogin_Username-Empty-Tip=\u30E6\u30FC\u30B6\u30FCID\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093 -FR-Designer-Basic_More_Color=\u8A73\u7D30 +FR-Designer-Basic_More_Color=\u3082\u3063\u3068\u591A\u3044 FR-Designer-Estate_Any=\u5236\u9650\u306A\u3057 FR-Designer-Estate_Default_Font=\u30C7\u30D5\u30A9\u30EB\u30C8\u30D5\u30A9\u30F3\u30C8 FR-Designer-Estate_Default_Null=\u30C7\u30D5\u30A9\u30EB\u30C8\u306F\u7A7A @@ -90,14 +90,14 @@ FR-Designer_DS-Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8 FR-Designer_Data-confusion=\u30C7\u30FC\u30BF\u6DF7\u4E71 FR-Designer_Data_Type=\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7 FR-Designer_Double_Click_Edit_OR_Clear=\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7DE8\u96C6\u307E\u305F\u306F\u30AF\u30EA\u30A2\u3059\u308B -FR-Designer_Email=E\u30E1\u30FC\u30EB +FR-Designer_Email=\u30E1\u30FC\u30EB FR-Designer_Enabled=\u4F7F\u7528\u53EF\u80FD FR-Designer_End-Date=\u7D42\u4E86\u65E5\u671F FR-Designer_ExportAndOutput=\u51FA\u529B FR-Designer_FRFont=\u30D5\u30A9\u30F3\u30C8 FR-Designer_FS_Close_Other_Templates=\u4ED6\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u9589\u3058\u308B FR-Designer_File=\u30D5\u30A1\u30A4\u30EB -FR-Designer_Filter_Conditions=\u30D5\u30A3\u30EB\u30BF\u6761\u4EF6 +FR-Designer_Filter_Conditions=\u30D5\u30A3\u30EB\u30BF\u30FC\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u4FEE\u6B63\u3092\u5B8C\u4E86\u3057\u3066\u5171\u6709\u3057\u307E\u3059 FR-Designer_Fit-App=App\u81EA\u52D5\u9069\u5FDC FR-Designer_Fit=\u81EA\u52D5\u9069\u5FDC @@ -121,7 +121,7 @@ FR-Designer_Hyperlink-Form_link=\u73FE\u5728\u306E\u30C0\u30C3\u30B7\u30E5\u30DC FR-Designer_IDCard=\u8EAB\u5206\u8A3C\u660E\u66F8 FR-Designer_Icon=\u30A2\u30A4\u30B3\u30F3 FR-Designer_Index=\u5217\u8EF8/\u6307\u6A19 -FR-Designer_Input_Rule=\u5165\u529B\u898F\u5247 +FR-Designer_Input_Rule=\u66F8\u304D\u8FBC\u307F\u898F\u5247 FR-Designer_Language_Default=\u30C7\u30D5\u30A9\u30EB\u30C8 FR-Designer_Layout=\u30EC\u30A4\u30A2\u30A6\u30C8 FR-Designer_Layout-HBox=\u6C34\u5E73\u30B1\u30FC\u30B9\u30EC\u30A4\u30A2\u30A6\u30C8 @@ -142,7 +142,7 @@ FR-Designer_M_Help-Tutorial=\u30D8\u30EB\u30D7\u30C9\u30AD\u30E5\u30E1\u30F3\u30 FR-Designer_Max_Value=\u6700\u5927\u5024 FR-Designer_Min_Value=\u6700\u5C0F\u5024 FR-Designer_MobilePhone=\u30B9\u30DE\u30FC\u30C8\u30D5\u30A9\u30F3 -FR-Designer_New_Value=\u65B0\u3057\u3044\u5024 +FR-Designer_New_Value=\u65B0\u5024 FR-Designer_None=\u7121\u3057 FR-Designer_PaperSize-Mobile=\u30B9\u30DE\u30FC\u30C8\u30D5\u30A9\u30F3 FR-Designer_PaperSize-Mobile-Large=\u5927\u304D\u3044\u30B9\u30AF\u30EA\u30FC\u30F3 @@ -161,7 +161,7 @@ FR-Designer_Refresh_Parameter_In_SQL=SQL\u4E2D\u306E\u30D1\u30E9\u30E1\u30FC\u30 FR-Designer_Reg_Expressions=\u6B63\u5247\u8868\u73FE\u5F0F FR-Designer_Reg_Max_Length=\u6700\u5927\u9577\u3055 FR-Designer_Reg_Min_Length=\u6700\u5C0F\u9577\u3055 -FR-Designer_ReportColumns-Columns=\u30B5\u30D6\u30D5\u30A3\u30FC\u30EB\u30C9 +FR-Designer_ReportColumns-Columns=\u30B3\u30E9\u30E0\u5206\u3051 FR-Designer_Return-Date=\u65E5\u4ED8\u306B\u623B\u308B FR-Designer_RichText=\u30EA\u30C3\u30C1\u30C6\u30AD\u30B9\u30C8\u633F\u5165 FR-Designer_RichTextEditor=\u30EA\u30C3\u30C1\u30C6\u30AD\u30B9\u30C8\u30A8\u30C7\u30A3\u30BF @@ -260,7 +260,7 @@ FR-Designer_Role_changed_isRefresh=\u30ED\u30FC\u30EB\u306F\u5909\u66F4\u3057\u3 FR-Designer_FS_Name=\u610F\u601D\u6C7A\u5B9A\u30B7\u30B9\u30C6\u30E0 FR-Designer_Datasource-Parameter=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30D1\u30E9\u30E1\u30FC\u30BF FR-Designer_Tree-ComboBox=\u30D7\u30EB\u30C0\u30A6\u30F3\u30C4\u30EA\u30FC -FR-Designer_Form-Iframe=\u30DA\u30FC\u30B8\u30DC\u30C3\u30AF\u30B9 +FR-Designer_Form-Iframe=\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u30DC\u30C3\u30AF\u30B9 FR-Designer_Type=\u30BF\u30A4\u30D7 FR-Designer_User-defined=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA FR-Designer_Simple_general_forV6=\u6C4E\u7528\u30AF\u30A8\u30EA(ECC 6\u4EE5\u4E0A\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u9069\u7528) @@ -343,7 +343,7 @@ FR-Designer-PluginLicense_Check_Failed=\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u30E FR-Designer-File_address=\u30D5\u30A1\u30A4\u30EB\u30A2\u30C9\u30EC\u30B9 FR-Designer-Local_file=\u30ED\u30FC\u30AB\u30EB\u30D5\u30A1\u30A4\u30EB FR-Designer_Selection=\u9078\u629E -FR-Designer-Type_Parameter= ${abc}\u3092\u5165\u529B\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
 \u3053\u3053\u3067abc\u3068\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u7684\u540D\u79F0\u3067\u3059\u3002\u4F8B\u3048\u3070\uFF1A
+FR-Designer-Type_Parameter= ${abc}\u3092\u5165\u529B\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
 \u3053\u3053\u3067abc\u3068\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u7684\u540D\u79F0\u3067\u3059\u3002\u4F8B\u3048\u3070\uFF1A
FR-Designer_Add_JS_warning=\u4F8B\u306B\u793A\u3059\u3088\u3046\u306A\u6B63\u3057\u3044URL\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF01 FR-Designer-Encoding_Type=\u30A8\u30F3\u30B3\u30FC\u30C9\u30BF\u30A4\u30D7 FR-Designer-FirstRow_IS_ColumnName=\u7B2C\u4E00\u884C\u306F\u5217\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u307F\u307E\u3059 @@ -458,11 +458,11 @@ FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F FR-Designer_Import_Css=Css\u5F15\u7528 FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528 -FR-Designer-Datasource-Param_DES=  "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070
 select * from table where id\=${abc}\u3002
 select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)\uFFFD -FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC -FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA -FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql -FR-Designer_Is_Share_DBTableData=\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u5171\u6709 +FR-Designer-Datasource-Param_DES=  "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070
 select * from table where id\=${abc}\u3002
 select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)\uFFFD +FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA +FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5206\u3051\u30AF\u30A8\u30EA +FR-Designer-LayerPageReport_Define_PageQuerySQL=\u30DA\u30FC\u30B8\u5206\u3051\u30AF\u30A8\u30EA\u6587\u3092\u5B9A\u7FA9 +FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 FR-Designer_Event=\u30A4\u30D9\u30F3\u30C8 FR-Designer_Properties=\u30D7\u30ED\u30D1\u30C6\u30A3 FR-Designer_Permissions_Edition=\u6A29\u9650\u7DE8\u96C6 @@ -488,7 +488,7 @@ FR-Designer_Attribute=\u30D7\u30ED\u30D1\u30C6\u30A3 FR-Designer_Form_Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u7DE8\u96C6 FR-Designer_Form_Basic_Properties=\u57FA\u672C\u30D7\u30ED\u30D1\u30C6\u30A3 FR-Designer_DS_Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8 -FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u69CB\u7BC9 +FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u3092\u69CB\u7BC9 FR-Designer_Set_Callback_Function=\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u95A2\u6570\u8A2D\u5B9A FR-Designer_ConfirmDialog_Content=tab\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B FR-Designer_ConfirmDialog_Title=FineReport 8.0 @@ -533,8 +533,8 @@ FR-Designer_Show_Content=\u5185\u5BB9\u8868\u793A FR-Designer_Auto_Adjust_Size=\u81EA\u52D5\u8ABF\u6574 FR-Designer_Show_As_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u30AF\u30672\u9032\u6CD5\u306E\u5185\u5BB9\u3092\u8868\u793A\u3059\u308B FR-Designer_File_Name_For_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u540D -FR-Designer_No=\u306A\u3057 -FR-Designer_Pagination=\u6539\u30DA\u30FC\u30B8 +FR-Designer_No=\u3044\u3044\u3048 +FR-Designer_Pagination=\u6539\u9801 FR-Designer-Move_Tab_First=\u6700\u521D\u306B\u79FB\u52D5 FR-Designer-Move_Tab_End=\u6700\u5F8C\u306B\u79FB\u52D5 FR-Designer-Move_Tab_Next=\u6B21\u306B\u79FB\u52D5 @@ -580,7 +580,7 @@ FR-Designer_Log=\u30ED\u30B0 FR-Designer_Form-Fit-Tip=\u81EA\u52D5\u9069\u5FDC\u30D7\u30E9\u30B0\u30A4\u30F3 FR-Designer_Button-Cancel=\u53D6\u308A\u6D88\u3057 FR-Designer_LocalWidget=\u30ED\u30FC\u30AB\u30EB\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u30E9\u30A4\u30D6\u30E9\u30EA -FR-Designer_Alert=\u8B66\u544A +FR-Designer_Alert=\u30A2\u30E9\u30FC\u30C8 FR-Designer_TableData-Default-Para=\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF FR-Designer_Edit_Button_ToolBar=\u30DC\u30BF\u30F3\u306E\u30C4\u30FC\u30EB\u30D0\u30FC\u3092\u7DE8\u96C6 FR-Designer-Plugin_Please_Update_Jar=jar\u30D1\u30C3\u30AF\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u3066\u304F\u3060\u3055\u3044 @@ -597,24 +597,24 @@ FR-Designer_DoubleLayer_Report=\u4E8C\u968E\u30BF\u30A4\u30C8\u30EB FR-Designer_Validate=\u691C\u8A3C CellWrite-InsertRow_NULL=\u30CC\u30EB DashBoard-ChartFloat=\u30B0\u30E9\u30D5 -contact_info=\u9023\u7D61\u60C5\u5831 +contact_info=\u304A\u554F\u3044\u5408\u308F\u305B\u60C5\u5831\uFF08\u30AA\u30D7\u30B7\u30E7\u30F3\uFF09 Page_Setup=\u30DA\u30FC\u30B8\u8A2D\u5B9A -CellWrite-Print_Export=\u5370\u5237\u51FA\u529B +CellWrite-Print_Export=\u5370\u5237\u3068\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 Cannot_Get_Date=\u65E5\u4ED8\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093 -FR-Designer_Modify=\u5909\u66F4 +FR-Designer_Modify=\u4FEE\u6B63 M-Write_Preview=\u66F8\u304D\u8FBC\u307F\u30D7\u30EC\u30D3\u30E5\u30FC -FR-Base_RWA-Key=\u4E3B\u30AD\u30FC +FR-Base_RWA-Key=\u30E1\u30A4\u30F3\u30AD\u30FC China=\u4E2D\u56FD -Set_Legend_Sytle=\u51E1\u4F8B\u66F8\u5F0F\u8A2D\u5B9A -FR-Designer_Number=\u6570\u5024 -FR-Designer-Widget-Style_Common=\u4E00\u822C -M-Save_As=\u540D\u524D\u3092\u4ED8\u3051\u3066\u4FDD\u5B58 -Following_parameters_are_not_generated=\u4EE5\u4E0B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306F\u4F5C\u6210\u3055\u308C\u3066\u3044\u306A\u3044 -FR-Designer-Basic_Activation_Key_Copy_OK=\u3059\u3067\u306B\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC +Set_Legend_Sytle=\u51E1\u4F8B\u306E\u66F8\u5F0F\u8A2D\u5B9A +FR-Designer_Number=\u6570\u5B57 +FR-Designer-Widget-Style_Common=\u666E\u901A +M-Save_As=\u540D\u524D\u3092\u3064\u3051\u3066\u4FDD\u5B58 +Following_parameters_are_not_generated=\u4EE5\u4E0B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306F\u307E\u3060\u751F\u6210\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +FR-Designer-Basic_Activation_Key_Copy_OK=\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F Utils-Current_Sheet=\u73FE\u5728\u306E\u30B7\u30FC\u30C8 ConditionB-is_less_than=\u3088\u308A\u5C0F\u3055\u3044 BorderLayout-West=\u897F -AnalysisLine=\u5206\u6790\u7DDA +AnalysisLine=\u5206\u6790\u30E9\u30A4\u30F3 Layer_Report_Warnning_info=\u30B0\u30EA\u30C3\u30C9\u578B\u30A8\u30F3\u30B8\u30F3\u306F\u30C7\u30FC\u30BF\u91CF\u304C\u591A\u3044\u5834\u5408\u306B\u9069\u3057\u3066\u3044\u307E\u3059\u3002
\u3053\u306E\u30A8\u30F3\u30B8\u30F3\u3092\u4F7F\u3046\u3068\u3001\u5E33\u7968\u6A5F\u80FD\u306E\u591A\u304F\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u307E\u305B\u3093\u3002
\u8A73\u3057\u3044\u5185\u5BB9\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u95A2\u9023\u500B\u6240\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002 Tree-Width=\u5E45 alert_word=\u884C\u306E\u9AD8\u3055\u3092\u56FA\u5B9A\u305B\u305A\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3059\u308B\u6642\u3001\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305Fword\u3067\u30BB\u30EB\u884C\u306E\u9AD8\u3055\u306F\u5185\u5BB9\u306B\u5408\u308F\u305B\u3066\u5927\u304D\u304F\u306A\u308A\u307E\u3059\u3002\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u6539\u30DA\u30FC\u30B8\u4F4D\u7F6E\u3068\u30D7\u30EC\u30D3\u30E5\u30FC\u7D50\u679C\u304C\u4E00\u81F4\u3057\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 @@ -634,7 +634,7 @@ Summary_Method=\u96C6\u8A08\u65B9\u5F0F Select_Specified_Grouping=\u30AB\u30B9\u30BF\u30E0\u30B0\u30EB\u30FC\u30D7\u5206\u3051\u3092\u9078\u629E HF-Number_of_Page=\u7DCF\u30DA\u30FC\u30B8\u6570\u633F\u5165 FR-Designer-Tree_Height=\u9AD8\u3055 -Owner=\u30E1\u30A4\u30F3 +Owner=\u30AA\u30FC\u30CA\u30FC Home=\u30DB\u30FC\u30E0\u30DA\u30FC\u30B8 FR-Server_Embedded_Server_Stop=\u7D44\u307F\u8FBC\u307F\u306E\u30B5\u30FC\u30D0-\u505C\u6B62 FR-Designer-Plugin_Detecting_Update=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u691C\u8A3C\u4E2D @@ -664,8 +664,8 @@ CellWrite-Print_Background=\u30BB\u30EB\u80CC\u666F Wizard=\u30AC\u30A4\u30C9 Preference-Is_Drag_Permited=\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7\u3092\u30B5\u30DD\u30FC\u30C8 FR-Designer_Release_Lock=\u30A2\u30F3\u30ED\u30C3\u30AF -Form-Delimiter=\u533A\u5207\u308A\u6587\u5B57 -wrong=\u30A8\u30E9\u30FC\u767A\u751F +Form-Delimiter=\u533A\u5207\u308A\u7B26 +wrong=\u30A8\u30E9\u30FC\u304C\u51FA\u307E\u3057\u305F FR-Menu-Server_Chart_PreStyle=\u30B0\u30E9\u30D5\u4E8B\u524D\u5B9A\u7FA9\u914D\u8272 Form-Button=\u30DC\u30BF\u30F3 FormulaD-Valid_Formula=\u6709\u52B9\u306A\u6570\u5F0F\u3067\u3059 @@ -720,24 +720,24 @@ M_Format_A-Cell_Attributes=\u305D\u306E\u4ED6\u306E\u5C5E\u6027 CellWrite-Show_As_Image=\u753B\u50CF\u3067\u5185\u5BB9\u3092\u8868\u793A ShowAsDownload=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u30AF\u3067\u30D0\u30A4\u30CA\u30EA\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8868\u793A Form-ComboCheckBox=\u30D7\u30EB\u30C0\u30A6\u30F3\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 -BackgroundTexture-WovenMat=\u9EBB -BindColumn-Custom_Data_Appearance=\u30AB\u30B9\u30BF\u30E0\u8868\u793A +BackgroundTexture-WovenMat=\u7E54\u7269 +BindColumn-Custom_Data_Appearance=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u8868\u793A Actived=\u30A2\u30AF\u30C6\u30A3\u30D6 Env-Local_Directory=\u30ED\u30FC\u30AB\u30EB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA Form-Colon=\u30B3\u30ED\u30F3 Preference-Vertical_Scroll_Bar_Visible=\u5782\u76F4\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u3092\u8868\u793A -Utils-Show_Cell_Value=\u30BB\u30EB\u5024\u8868\u793A +Utils-Show_Cell_Value=\u30BB\u30EB\u5024\u3092\u8868\u793A FR-Designer_ReportColumns-Repeat_Row=\u884C\u306E\u9806\u5E8F\u3092\u30B3\u30D4\u30FC SpecifiedG-Specified_Group=\u30AB\u30B9\u30BF\u30E0\u30B0\u30EB\u30FC\u30D7\u5206\u3051 RWA-Smart_Add_Cells=\u30BB\u30EB\u81EA\u52D5\u8FFD\u52A0 HF-Left_Section=\u5DE6\u30A8\u30EA\u30A2 M_Report-Report_Background=\u7528\u7D19\u80CC\u666F Image-Extend=\u62E1\u5927\u8868\u793A -FS_BI=\u610F\u601D\u6C7A\u5B9A\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0 +FS_BI=\u610F\u601D\u6C7A\u5B9A\u30B7\u30B9\u30C6\u30E0 ToolBar_Bottom=\u4E0B\u90E8\u306E\u30C4\u30FC\u30EB\u30D0\u30FC -Hgap=\u6C34\u5E73\u9699\u9593 -FR-Designer_Enter-New-FileName=\u540D\u524D -Verify_Fail=\u691C\u8A3C\u5931\u6557 +Hgap=\u6C34\u5E73\u9593\u9694 +FR-Designer_Enter-New-FileName=\u65B0\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044 +Verify_Fail=\u691C\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F CellWrite-InsertRow_Policy=\u884C\u633F\u5165\u30DD\u30EA\u30B7\u30FC FR-Designer-Plugin_Illegal_Plugin_Zip=\u5408\u6CD5\u306E\u30D7\u30E9\u30B0\u30A4\u30F3\u30D1\u30C3\u30B1\u30FC\u30B8\u3067\u306F\u306A\u3044 RCodeVersion=\u30D0\u30FC\u30B8\u30E7\u30F3 @@ -747,79 +747,79 @@ FR-Designer-Widget-Style_Preview=\u30D7\u30EC\u30D3\u30E5\u30FC mobile_number=\u643A\u5E2F\u756A\u53F7 FR-Designer_Form-ComboCheckBox=\u30D7\u30EB\u30C0\u30A6\u30F3\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 CacheValidateTime=\u5E33\u7968\u30AD\u30E3\u30C3\u30B7\u30E5\u306E\u6709\u52B9\u6642\u9593 -Hyperlink-Extends_Report_Parameters=\u5E33\u7968\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u7D99\u627F +Hyperlink-Extends_Report_Parameters=\u5E33\u7968\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u53D7\u3051\u7D99\u3050 FR-Designer_Values-Editor=\u5024\u30A8\u30C7\u30A3\u30BF Export-Excel=Excel -Utils-Left_to_Right=\u6A2A\u65B9\u5411 -ExpandD-Vertical_Extendable=\u7E26\u5C55\u958B +Utils-Left_to_Right=\u5DE6\u304B\u3089\u53F3\u3078 +ExpandD-Vertical_Extendable=\u5C55\u958B\uFF08\u7E26\uFF09 Utils-Report_Runtime_Env=\u5E33\u7968\u4F5C\u696D\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA -Utils-Right_to_Left=\u53F3\u304B\u3089\u5DE6 -Utils-Beyond_the_top_side_of_Border=\u4E0A\u306E\u5883\u754C\u3092\u8D85\u904E\u3057\u3066\u3044\u307E\u3059\u3002\u914D\u7F6E\u3067\u304D\u307E\u305B\u3093\u3002 -Exception_StackTrace=\u30A8\u30E9\u30FC\u7570\u5E38\u30B9\u30BF\u30C3\u30AF\u60C5\u5831 -Corresponding_Fields=\u5BFE\u5FDC\u30D5\u30A3\u30FC\u30EB\u30C9 +Utils-Right_to_Left=\u53F3\u304B\u3089\u5DE6\u3078 +Utils-Beyond_the_top_side_of_Border=\u4E0A\u306E\u30DC\u30FC\u30C0\u30FC\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3001\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002 +Exception_StackTrace=\u30B9\u30BF\u30C3\u30AF\u60C5\u5831\u30A8\u30E9\u30FC\u30FB\u7570\u5E38 +Corresponding_Fields=\u5BFE\u5FDC\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9 Form-CheckBox=\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 Utils-Current_Row=\u73FE\u5728\u306E\u884C BuildIn=\u7D44\u307F\u8FBC\u307F -BindColumn-Results_Filter=\u7D50\u679C\u30BB\u30C3\u30C8\u30D5\u30A3\u30EB\u30BF +BindColumn-Results_Filter=\u7D50\u679C\u30BB\u30C3\u30C8\u3092\u30D5\u30A3\u30EB\u30BF FR-Designer-Plugin_Manager=\u30D7\u30E9\u30B0\u30A4\u30F3\u7BA1\u7406 -M_File-Export-CSV=CSV(\u30AB\u30F3\u30DE\u533A\u5207\u308A) +M_File-Export-CSV=CSV\u66F8\u5F0F(\u30B3\u30F3\u30DE\u3067\u5206\u5272) Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF -ReportServerP-Edit_Printer=\u30D7\u30EA\u30F3\u30BF\u7DE8\u96C6 -FR-Designer_Datasource-Stored_Procedure=\u30D7\u30ED\u30B7\u30FC\u30B8\u30E3 +ReportServerP-Edit_Printer=\u30D7\u30EA\u30F3\u30BF\u30FC\u7DE8\u96C6 +FR-Designer_Datasource-Stored_Procedure=\u30D7\u30ED\u30B7\u30FC\u30B8\u30E3\u30FC RESTART=\u518D\u8D77\u52D5 FormulaD-Function_name=\u95A2\u6570\u540D -ChooseOneButton=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4E00\u3064\u9078\u629E\u3057\u3066\u304B\u3089\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044 +ChooseOneButton=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u9078\u629E\u3057\u3066\u8FFD\u52A0\u3057\u3066\u4E0B\u3055\u3044 Priority=\u512A\u5148\u30E9\u30F3\u30AF Datasource-Datasource=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 FR-Designer_Width=\u5E45 -Cannot-Add_To_This_Area=\u5F53\u8A72\u30A8\u30EA\u30A2\u306B\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093 +Cannot-Add_To_This_Area=\u8A72\u5F53\u30A8\u30EA\u30A2\u306B\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093 Run=\u5B9F\u884C -Set_Submit_Condition=\u66F8\u304D\u8FBC\u307F\u6761\u4EF6\u8A2D\u5B9A +Set_Submit_Condition=\u30B5\u30D6\u30DF\u30C3\u30C8\u6761\u4EF6\u8A2D\u5B9A FR-Base_Value=\u5024 -fileLocked_undeleted=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u30ED\u30C3\u30AF\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3002OK\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3001\u30EA\u30B9\u30C8\u3092\u518D\u8AAD\u307F\u8FBC\u307F\u3057\u3066\u304F\u3060\u3055\u3044\u3002 -Web_Apply=WEB\u30A2\u30D7\u30EA -Refresh_Database=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u66F4\u65B0 -Set_Row_Title_End=\u7E70\u308A\u8FD4\u3057\u7D42\u4E86\u884C\u8A2D\u5B9A -FR-Utils-New_Folder=\u65B0\u898F\u30D5\u30A9\u30EB\u30C0\u306E\u4F5C\u6210 -BiasD-From-upper_left_to_lower_right=\u5DE6\u4E0A\u5074\u304B\u3089\u53F3\u4E0B\u5074\u3078 -CapsLock=Caps Lock\u304C\u30AA\u30F3\u306B\u306A\u3063\u3066\u3044\u308B +fileLocked_undeleted=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u30ED\u30C3\u30AF\u3055\u308C\u3066\u3044\u308B\u3001\u524A\u9664\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\uFF01 +Web_Apply=WEB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 +Refresh_Database=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u5237\u65B0 +Set_Row_Title_End=\u91CD\u8907\u3059\u308B\u7D42\u4E86\u884C\u3092\u8A2D\u5B9A +FR-Utils-New_Folder=\u30D5\u30A9\u30EB\u30C0\u30FC\u3092\u65B0\u898F\u4F5C\u6210 +BiasD-From-upper_left_to_lower_right=\u5DE6\u4E0A\u5074\u304B\u3089\u53F3\u4E0B\u5074\u3078\u5C55\u958B\u3059\u308B +CapsLock=Caps Lock\u30AD\u30FC\u304C\u30AA\u30F3\u306B\u306A\u3063\u3066\u3044\u308B StyleFormat-Sample=\u30B5\u30F3\u30D7\u30EB RWA-Smart_Add_Cell_Group=\u30BB\u30EB\u30B0\u30EB\u30FC\u30D7\u81EA\u52D5\u8FFD\u52A0 MConfig-CancelButton=\u30AD\u30E3\u30F3\u30BB\u30EB -Function-Choose_Function_Class=\u95A2\u6570\u30AF\u30E9\u30B9\u9078\u629E -LatLng=\u7D4C\u5EA6\u7DEF\u5EA6 +Function-Choose_Function_Class=\u95A2\u6570\u30AF\u30E9\u30B9\u3092\u9078\u629E\u3059\u308B +LatLng=\u7D4C\u7DEF\u5EA6 DS-Server_TableData=\u30B5\u30FC\u30D0\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 BackgroundTexture-GreenMarble=\u5927\u7406\u77F3(\u7DD1) read_time_out=\u30ED\u30FC\u30C9\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8 JavaScript-Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F DS-Relation_TableData=\u95A2\u9023\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 -CellWrite-Page_Before_Row=\u884C\u524D -FR-Designer-Plugin_Load_Plugins_From_Server=\u30D7\u30E9\u30B0\u30A4\u30F3\u30B9\u30C8\u30A2\u304B\u3089\u30C7\u30FC\u30BF\u53D6\u5F97\u4E2D +CellWrite-Page_Before_Row=\u884C\u524D\u306E\u6539\u9801 +FR-Designer-Plugin_Load_Plugins_From_Server=\u30D7\u30E9\u30B0\u30A4\u30F3\u30BB\u30F3\u30BF\u30FC\u304B\u3089\u30C7\u30FC\u30BF\u53D6\u5F97\u4E2D D-Dispaly_Divide_Result_Set_into_Groups=\u7D50\u679C\u30BB\u30C3\u30C8\u3092\u30B0\u30EB\u30FC\u30D7\u5206\u3051 Closed=\u9589\u3058\u307E\u3057\u305F RWA-Help=\u672A\u5909\u66F4\u3067\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u306A\u3044\u3053\u3068\u304C\u8A2D\u5B9A\u3055\u308C\u308B\u3068\u3001\u5E33\u7968\u306E\u4F5C\u6210\u3068\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u3059\u308B\u6642\u306B\u3001\u8A18\u9332\u5185\u5BB9\u306E\u30BB\u30EB\u306F\u7DE8\u96C6\u3084\u5909\u66F4\u3055\u308C\u306A\u3044\u306E\u3067\u3001\u3053\u306E\u8A18\u9332\u306F\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3055\u308C\u306A\u3044\u3002\n\u30D3\u30C3\u30B0\u30C7\u30FC\u30BF\u91CF\u306E\u691C\u7D22\u304A\u3088\u3073\u57CB\u3081\u623B\u3057\u306E\u5834\u5408\u3001\u3053\u306E\u8A2D\u5B9A\u3092\u6709\u52B9\u306B\u3059\u308C\u3070\u3001\u4F5C\u6210\u3068\u66F8\u304D\u8FBC\u307F\u306E\u6A5F\u80FD\u3092\u9AD8\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u3002 -FR-Designer-Widget-Style_Custom=\u30AB\u30B9\u30BF\u30E0 +FR-Designer-Widget-Style_Custom=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA FR-Designer-Widget-Style_Render_Style=\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u30B9\u30BF\u30A4\u30EB Highlight-Barcode=\u30D0\u30FC\u30B3\u30FC\u30C9 -FR-Designer_Connect_SQL_Cannot_Null=\u30C7\u30FC\u30BF\u63A5\u7D9A\u3068SQL\u30D1\u30CD\u30EB\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093 +FR-Designer_Connect_SQL_Cannot_Null=\u30C7\u30FC\u30BF\u63A5\u7D9A\u3068SQL\u30D1\u30CD\u30EB\u3092\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 trigger=\u89E6\u767A M-Data_Analysis=\u30C7\u30FC\u30BF\u5206\u6790 -Function-The_selected_file_cannot_be_null=\u30D5\u30A1\u30A4\u30EB\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093 +Function-The_selected_file_cannot_be_null=\u30D5\u30A1\u30A4\u30EB\u3092\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 No-Privilege=\u6A29\u9650\u306A\u3057 ReportColumns-Repeat_Column=\u5217\u306E\u9806\u5E8F\u3092\u30B3\u30D4\u30FC SecondGraduationUnit=\u88DC\u52A9\u76EE\u76DB\u5358\u4F4D Form-Widget_Property_Value=\u5C5E\u6027\u5024 -GIVE-NAME=\u547D\u540D -FR-Designer_Rename=\u540D\u524D\u3092\u5909\u66F4 -Utils-Merge_Cell=\u30BB\u30EB\u7D50\u5408 +GIVE-NAME=\u540D\u524D\u3092\u4ED8\u3051\u308B +FR-Designer_Rename=\u540D\u524D\u3092\u5909\u66F4\u3059\u308B +Utils-Merge_Cell=\u30BB\u30EB\u3092\u7D50\u5408\u3059\u308B Style-Spacing_After=\u6BB5\u843D\u5F8C Enlarge_Or_Reduce=\u30BA\u30FC\u30E0 Tree-Height=\u9AD8\u3055 -RCodeErrorCorrect=\u8AA4\u308A\u8A02\u6B63\u80FD\u529B +RCodeErrorCorrect=\u30A8\u30E9\u30FC\u8A02\u6B63 Enter-New-FileName=\u65B0\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044 try_resending=\u518D\u9001\u4FE1\u3092\u8A66\u3057\u3066\u4E0B\u3055\u3044 -M-Open_Report=\u958B\u304F -Please_Select=\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044 +M-Open_Report=\u958B\u3044\u3066\u3044\u307E\u3059... +Please_Select=\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044 InRow=\u884C(R) Form-TextArea=\u30C6\u30AD\u30B9\u30C8\u30A8\u30EA\u30A2 FR-Designer_Https_Enable=HTTPS\u3092\u6709\u52B9\u306B\u3059\u308B @@ -829,12 +829,12 @@ Original_Marked_Filed=\u30AA\u30EA\u30B8\u30CA\u30EB\u30BF\u30B0\u30D5\u30A3\u30 BackgroundTexture-Sand=\u7802 Values=\u5024 Not_use_a_cell_attribute_table_editing=\u30BB\u30EB\u5C5E\u6027\u8868\u3067\u7DE8\u96C6\u3057\u3066\u306F\u306A\u3089\u306A\u3044 -Root=\u30EB\u30FC\u30C4\u30CE\u30FC\u30C9 +Root=\u30EB\u30FC\u30C8\u30CE\u30FC\u30C9 cycle=\u5468\u671F -open-new-form-tip=\u73FE\u5728\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306F711\u4EE5\u4E0B\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u4F5C\u6210\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u4E92\u63DB\u6027\u304C\u306A\u304F\u3001\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u306E\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3092\u7DE8\u96C6\u3059\u308B\u306B\u306F\u3001\u5BFE\u5FDC\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30C7\u30B6\u30A4\u30CA\u30FC\u3092\u5229\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +open-new-form-tip=\u73FE\u5728\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306F7.1.1\u4EE5\u4E0B\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u4F5C\u6210\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u4E92\u63DB\u6027\u304C\u306A\u304F\u3001\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u306E\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3092\u7DE8\u96C6\u3059\u308B\u306B\u306F\u3001\u5BFE\u5FDC\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30C7\u30B6\u30A4\u30CA\u30FC\u3092\u5229\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 Support-Current_Auto_Complete_Shortcut=\u73FE\u5728\u306E\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u30AD\u30FC GROUPING_MODE=\u4E00\u822C\u30B0\u30EB\u30FC\u30D7\u5206\u3051 -DBCP_MAX_IDLE=\u30D7\u30FC\u30EB\u306B\u4FDD\u6301\u3059\u308B\u6700\u5927\u63A5\u7D9A\u6570 +DBCP_MAX_IDLE=\u6700\u5927\u30A2\u30A4\u30C9\u30EB\u63A5\u7D9A\u6570 BackgroundTexture-BlueTissuePaper=\u9752\u3044\u753B\u7528\u7D19 ReportD-Export_Hided_Row=\u975E\u8868\u793A\u884C\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 FR-Custom_styles_lost=\u30AB\u30B9\u30BF\u30E0\u30B9\u30BF\u30A4\u30EB\u7D1B\u5931 @@ -850,46 +850,46 @@ MainGraduationUnit=\u4E3B\u76EE\u76DB\u5358\u4F4D Second_Axis=\u7B2C2\u5EA7\u6A19\u8EF8 Classifier-Ge=\u500B MSBold=\u30DE\u30A4\u30AF\u30ED\u30BD\u30D5\u30C8\u30E4\u30D8\u30A4 -Form-Design_Size=\u8A2D\u8A08\u306E\u30B5\u30A4\u30BA +Form-Design_Size=\u30C7\u30B6\u30A4\u30F3\u30B5\u30A4\u30BA FR-App-Template_Save=\u4FDD\u5B58 -ExpandD-Horizontal_Extendable=\u6A2A\u5C55\u958B -RP_Authority_Edit=\u6A29\u9650 -Warnning=\u6CE8\u610F -RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3067\u304D\u307E\u305B\u3093\u3001\u307E\u305F\u3001\u91CD\u8907\u3082\u3067\u304D\u307E\u305B\u3093 -Application=\u30A2\u30D7\u30EA -Formula_Dictionary_Display_Examples_Html=Formula_Dictionary_Display_Examples_Html +ExpandD-Horizontal_Extendable=\u5C55\u958B\uFF08\u6A2A\uFF09 +RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6 +Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 +RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3067\u304D\u307E\u305B\u3093\u3001\u307E\u305F\u3001\u91CD\u8907\u3082\u3067\u304D\u307E\u305B\u3093\u3002 +Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 +Formula_Dictionary_Display_Examples_Html=\u5B9F\u969B\u5024\u306E\u7BC4\u56F2\u306F\ ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF M_Edit-FormatBrush=\u66F8\u5F0F\u30B3\u30D4\u30FC(B) Indent-Pixel=\u753B\u7D20 FR-Designer-Widget-Style_Border_Line=\u7F6B\u7DDA\u306E\u592A\u3055 Widget-Default_Widget_Config=\u57FA\u672C\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8 -Version-does-not-support=\u304A\u4F7F\u3044\u306Elic\u306F\u30EA\u30E2\u30FC\u30C8\u958B\u767A\u6A5F\u80FD\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3001\u3054\u5229\u7528\u306B\u306FLIC\u3092\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -StyleAlignment-Right_To_Left=\u53F3\u304B\u3089\u5DE6 +Version-does-not-support=\u304A\u4F7F\u3044\u306Elic\u306F\u30EA\u30E2\u30FC\u30C8\u958B\u767A\u6A5F\u80FD\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3001\u3054\u5229\u7528\u306B\u306FLIC\u3092\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +StyleAlignment-Right_To_Left=\u53F3\u304B\u3089\u5DE6\u3078 Style-Spacing_Before=\u6BB5\u843D\u524D -Has_Existed=\u65E2\u306B\u3042\u308B +Has_Existed=\u3059\u3067\u306B\u5B58\u5728\u3057\u3066\u3044\u307E\u3059 FR-Designer_DisplayNothingBeforeQuery=\u30AF\u30A8\u30EA\u30AF\u30EA\u30C3\u30AF\u524D\u306B\u5E33\u7968\u5185\u5BB9\u3092\u8868\u793A\u3057\u306A\u3044 Still=\u4F9D\u7136\u3068\u3057\u3066 JS_WARNING2=\ \u4F8B\uFF1Ahttp\://localhost\:8075/WebReport/demo.js -JS_WARNING1= \u76F8\u5BFE\u7684\u5E33\u7968\u5DE5\u7A0B\u306EWebReport\u306E\u76EE\u6B21\u304C\u3001WebReport\\js\u4E0B\u306B\u5F15\u7528\u3059\u308Bjs +JS_WARNING1=\ \n\u4F8B\uFF1AWebReport\\js\u306B\u5F15\u7528\u3055\u308C\u308Bjs\u30D5\u30A1\u30A4\u30EBtest.js\u304C\u3042\u308B\u5834\u5408\u3001\u76F8\u5BFE\u30D1\u30B9\u306Fjs/test.js Connectionline=\u63A5\u7D9A\u30E2\u30FC\u30C9 Utils-Insert_Record=\u8A18\u9332\u633F\u5165 -Set-Parameter-Name=Set-Parameter-Name +Set-Parameter-Name=\u307E\u305A\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044 More-information=\u3055\u3089\u306B\u8A73\u3057\u3044\u60C5\u5831 Parameter-Boolean=\u30D6\u30FC\u30EB\u578B FRFont-Strikethrough=\u53D6\u308A\u6D88\u3057\u7DDA Server-version-tip=\u4ECA\u63A5\u7D9A\u3055\u308C\u3066\u3044\u308B\u30B5\u30FC\u30D0\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3054\u4F7F\u7528\u306E\u30C7\u30B6\u30A4\u30CA\u30FC\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u756A\u53F7\u3088\u308A\u4F4E\u3044\u306E\u3067\u3001\u5F15\u304D\u7D9A\u304D\u63A5\u7D9A\u3059\u308B\u3068\u3001\u7DE8\u96C6\u306E\u3044\u304F\u3064\u304B\u306E\u5C5E\u6027\u306F\u6709\u52B9\u7684\u306B\u4FDD\u5B58\u3067\u304D\u306A\u3044\u304B\u3082\u3057\u308C\u306A\u3044\u3002\u63A5\u7D9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308C\u3070\u3001\u304A\u4F7F\u3044\u306E\u30C7\u30B6\u30A4\u30CA\u30FC\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u30B5\u30FC\u30D0\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u30C1\u30A7\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044 Form-All_Files=\u5168\u3066\u306E\u30D5\u30A1\u30A4\u30EB -DBCP_NUM_TEST_PER_EVCTION_RUN=1\u56DE\u306E\u691C\u8A3C\u5F53\u305F\u308A\u306E\u5BFE\u8C61\u63A5\u7D9A\u6570 +DBCP_NUM_TEST_PER_EVCTION_RUN=\u30A2\u30A4\u30C9\u30EB\u63A5\u7D9A\u3092\u56DE\u53CE\u3059\u308B\u306E\u691C\u67FB\u56DE\u6570 FR-Designer-FRFont_Family=\u540D\u524D Device=\u30C7\u30D0\u30A4\u30B9 M_Insert-Cell=\u30BB\u30EB\u8981\u7D20 Present-Formula_Present=\u6570\u5F0F\u5F62\u614B FRFont-Superscript=\u4E0A\u4ED8\u304D -CellWrite-Page_Before_Column=\u5217\u524D +CellWrite-Page_Before_Column=\u5217\u524D\u306E\u6539\u9801 Golden=\u91D1\u8272 Preference-Support_Cell_Editor_Definition=\u30BB\u30EB\u30A8\u30C7\u30A3\u30BF\u3092\u30B5\u30DD\u30FC\u30C8 -M-Page_Preview=\u6539\u30DA\u30FC\u30B8\u30D7\u30EC\u30D3\u30E5\u30FC +M-Page_Preview=\u6539\u9801\u30D7\u30EC\u30D3\u30E5\u30FC HJS-CC_to=CC Tree-Select_Leaf_Only=\u30EA\u30FC\u30D5\u30CE\u30FC\u30C9\u3060\u3051\u3092\u623B\u308B Pointer-A-Tick-Order=\u30E1\u30FC\u30BF\u30FC\u3068\u76EE\u76DB\u306E\u8868\u793A\u5358\u4F4D @@ -900,9 +900,9 @@ already-saved=\u4FDD\u5B58\u6E08\u307F FR-Hyperlink_Chart_Cell=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF-\u30BB\u30EB\u9023\u52D5 Style-Left_Indent=\u5DE6\u30A4\u30F3\u30C7\u30F3\u30C8 Offline=\u30AA\u30D5\u30E9\u30A4\u30F3 -Form-Hierarchy_Tree_Next=\u6B21 -Needle=\u30E1\u30FC\u30BF\u30FC -GoogleMap=\u30B0\u30FC\u30B0\u30EB\u30DE\u30C3\u30D7 +Form-Hierarchy_Tree_Next=\u6B21\u306E +Needle=\u30DD\u30A4\u30F3\u30BF +GoogleMap=Google\u30DE\u30C3\u30D7 Running=\u5B9F\u884C\u4E2D M_Edit-Unmerge_Cell=\u30BB\u30EB\u7D50\u5408\u306E\u89E3\u9664 Out_Border_Line=\u5916\u67A0 @@ -914,29 +914,29 @@ RelatedChart=\u30B0\u30E9\u30D5\u9023\u52D5 ProcessManager=\u30D5\u30ED\u30FC\u7BA1\u7406 Cancel_Repeat_Attributes=\u91CD\u8907\u884C\u5217\u89E3\u9664 FR-App-File_Message=\u60C5\u5831 -Datasource-Stored_Procedure=\u30B9\u30C8\u30A2\u30C9\u30D7\u30ED\u30B7\u30FC\u30B8\u30E3 +Datasource-Stored_Procedure=\u30D7\u30ED\u30B7\u30FC\u30B8\u30E3\u30FC RWA-Row_Offset=\u884C\u306E\u30AA\u30D5\u30BB\u30C3\u30C8 M_Format-Style=\u30B9\u30BF\u30A4\u30EB -detail_description=\u8A73\u7D30\u8A18\u8FF0 +detail_description=\u8A73\u7D30\u8AAC\u660E FR-Designer-Widget-Style_Title_Content=\u30BF\u30A4\u30C8\u30EB\u5185\u5BB9 ParameterD-Report_Parameter=\u5E33\u7968\u30D1\u30E9\u30E1\u30FC\u30BF HF-Edit_Header=\u30D8\u30C3\u30C0\u30FC\u7DE8\u96C6 Sytle-FRFont=\u30D5\u30A9\u30F3\u30C8 -FR-Designer_Finish_Export=\u5C0E\u51FA\u5B8C\u4E86 -MultiFileUpload=\u8907\u6570\u30D5\u30A1\u30A4\u30EB\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9 -HF-Page_Number=\u30DA\u30FC\u30B8\u756A\u53F7 +FR-Designer_Finish_Export=\u51FA\u529B\u5B8C\u4E86 +MultiFileUpload=\u8907\u6570\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9 +HF-Page_Number=\u9801\u53F7 Style-Right_Indent=\u53F3\u30A4\u30F3\u30C7\u30F3\u30C8 Desktop=\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7 FR-Server-All_Error=\u30A8\u30E9\u30FC ConditionB-Operator=\u6F14\u7B97\u5B50 Today=\u4ECA\u65E5 Form-Widget_Name=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u540D -Covered_All=\u5168\u3066\u4E0A\u66F8\u304D +Covered_All=\u3059\u3079\u3066\u4E0A\u66F8\u304D Day=\u65E5 External=\u5916\u90E8 Black_Font=\u9ED2\u4F53 -LOG-Report_Server_IS_Started=\u5E33\u7968\u30B5\u30FC\u30D0\u8D77\u52D5 -Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column=\u30D2\u30F3\u30C8\:B1\u306E\u5165\u529B\u3092\u901A\u3058\u3066\u7B2C1\u884C2\u5217\u76EE\u306E\u30C7\u30FC\u30BF\u3092\u66F8\u304D\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u308B\u3002 +LOG-Report_Server_IS_Started=\u5E33\u7968\u30B5\u30FC\u30D0\u306F\u8D77\u52D5\u6E08\u307F +Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B\u3057\u3066\u3001\u7B2C\u4E00\u884C\u3068\u7B2C\u4E8C\u884C\u306E\u30C7\u30FC\u30BF\u3092\u5165\u529B\u3067\u304D\u307E\u3059\u3002 FR-Designer_ChooseOneButton=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u9078\u629E\u3057\u3066\u8FFD\u52A0\u3057\u3066\u4E0B\u3055\u3044 Widget-Sizing=\u30B5\u30A4\u30BA\u8ABF\u6574 NO_Border_Line=\u67A0\u7DDA\u306A\u3057 @@ -952,13 +952,13 @@ FR-Designer_WidgetDisplyPosition=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u8868\u793 FR-Base_Top=\u4E0A FR-Designer_Form-CheckBox=\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 Reportlet-Parameter_Type=\u30D1\u30E9\u30E1\u30FC\u30BF\u8EE2\u9001\u65B9\u5F0F -sending=\u8EE2\u9001\u4E2D\u2026 +sending=\u9001\u4FE1\u4E2D... FR-Designer-FRFont_Foreground=\u8272 -FR-Import-Export_SVG=SVG +FR-Import-Export_SVG=SVG\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 M_Edit-Clear_Contents=\u5185\u5BB9(C) Session=\u30BB\u30C3\u30B7\u30E7\u30F3 Widget-Load_Type=\u30ED\u30FC\u30C9 -template_unsaved=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u4FDD\u5B58\u3067\u304D\u306A\u3044 +template_unsaved=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093 check_communication=\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u901A\u4FE1\u3068\u30B5\u30FC\u30D0\u72B6\u614B\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044 List-Need_Head=\u30EA\u30B9\u30C8\u30D8\u30C3\u30C0\u30FC\u5FC5\u8981 FR-Designer-Plugin_Has_Been_Installed=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u3002\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u305F\u3044\u5834\u5408\u3001\u30D7\u30E9\u30B0\u30A4\u30F3\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u5207\u308A\u66FF\u3048\u3066\u4E0B\u3055\u3044 @@ -970,7 +970,7 @@ LOG-Is_Being_Openned=\u8AAD\u307F\u8FBC\u307F\u4E2D BackgroundTexture-Oak=\u30AA\u30FC\u30AF Multi_nam_formula=\ \u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u540D\: \u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u6761\u4EF6\: TurnOn=\u30AA\u30F3 -HJS-Send_Successfully=\u9001\u4FE1\u5B8C\u4E86 +HJS-Send_Successfully=\u9001\u4FE1\u6210\u529F Mon=\u6708\u66DC\u65E5 Inner_Parameter=\u7D44\u307F\u8FBC\u307F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF Required=\u8A18\u5165\u5FC5\u8981 @@ -979,10 +979,10 @@ template_unopened=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u958B\u3051\u306A\u FR-Base_Bottom=\u4E0B DataFunction-Min=\u6700\u5C0F\u5024 StyleFormat-Percent=\u30D1\u30FC\u30BB\u30F3\u30C6\u30FC\u30B8 -FR-App-All_Custom=\u30AB\u30B9\u30BF\u30E0 +FR-App-All_Custom=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA M_Insert-Data_Column=\u30C7\u30FC\u30BF\u5217 PLEASE=\u3069\u3046\u305E -Numbers=\u6570 +Numbers=\u500B\u6570 Release_Lock=\u30A2\u30F3\u30ED\u30C3\u30AF Background-Background_is_NULL=\u80CC\u666F\u306A\u3057 FR-Designer_Sytle-FRFont=\u30D5\u30A9\u30F3\u30C8 @@ -990,21 +990,21 @@ Gradation=\u30EC\u30D9\u30EB The_current_list_is_empty=\u73FE\u5728\u306E\u30EA\u30B9\u30C8\u306F\u7A7A Formula_Dictionary_Display_Examples=\u5B9F\u969B\u5024\u7BC4\u56F2\u306F \=range(100)\u3001\u5BFE\u5FDC\u7684\u306A\u5B9F\u969B\u5024\u7BC4\u56F2\n \u306E\u4E2D\u306B\u5404$$$\u3067\u8868\u793A\u3059\u308B\u6570\u5F0F\u306F \=0 - $$$\uFF0C\n \u306A\u308C\u3070\u6700\u7D42\u306E\u5B9F\u969B\u5024\u306F1, 2, ..., 100, \n \u8868\u793A\u5024\u306F-1, -2, ... , -100\u3002 Schedule-Template_Parameter=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF -JSShow=\u52D5\u7684\u8868\u793A -Level_coordinates=\u30EC\u30D9\u30EB\u5EA7\u6A19 +JSShow=\u52D5\u614B\u8868\u793A +Level_coordinates=\u968E\u5C64\u5EA7\u6A19 MainGraduationLine=\u4E3B\u76EE\u76DB\u7DDA Hyperlink-Web_link=\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u30EA\u30F3\u30AF -StyleAlignment-between_-90_and_90=-90\uFF5E90\u306E\u7BC4\u56F2 -FormulaD-Custom_Function=\u30AB\u30B9\u30BF\u30E0\u95A2\u6570 +StyleAlignment-between_-90_and_90=-90-90\u306E\u7BC4\u56F2\u3067 +FormulaD-Custom_Function=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u95A2\u6570 FR-Designer_Integer=\u6574\u6570 -PageSetup-Finis_Start_Row=\u7E70\u308A\u8FD4\u3057\u7D42\u4E86\u884C +PageSetup-Finis_Start_Row=\u91CD\u8907\u7D42\u4E86\u884C RWA-Remove_Field=\u30D5\u30A3\u30FC\u30EB\u30C9\u524A\u9664 -Form-Desin_Width=\u8A2D\u8A08\u306E\u5E45 -No-tableData=\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F\u623B\u3063\u3066\u3044\u306A\u3044 +Form-Desin_Width=\u30C7\u30B6\u30A4\u30F3\u5E45 +No-tableData=\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F\u623B\u3055\u306A\u3044 Page_Total=\u5408\u8A08 FR-Designer-Plugin_Connect_Server_Error=\u30D7\u30E9\u30B0\u30A4\u30F3\u30B9\u30C8\u30A2\u63A5\u7D9A\u5931\u6557\u3001\u5F8C\u3067\u518D\u8A66\u884C\u3057\u3066\u4E0B\u3055\u3044 Import-Excel_Source=Excel\u30BD\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB -Utils-Left_to_Right_a=\u5DE6\u304B\u3089\u53F3 +Utils-Left_to_Right_a=\u5DE6\u304B\u3089\u53F3\u3078 ExpandD-Expand_Attribute=\u5C55\u958B\u5C5E\u6027 Report-Write_Attributes=\u5E33\u7968\u66F8\u304D\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u30A3 Utils-Current_Column=\u73FE\u5728\u306E\u5217 @@ -1013,14 +1013,14 @@ Report_Not_Exist=\u9078\u629E\u3055\u308C\u305F\u5E33\u7968\u304C\u898B\u3064\u3 HF-Insert_Content=\u5185\u5BB9 UpParent=\u4E0A\u89AA\u30BB\u30EB PageSetup-Page=\u30DA\u30FC\u30B8 -Utils-Move_Up=\u4E0A\u3078 +Utils-Move_Up=\u4E0A\u3078\u79FB\u52D5 BackgroundTexture-PurpleMesh=\u7D2B\u306E\u30E1\u30C3\u30B7\u30E5 Export-Word=Word ServerM-Widget_Manager=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u7BA1\u7406 FR-Designer-Basic_Activation_Key=\u30C7\u30B6\u30A4\u30CA\u30FC\u756A\u53F7\uFF1A FR-App-Template_Report_Not_Exist=\u9078\u629E\u3057\u305F\u5E33\u7968\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\! Protected=\u4FDD\u8B77 -Skip=\u30B8\u30E3\u30F3\u30D7 +Skip=\u30B9\u30AD\u30C3\u30D7 FR-Designer_PageSetup-Vertically=\u4E0A\u4E0B\u4E2D\u592E\u63C3\u3048 revert=\u5143\u306B\u623B\u3059 PageSetup-Predefined=\u4E8B\u524D\u5B9A\u7FA9 @@ -1030,7 +1030,7 @@ ExpandD-Data_Column=\u30C7\u30FC\u30BF\u5217 Sort-Ascending=\u6607\u9806 FR-Designer-Widget_Style=\u30B9\u30BF\u30A4\u30EB parameter_name_exist=\u6307\u5B9A\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u306F\u5229\u7528\u3055\u308C\u3066\u3044\u307E\u3059 -FR-Designer_Layer-Build=\u4E00\u822C\u30EC\u30A4\u30E4\u30FC\u5225\u69CB\u7BC9 +FR-Designer_Layer-Build=\u666E\u901A\u30EC\u30D9\u30EB\u5206\u3051\u69CB\u7BC9 Please_Rename=\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u4E0B\u3055\u3044 Form-Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u3092\u7DE8\u96C6 RWA-Smart_Add_Fields=\u30D5\u30A3\u30FC\u30EB\u30C9\u81EA\u52D5\u8FFD\u52A0 From 105af44f3db48e773f8f1fab9aa8d466f107bb2d Mon Sep 17 00:00:00 2001 From: neil Date: Thu, 1 Jun 2017 09:14:57 +0800 Subject: [PATCH 007/101] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20=E5=B1=8F=E8=94=BD=E8=AE=BA=E5=9D=9B=E6=B6=88?= =?UTF-8?q?=E6=81=AF=20Patch=E5=88=B0release.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/LoginWebBridge.java | 40 ------------------- .../design/extra/exe/PluginLoginExecutor.java | 3 -- 2 files changed, 43 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index 41ed99beb9..76f119c382 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -115,49 +115,9 @@ public class LoginWebBridge { if(StringUtils.isEmpty(userName)){ return; } - if(!StringUtils.isEmpty(this.userName)){ - updateMessageCount(); - } this.userName = userName; } - /** - * 定时取后台论坛消息 - */ - public void updateMessageCount(){ - //启动获取消息更新的线程 - //登陆状态, 根据存起来的用户名密码, 每1分钟发起一次请求, 更新消息条数. - Thread updateMessageThread = new Thread(new Runnable() { - @Override - public void run() { - sleep(CHECK_MESSAGE_TIME); - while(StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())){ - HashMap para = new HashMap<>(); - int uid = DesignerEnvManager.getEnvManager().getBbsUid(); - para.put("uid", String.valueOf(uid)); - HttpClient getMessage = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.message"), para); - getMessage.asGet(); - if(getMessage.isServerAlive()){ - try { - String res = getMessage.getResponseText(); - if (res.equals(FAILED_MESSAGE_STATUS)) { - }else { - JSONObject jo = new JSONObject(res); - if (jo.getString("status").equals(SUCCESS_MESSAGE_STATUS)) { - setMessageCount(Integer.parseInt(jo.getString("message"))); - } - } - } catch (Exception e) { - FRContext.getLogger().info(e.getMessage()); - } - } - sleep(CHECK_MESSAGE_TIME); - } - } - }); - updateMessageThread.start(); - } - /** * 设置获取的消息长度,并设置显示 * @param count diff --git a/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java b/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java index c1101f8005..c2c80aef0f 100644 --- a/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java +++ b/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java @@ -38,9 +38,6 @@ public class PluginLoginExecutor implements Executor { @Override public void run(Process process) { String loginResult = LoginWebBridge.getHelper().login(username, password, uiLabel); - if (Integer.valueOf(loginResult) == 0) { - LoginWebBridge.getHelper().updateMessageCount(); - } result = loginResult; } } From f5a863610c05f20100e8e4e661d7989b9de483dc Mon Sep 17 00:00:00 2001 From: unknown <李晓丽> Date: Thu, 1 Jun 2017 11:02:59 +0800 Subject: [PATCH 008/101] =?UTF-8?q?Signed-off-by:=20unknown=20<=E6=9D=8E?= =?UTF-8?q?=E6=99=93=E4=B8=BD>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_en_US.properties | 36 +++++++++---------- .../design/locale/designer_zh_TW.properties | 34 +++++++++--------- 2 files changed, 35 insertions(+), 35 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 08d160f415..8a2b1646e6 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 @@ -379,7 +379,7 @@ FR-Designer_Clear_All=Clear All FR-Designer_Log=Log FR-Designer-Plugin_Expire_Dialog_Title=Plug expired FR-Designer-Plugin_Expire_Dialog_Text=Plugin expired, go sail soft application center to make a purchase. -FR-Designer-Plugin_Finerest_Addon=Fineres Plugins +FR-Designer-Plugin_Finerest_Addon=Fanruan Plugins FR-Designer_Performance_First=Performance First FR-Designer_Total_N_Grade=Total\:${N}Layer FR-Designer-BBSLogin_Login-Title=BBS Login @@ -530,7 +530,7 @@ FR-Designer_Select_panel=Sel FR-Designer_LayoutTable_Column_Width=250 FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Unload_Check=Prompt users when leave without submitting -FR-Designer_ReportColumns_Columns_Optional=\u3000 +FR-Designer_ReportColumns_Columns_Optional=Multi-column/row FR-Designer_Row_Icon_File_Name=row_en.png FR-Designer_Center_Display=Center FR-Designer_Left_Display=Left @@ -617,7 +617,7 @@ BorderLayout-West=West AnalysisLine=Line Layer_Report_Warnning_info=Line report engine is suitable for large data.
Many report features will no longer support if use it,
more information in helpdocument. Tree-Width=Tree Width -alert_word=Export without fixed height, cell hight will change according to the content and pagination position will different from the preview result. +alert_word=Export without fixed height, cell height will change according to the content and pagination position will different from the preview result. PageSetup-Paper_Size=Paper Size M-Page_Setup=Page Setup DashBoard-FormBook=Form @@ -697,7 +697,7 @@ RWA-Click_Cell_To_Edit_Value=Click Cell to Edit Value Utils-Row_Height=Row Height ReportD-Excel_Export=Export Attributes Form-Please_Select_A_Kind_Of_Form_Container=Select A Form Container -Column_Does_Not_Exsit=Column Does Not Exsit +Column_Does_Not_Exsit=Column Does Not Exist M_Insert-Hyperlink=Hyperlink can_not_include_underline=Can not contain "_" FR-Designer-Plugin_Jar_Expired=Jar Expired @@ -797,7 +797,7 @@ CellWrite-Page_Before_Row=Before Row FR-Designer-Plugin_Load_Plugins_From_Server=Loading data from plugins store D-Dispaly_Divide_Result_Set_into_Groups=Grouping on Result Set Closed=Closed -RWA-Help=Set "No update if no modidy", so if cell is not modified, the record will not update; it improves filling and submit performance when data is large. +RWA-Help=Set "No update if no modify", so if cell is not modified, the record will not update; it improves filling and submit performance when data is large. FR-Designer-Widget-Style_Custom=Custom FR-Designer-Widget-Style_Render_Style=Rendering style Highlight-Barcode=BarCode @@ -948,7 +948,7 @@ zeroMarginWarn=The printer exist the physical margins
report page margin se Widget-Date_Selector_Return_Type=Return value type Utils-Switch_To_Template_Reportlet=Switch to template web report satisfy=satisfy -FR-Designer_WidgetDisplyPosition=Control DisplyPosition +FR-Designer_WidgetDisplyPosition=Control DisplayPosition FR-Base_Top=Top FR-Designer_Form-CheckBox=CheckBox Reportlet-Parameter_Type=Parameter passing mode @@ -966,7 +966,7 @@ FR-Widget_Tree_And_Table=Control tree and control table FR-Base_Help=Help FR-Designer-Plugin_Update_Successful=Update successfully, restart the sever to enable it August=August -LOG-Is_Being_Openned=Is Being Openned +LOG-Is_Being_Openned=Is Being Opened BackgroundTexture-Oak=Oak Multi_nam_formula=\ data set name\: TurnOn=TurnOn @@ -1094,7 +1094,7 @@ Horizontal-Split_Layout=Horizontal partitioning layout BorderLayout-Center=Center INFO-Reset_Webapp=Reset Application Server FR-Designer_Text=Text -IN_and_INOUT_type_not_as_cursor=IN and INOUT type canot be cursor +IN_and_INOUT_type_not_as_cursor=IN and INOUT type cannot be cursor Main_Axis=Primary axis M_Edit-Cut=Cut Utils-The_Name_has_been_existed=The name already exists @@ -1125,7 +1125,7 @@ Schedule-The_selected_file_must_be_end_with_filter=The selected file must end wi Provide=Provide FormulaD-Math_&_Trig=Math and Trig FR-Designer-StyleAlignment_Right=Right -Error_TableDataNameRepeat=\ already exsits in Server DataSet or the name is repeated. +Error_TableDataNameRepeat=\ already exists in Server DataSet or the name is repeated. Choose_None=Deselect File-tree=File tree FRFont-bold=Bold @@ -1161,7 +1161,7 @@ FR-App-Export_png=png Delete_Column=Delete Column SecondGraduationLine=Minor Graduation Line SpecifiedG-Groups=Groups -CONTINUUM_MODE=Continous grouping +CONTINUUM_MODE=Continuous grouping Datasource-Connection_failed=Connection Failed CategoryName=Category Name DBCP_INITIAL_SIZE=Initialize Connections @@ -1175,7 +1175,7 @@ Or-you=or you FR-Designer_Certificate_Path=Certificate Path Utils-Last_Page=Last Page BarCodeD-Drawing_Text=Display Barcode Text -Warning-Template_Do_Not_Exsit=Template do not exsit +Warning-Template_Do_Not_Exsit=Template do not exist BindColumn-Group=Group Export-SVG=SVG Plane3D=Plane 3D @@ -1289,7 +1289,7 @@ DS-Class_TableData=Class Data Set FR-Designer-Plugin_Illegal_Plugin_Zip_Cannot_Be_Install=Illegal plugin,cannot be installed DisplayNothingBeforeQuery=Display Nothing Before Query Y_Axis=Y Axis -FormulaD-Most_Recently_Used=Rencently used +FormulaD-Most_Recently_Used=Recently used FormulaD-Input_formula_in_the_text_area_below=Input formula in the text area below Build-Way=Build Way M_Edit-Undo=Undo @@ -1392,7 +1392,7 @@ BackgroundTexture-WaterDroplets=Water Drop FR-Designer-Dependence_Install_Failed=install failed Layout-Padding=Padding roles_already_authority_edited=Configured role -WidgetDisplyPosition=Control disply position +WidgetDisplyPosition=Control display position SpecifiedG-Force_Group=Mandatory Group FormulaD-Formula_Definition=Formula Definition I-xyScatterStyle_Marker=Scatter @@ -1525,7 +1525,7 @@ FR-Server_Version_Tip=The version of the server you are connecting is older than StyleAlignment-Left_To_Right=Left To Right Verify-ToolTips=If not meet formula, throw up validation error message BackgroundTexture-Stationery=Letter Paper -FR-Designer_RWA-Help=Set "No update if no modidy", so if cell is not modified, the record will not update; it improves filling and submit performance when data is large. +FR-Designer_RWA-Help=Set "No update if no modify", so if cell is not modified, the record will not update; it improves filling and submit performance when data is large. M_Insert-Barcode=Barcode Bounds=Bounds FR-Designer-Undo_All_Authority_Operations=Undo all the privilege edit operations @@ -1625,7 +1625,7 @@ FR-Hyperlink_Reportlet=Webreport M_Edit-Copy=Copy Sub_Report_Message2=The parent-report is not in the current runtime environment Sub_Report_Message3=Can not choose itself -Sub_Report_Message1=Please choose the currect path +Sub_Report_Message1=Please choose the correct path Form-Allow_CustomData=Allow custom data FR-Server_Version_Tip_MoreInfo=Conform the version numbers of FineReport Designer and the deployment server are consistent, in order to avoid the problems caused by inconsistent versions. If you open the template produced by higher designer vision, error may occurs or the original template properties missed. If the Designer Version you used to create the template is higher than the final deployment server version, the server may not be able to properly load the template. FR-Designer_Server-version-tip-moreInfo=Conform the version numbers of FineReport Designer and the deployment server are consistent, in order to avoid the problems caused by inconsistent versions. If you open the template produced by higher designer vision, error may occurs or the original template properties missed. If the Designer Version you used to create the template is higher than the final deployment server version, the server may not be able to properly load the template. @@ -1757,7 +1757,7 @@ Form-ToolBar=Form ToolBar FR-Base_sure_remove_item=Are you sure to delete the selected item Component_Scale=Component Scale Hyperlink-Use_CJK_to_encode_parameter=Use CJK to process parameter -LOG-Has_Been_Openned=Report Has Been Openned +LOG-Has_Been_Openned=Report Has Been Opened FR-Designer-Dependence= ECP_error_pwd=Password Error REPORTLET=Parameter of access path to template @@ -1826,7 +1826,7 @@ FR-Designer-Plugin_All_Plugins=All plugins FR-Designer_Prepare_Export=Ready to export, please wait DBCP_TEST_ON_RETURN=Test before Returning Connections no-alternatives=no alternatives -FR-Designer_Submmit_WClass=Submmit By Custom Class +FR-Designer_Submmit_WClass=Submit By Custom Class M_Insert-Slope_Line=Insert Slope Line FR-Designer-Plugin_Plugin_Description=Description ExpandD-Not_Expand=No extend @@ -1889,7 +1889,7 @@ Border-Style=Border Style Sort=Sort Image-Image_Layout=Image Layout Panel=Panel -FR-Designer-Basic_Copy_Build_NO_OK=Build No. has been copyed +FR-Designer-Basic_Copy_Build_NO_OK=Build No. has been copied All_Border_Line=All Border FR-Utils-Please_Input_a_New_Name=Input a New Name FR-Base_Formula_Plugin=Plugin Function 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 f5fa67f1c2..878c493f4b 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 @@ -106,7 +106,7 @@ FR-Designer_Font-Size=\u5B57\u9AD4\u5927\u5C0F FR-Designer_Forbid_Drag_into_Adapt_Pane=\u8A72\u5C0D\u8C61\u4E0D\u5141\u8A31\u62D6\u5165\u8868\u55AE\u4E3B\u9AD4 FR-Designer_Forbid_Drag_into_Para_Pane=\u8A72\u5C0D\u8C61\u4E0D\u80FD\u62D6\u5165\u53C3\u6578\u9762\u677F FR-Designer_Foreground=\u5B57\u5F62\u8272\u5F69 -FR-Designer_Form-AuthorityEdited_Cannot_be_Supported=\u66AB\u4E0D\u652F\u6301\u8868\u55AE\u6B0A\u9650\u7DE8\u8F2F +FR-Designer_Form-AuthorityEdited_Cannot_be_Supported=\u66AB\u4E0D\u652F\u63F4\u8868\u55AE\u6B0A\u9650\u7DE8\u8F2F FR-Designer_Form-Report=\u5831\u8868\u683C\u5F0F FR-Designer_Form_EmbeddedTD=\u5167\u5D01\u683C\u5F0F FR-Designer_Form_Module=\u6A21\u7D44\u683C\u5F0F @@ -136,7 +136,7 @@ FR-Designer_M-Repeat-Freeze=\u91CD\u8907\u8207\u51CD\u7D50 FR-Designer_M-Server=\u4F3A\u670D\u5668 FR-Designer_M-SwitchWorkspace=\u5207\u63DB\u5DE5\u4F5C\u5340\u9593 FR-Designer_M-Template=\u7BC4\u672C -FR-Designer_MDX_Explain=\u8A9E\u6CD5\u683C\u5F0F\u53C3\u8003MDX\u8A9E\u6CD5\u3002\n\u4F8B\u5982\uFF1A\nWITH\nMEMBER [Measures].[Special Discount] AS\n[Measures].[Discount Amount] * 1.5\nSELECT\n[Measures].[Special Discount] on COLUMNS,\nNON EMPTY [Product].[Product].MEMBERS ON Rows\nFROM [Adventure Works]\nWHERE [Product].[Category].[Bikes]\n\u8A3B\uFF1ACOLUMNS\u3001ROWS\u53EF\u4EE5\u4F7F\u75280\u30011\u4EE3\u66FF\u67E5\u8EF8\u53EA\u652F\u6301\u8FD4\u56DE\u5169\u500B\u8EF8\u3002 +FR-Designer_MDX_Explain=\u8A9E\u6CD5\u683C\u5F0F\u53C3\u8003MDX\u8A9E\u6CD5\u3002\n\u4F8B\u5982\uFF1A\nWITH\nMEMBER [Measures].[Special Discount] AS\n[Measures].[Discount Amount] * 1.5\nSELECT\n[Measures].[Special Discount] on COLUMNS,\nNON EMPTY [Product].[Product].MEMBERS ON Rows\nFROM [Adventure Works]\nWHERE [Product].[Category].[Bikes]\n\u8A3B\uFF1ACOLUMNS\u3001ROWS\u53EF\u4EE5\u4F7F\u75280\u30011\u4EE3\u66FF\u67E5\u8EF8\u53EA\u652F\u63F4\u8FD4\u56DE\u5169\u500B\u8EF8\u3002 FR-Designer_M_Help-About_Software=\u95DC\u65BC\u8EDF\u9AD4 FR-Designer_M_Help-Tutorial=\u64CD\u4F5C\u8AAA\u660E FR-Designer_Max_Value=\u6700\u5927\u503C @@ -197,7 +197,7 @@ FR-Designer_WaterMark=\u6C34\u5370 FR-Designer_Widget=\u63A7\u5236\u9805 FR-Designer_Widget-Settings=\u8A2D\u5B9A FR-Designer_Widget-Visible=\u53EF\u898B -FR-Designer_XMLA_Explain=\u5728\u4F7F\u7528\u591A\u7DAD\u8CC7\u6599\u96C6\u53D6\u6578\u524D\uFF0C\u60A8\u9996\u5148\u9700\u8981\u4E00\u500B\u53EF\u6210\u529F\u9023\u63A5\u7684\u591A\u7DAD\u8CC7\u6599\u5EAB\u9023\u63A5\u3002\n\u8A2D\u5B9A\u5B8C\u8CC7\u6599\u9023\u63A5\u5F8C\uFF0C\u67E5\u8A62\u8CC7\u6599\u6642,\u6709\u5169\u7A2E\u4E0D\u540C\u7684\u53D6\u6578\u624B\u6BB5\u3002\n1.\u7C21\u55AE\u901A\u7528\u67E5\u8A62\uFF1A\n\u7C21\u55AE\u901A\u7528\u67E5\u8A62\u9069\u7528\u65BCFineBI\u53CA\u5176\u4ED6\u591A\u7DAD\u8CC7\u6599\u5EAB\u3002\n\u4F7F\u7528\u7C21\u55AE\u901A\u7528\u67E5\u8A62\uFF0CFR\u5C07\u81EA\u52D5\u8B80\u53D6\u9078\u64C7cube\u7684\u5C64\u6B21\u7D50\u69CB\uFF0C\u60A8\u53EF\u4EE5\u76F4\u63A5\u9078\u64C7\u6240\u9700\u7684\u5EA6\u91CF\u503C\u53CA\u7DAD\u5EA6\uFF0C\u4E26\u6DFB\u52A0\u7BE9\u9078\u689D\u4EF6\uFF0CFR\u6703\u6839\u64DA\u60A8\u7684\u9078\u64C7\u81EA\u52D5\u67E5\u8A62\u8CC7\u6599\u3002\n\u7C21\u55AE\u901A\u7528\u67E5\u8A62\u50C5\u652F\u6301\u7DAD\u5EA6\u53CA\u5EA6\u91CF\u503C\u5169\u500B\u8EF8\u7684\u67E5\u8A62\u3002\n\u5728\u5EA6\u91CF\u503C\u53CA\u7DAD\u5EA6\u8A2D\u5B9A\u4E2D\uFF0C\u76EE\u524D\u60A8\u53EA\u80FD\u9078\u64C7\u6240\u9700\u7DAD\u5EA6\uFF0C\u7121\u6CD5\u624B\u52D5\u4FEE\u6539\u3002\n\u904E\u6FFE\u689D\u4EF6\u63A1\u7528OPEN SQL\u8A9E\u6CD5\uFF0C\u60A8\u53EF\u4EE5\u9375\u5165${abc}\u4F5C\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u7528\u6CD5\u540C\u8CC7\u6599\u5EAB\u8CC7\u6599\u96C6\u3002\n2.\u81EA\u5B9A\u7FA9MDX\u67E5\u8A62\uFF1A\n\u4F7F\u7528\u81EA\u5B9A\u7FA9MDX\u67E5\u8A62\uFF0C\u60A8\u53EF\u4EE5\u81EA\u5B9A\u7FA9\u7FA9MDX\u8A9E\u53E5\u67E5\u8A62\u6240\u9700\u7D50\u679C\u3002\n\u6CE8\u610F\uFF0C\u81EA\u5B9A\u7FA9MDX\u67E5\u8A62\u4E5F\u53EA\u652F\u6301\u5169\u500B\u8EF8\u7684\u67E5\u8A62\u3002\n\u60A8\u53EF\u9375\u5165${abc}\u4F5C\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u7528\u6CD5\u540C\u8CC7\u6599\u5EAB\u8CC7\u6599\u96C6\u3002\nFineBI\u7684cube\u4E0D\u652F\u6301MDX\u67E5\u8A62\u3002 +FR-Designer_XMLA_Explain=\u5728\u4F7F\u7528\u591A\u7DAD\u8CC7\u6599\u96C6\u53D6\u6578\u524D\uFF0C\u60A8\u9996\u5148\u9700\u8981\u4E00\u500B\u53EF\u6210\u529F\u9023\u63A5\u7684\u591A\u7DAD\u8CC7\u6599\u5EAB\u9023\u63A5\u3002\n\u8A2D\u5B9A\u5B8C\u8CC7\u6599\u9023\u63A5\u5F8C\uFF0C\u67E5\u8A62\u8CC7\u6599\u6642,\u6709\u5169\u7A2E\u4E0D\u540C\u7684\u53D6\u6578\u624B\u6BB5\u3002\n1.\u7C21\u55AE\u901A\u7528\u67E5\u8A62\uFF1A\n\u7C21\u55AE\u901A\u7528\u67E5\u8A62\u9069\u7528\u65BCFineBI\u53CA\u5176\u4ED6\u591A\u7DAD\u8CC7\u6599\u5EAB\u3002\n\u4F7F\u7528\u7C21\u55AE\u901A\u7528\u67E5\u8A62\uFF0CFR\u5C07\u81EA\u52D5\u8B80\u53D6\u9078\u64C7cube\u7684\u5C64\u6B21\u7D50\u69CB\uFF0C\u60A8\u53EF\u4EE5\u76F4\u63A5\u9078\u64C7\u6240\u9700\u7684\u5EA6\u91CF\u503C\u53CA\u7DAD\u5EA6\uFF0C\u4E26\u6DFB\u52A0\u7BE9\u9078\u689D\u4EF6\uFF0CFR\u6703\u6839\u64DA\u60A8\u7684\u9078\u64C7\u81EA\u52D5\u67E5\u8A62\u8CC7\u6599\u3002\n\u7C21\u55AE\u901A\u7528\u67E5\u8A62\u50C5\u652F\u63F4\u7DAD\u5EA6\u53CA\u5EA6\u91CF\u503C\u5169\u500B\u8EF8\u7684\u67E5\u8A62\u3002\n\u5728\u5EA6\u91CF\u503C\u53CA\u7DAD\u5EA6\u8A2D\u5B9A\u4E2D\uFF0C\u76EE\u524D\u60A8\u53EA\u80FD\u9078\u64C7\u6240\u9700\u7DAD\u5EA6\uFF0C\u7121\u6CD5\u624B\u52D5\u4FEE\u6539\u3002\n\u904E\u6FFE\u689D\u4EF6\u63A1\u7528OPEN SQL\u8A9E\u6CD5\uFF0C\u60A8\u53EF\u4EE5\u9375\u5165${abc}\u4F5C\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u7528\u6CD5\u540C\u8CC7\u6599\u5EAB\u8CC7\u6599\u96C6\u3002\n2.\u81EA\u5B9A\u7FA9MDX\u67E5\u8A62\uFF1A\n\u4F7F\u7528\u81EA\u5B9A\u7FA9MDX\u67E5\u8A62\uFF0C\u60A8\u53EF\u4EE5\u81EA\u5B9A\u7FA9\u7FA9MDX\u8A9E\u53E5\u67E5\u8A62\u6240\u9700\u7D50\u679C\u3002\n\u6CE8\u610F\uFF0C\u81EA\u5B9A\u7FA9MDX\u67E5\u8A62\u4E5F\u53EA\u652F\u63F4\u5169\u500B\u8EF8\u7684\u67E5\u8A62\u3002\n\u60A8\u53EF\u9375\u5165${abc}\u4F5C\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u7528\u6CD5\u540C\u8CC7\u6599\u5EAB\u8CC7\u6599\u96C6\u3002\nFineBI\u7684cube\u4E0D\u652F\u63F4MDX\u67E5\u8A62\u3002 FR-Designer_bold=\u7C97\u9AD4 FR-Designer_font=\u5B57\u9AD4 FR-Designer_italic=\u659C\u9AD4 @@ -348,7 +348,7 @@ FR-Designer_Add_JS_warning=\u8ACB\u8F38\u51FA\u6B63\u78BA\u7684url\u5730\u5740\u FR-Designer-Encoding_Type=\u7DE8\u78BC\u985E\u578B FR-Designer-FirstRow_IS_ColumnName=\u7B2C\u4E00\u5217\u5305\u542B\u6B04\u6A19\u984C FR-Designer_Dismenber=\u5206\u9694\u7B26 -FR-Designer_TableDismember=\u88FD\u9336\u7B26 +FR-Designer_TableDismember=\u88FD\u8868\u7B26 FR-Designer_Space=\u7A7A\u683C FR-Designer_CommaDismenber=\u9017\u865F FR-Designer_Other=\u5176\u4ED6 @@ -392,7 +392,7 @@ FR-Designer_Product_improve=\u7522\u54C1\u6539\u826F FR-Designer_Join_Product_improve=\u52A0\u5165\u7522\u54C1\u6539\u826F\u8A08\u5283 FR-Designer_Preference-Function=\u529F\u80FD\u8A2D\u5B9A FR-Designer_max_undo_limit=\u6700\u5927\u5FA9\u539F\u6B21\u6578 -FR-Designer_Surport_String_To_Formula=\u652F\u6301\u5B57\u5143\u4E32\u7DE8\u8F2F\u70BA\u516C\u5F0F +FR-Designer_Surport_String_To_Formula=\u652F\u63F4\u5B57\u5143\u4E32\u7DE8\u8F2F\u70BA\u516C\u5F0F FR-Designer_Always=\u59CB\u7D42 FR-Designer_Export_Setting=\u532F\u51FA\u914D\u7F6E FR-Designer_Select_Export_Log_Directory=\u9078\u64C7\u532F\u51FA\u76EE\u9304 @@ -559,7 +559,7 @@ FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002 -FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548\u3002 +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u63F4\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548\u3002 FR-Designer_Background_Null=\u6C92\u6709\u80CC\u666F FR-Designer_Background_Color=\u984F\u8272 FR-Designer_Background_Texture=\u7D0B\u7406 @@ -615,7 +615,7 @@ Utils-Current_Sheet=\u7576\u524D\u7684Sheet ConditionB-is_less_than=\u5C0F\u65BC BorderLayout-West=\u897F AnalysisLine=\u5206\u6790\u7DDA\u578B -Layer_Report_Warnning_info=\u5217\u5F0F\u5F15\u64CE\u9069\u7528\u65BC\u5927\u8CC7\u6599\u91CF\u60C5\u5F62\u4E0B\u3002
\u4F7F\u7528\u6B64\u5F15\u64CE\u5F88\u591A\u5831\u8868\u7279\u6027\u5C07\u4E0D\u518D\u652F\u6301\uFF0C
\u8A73\u7D30\u5167\u5BB9\u8ACB\u898B\u76F8\u95DC\u6587\u6A94\u3002 +Layer_Report_Warnning_info=\u5217\u5F0F\u5F15\u64CE\u9069\u7528\u65BC\u5927\u8CC7\u6599\u91CF\u60C5\u5F62\u4E0B\u3002
\u4F7F\u7528\u6B64\u5F15\u64CE\u5F88\u591A\u5831\u8868\u7279\u6027\u5C07\u4E0D\u518D\u652F\u63F4\uFF0C
\u8A73\u7D30\u5167\u5BB9\u8ACB\u898B\u76F8\u95DC\u6587\u6A94\u3002 Tree-Width=\u5BEC\u5EA6 alert_word=\u9078\u64C7\u4E0D\u56FA\u5B9A\u5217\u9AD8\u532F\u51FA\u6642, \u7DE8\u8F2F\u532F\u51FA\u7684word, \u5132\u5B58\u683C\u5217\u9AD8\u6703\u96A8\u8457\u5167\u5BB9\u81EA\u52D5\u62C9\u4F38, \u6B64\u60C5\u6CC1\u4E0B\u532F\u51FA\u7D50\u679C\u8207\u9810\u89BD\u7D50\u679C\u53EF\u80FD\u6703\u4E0D\u518D\u4E00\u81F4. PageSetup-Paper_Size=\u7D19\u5F35\u5927\u5C0F @@ -662,7 +662,7 @@ Email-Can_Preview_Report_Content=\u6B63\u6587\u9810\u89BD\u5831\u8868\u5167\u5BB FR-Designer-FRFont_Italic=\u659C\u9AD4 CellWrite-Print_Background=\u5217\u5370/\u532F\u51FA\u5132\u5B58\u683C\u80CC\u666F Wizard=\u56AE\u5C0E -Preference-Is_Drag_Permited=\u652F\u6301\u62D6\u62FD +Preference-Is_Drag_Permited=\u652F\u63F4\u62D6\u62FD FR-Designer_Release_Lock=\u89E3\u9396 Form-Delimiter=\u5206\u9694\u7B26 wrong=\u51FA\u932F\u4E86 @@ -689,7 +689,7 @@ BackgroundTexture-Canvas=\u756B\u5E03 BarOutSide=\u67F1\u5B50\u5916\u5074 Preview_ToolTips=\u9810\u89BD\u63D0\u793A FRFont-Family=\u540D\u5B57 -FR-Lic_does_not_Support_Remote=\u60A8\u7576\u524D\u4F7F\u7528\u7684lic\u4E0D\u652F\u6301\u9060\u7A0B\u8A2D\u8A08\u529F\u80FD\uFF0C\u8ACB\u5347\u7D1A\u60A8\u7684lic +FR-Lic_does_not_Support_Remote=\u60A8\u7576\u524D\u4F7F\u7528\u7684lic\u4E0D\u652F\u63F4\u9060\u7A0B\u8A2D\u8A08\u529F\u80FD\uFF0C\u8ACB\u5347\u7D1A\u60A8\u7684lic InterfaceStyle=\u98A8\u683C RWA-Key=\u4E3B\u9375 WF-Name=\u540D\u7A31 @@ -864,7 +864,7 @@ M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) Indent-Pixel=\u50CF\u7D20 FR-Designer-Widget-Style_Border_Line=\u6846\u7DDA\u7C97\u7D30 Widget-Default_Widget_Config=\u57FA\u672C\u63A7\u5236\u9805 -Version-does-not-support=\u60A8\u7576\u524D\u4F7F\u7528\u7684lic\u4E0D\u652F\u6301\u9060\u7A0B\u8A2D\u8A08\u529F\u80FD\uFF0C\u8ACB\u5347\u7D1A\u60A8\u7684lic +Version-does-not-support=\u60A8\u7576\u524D\u4F7F\u7528\u7684lic\u4E0D\u652F\u63F4\u9060\u7A0B\u8A2D\u8A08\u529F\u80FD\uFF0C\u8ACB\u5347\u7D1A\u60A8\u7684lic StyleAlignment-Right_To_Left=\u5F9E\u53F3\u5411\u5DE6 Style-Spacing_Before=\u6BB5\u524D Has_Existed=\u5DF2\u7D93\u5B58\u5728 @@ -888,7 +888,7 @@ Present-Formula_Present=\u516C\u5F0F\u6A21\u5F0F FRFont-Superscript=\u4E0A\u6A19 CellWrite-Page_Before_Column=\u6B04\u524D\u5206\u9801 Golden=\u91D1\u8272 -Preference-Support_Cell_Editor_Definition=\u652F\u6301\u5132\u5B58\u683C\u7DE8\u8F2F\u5668 +Preference-Support_Cell_Editor_Definition=\u652F\u63F4\u5132\u5B58\u683C\u7DE8\u8F2F\u5668 M-Page_Preview=\u5206\u9801\u9810\u89BD HJS-CC_to=\u6284\u9001 Tree-Select_Leaf_Only=\u53EA\u8FD4\u56DE\u8449\u5B50\u7BC0\u9EDE @@ -1038,7 +1038,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\:1117 \u58D3\u7E2E\u90E8\u7F72\u4E0D\u652F\u63F4\u9060\u7A0B\u8A2D\u8A08 Sche-Minute=\u5206 Three_Rows_Of_Three_Grid=\u4E09\u5217\u4E09\u6B04\u7684\u683C\u5B50 WorkSheet=\u81EA\u7531\u5831\u8868 @@ -1138,7 +1138,7 @@ Dictionary-Dynamic_SQL=\u52D5\u614BSQL FR-Designer_Form-CheckBoxGroup=\u5FA9\u9078\u6846\u7D44 DBCP_TIME_BETWEEN_EVICTIONRUNSMILLIS=\u7A7A\u9591\u9023\u63A5\u56DE\u6536\u5668\u4F11\u7720\u6642\u9593 ReportD-Export_Hided_Column=\u532F\u51FA\u96B1\u85CF\u6B04 -Preference-Support_Undo=\u652F\u6301\u5FA9\u539F +Preference-Support_Undo=\u652F\u63F4\u5FA9\u539F FR-mobile_report_analysis=\u5831\u8868\u89E3\u6790 Month=\u6708 Utils-Column_Width=\u6B04\u5BEC @@ -1257,7 +1257,7 @@ Deep=\u6DF1\u5EA6 FRFont-Shadow=\u9670\u5F71 Reportlet=\u7DB2\u8DEF\u5831\u8868 Calendar=\u65E5\u66C6 -DateFormat-Custom_Warning=\u8A3B\uFF1A\u81EA\u5B9A\u7FA9\u65E5\u671F\u683C\u5F0F\u4E0D\u652F\u6301\u683C\u5F0F\u6821\u9A57 +DateFormat-Custom_Warning=\u8A3B\uFF1A\u81EA\u5B9A\u7FA9\u65E5\u671F\u683C\u5F0F\u4E0D\u652F\u63F4\u683C\u5F0F\u6821\u9A57 Unit_MM=\u516C\u5398 Server-Start=\u555F\u52D5 CellPage-Can_Break_On_Paginate=\u5206\u9801\u6642\u53EF\u4EE5\u65B7\u958B @@ -1369,7 +1369,7 @@ paper=\u7D19\u5F35 Not_Exsit=\u4E0D\u5B58\u5728\u65BC\u5831\u8868 Utils-Insert_Row=\u63D2\u5165\u5217 Utils-Delete_Row=\u522A\u9664\u5217 -not_support_authority_edit=\u8A72\u5143\u7D20\u4E0D\u652F\u6301\u8A31\u53EF\u6B0A\u63A7\u5236 +not_support_authority_edit=\u8A72\u5143\u7D20\u4E0D\u652F\u63F4\u8A31\u53EF\u6B0A\u63A7\u5236 Formula_Tips=\u516C\u5F0F\u5FC5\u9808\u4EE5"\="\u865F\u958B\u982D FR-Action_Copy=\u8907\u88FD Compile_Success=\u7DE8\u8B6F\u6210\u529F @@ -1509,7 +1509,7 @@ ReportColumns-Repeat_Row=\u8907\u88FD\u5217\u5E8F\u6B04 Print_Setting=\u5217\u5370\u8A2D\u5B9A Registration-User_Name=\u5E33\u865F Datasource-User_Defined=\u81EA\u5B9A\u7FA9 -FR-Designer-Plugin_DownLoadMessage=\u63D2\u4EF6\u9700\u8981\u4F9D\u8CF4\u7684\u652F\u6301\uFF0C\u662F\u5426\u5B89\u88DD({R1} m)? +FR-Designer-Plugin_DownLoadMessage=\u63D2\u4EF6\u9700\u8981\u4F9D\u8CF4\u7684\u652F\u63F4\uFF0C\u662F\u5426\u5B89\u88DD({R1} m)? Delay=\u5EF6\u9072 FR-Designer-All_MSBold=\u5FAE\u8EDF\u96C5\u9ED1 Utils-Now_create_connection=\u6B63\u5728\u5EFA\u7ACB\u8CC7\u6599\u9023\u63A5 @@ -1812,7 +1812,7 @@ FR-Action_Remove=\u522A\u9664 FRFont-Style=\u5B57\u5F62 Select_DataColumn=\u9078\u64C7\u8CC7\u6599\u6B04 StartValue=\u958B\u59CB\u503C -SINGLE_FILE_UPLOAD=\u53EA\u652F\u6301\u55AE\u6A94\u6848\u4E0A\u50B3 +SINGLE_FILE_UPLOAD=\u53EA\u652F\u63F4\u55AE\u6A94\u6848\u4E0A\u50B3 BackgroundTexture-Cork=\u8EDF\u6728\u585E M_Format-Data_Map=\u8CC7\u6599\u5B57\u5178 FR-mobile_native_analysis=\u539F\u751F\u89E3\u6790 From 3c0d59b5e406b716f04975bace0cf8860796c81e Mon Sep 17 00:00:00 2001 From: neil Date: Thu, 1 Jun 2017 15:11:01 +0800 Subject: [PATCH 009/101] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20=E5=90=88=E4=BB=A3=E7=A0=81=E6=BC=8F=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E4=B8=AA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/bbs/UserInfoLabel.java | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index f6e3d3e7ca..03e78b1985 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -31,7 +31,6 @@ import java.net.URI; import java.net.URLEncoder; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.HashMap; /** * @author neil @@ -196,44 +195,11 @@ public class UserInfoLabel extends UILabel { return; } - if (StringUtils.isEmpty(this.userName)) { - updateMessageCount(); - } //往designerenvmanger里写一下 DesignerEnvManager.getEnvManager().setBBSName(userName); this.userName = userName; } - private void updateMessageCount() { - //启动获取消息更新的线程 - //登陆状态, 根据存起来的用户名密码, 每1分钟发起一次请求, 更新消息条数. - Thread updateMessageThread = new Thread(new Runnable() { - - @Override - public void run() { - sleep(CHECK_MESSAGE_TIME); - //从env中获取username, 因为如果注销的话, env的里username会被清空. - while (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())) { - HashMap para = new HashMap(); - para.put("username", encode(encode(userName))); - HttpClient getMessage = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.message"), para); - getMessage.asGet(); - if (getMessage.isServerAlive()) { - try { - String res = getMessage.getResponseText(); - if (StringUtils.isNotEmpty(res)) { - setMessageCount(Integer.parseInt(res)); - } - } catch (Exception e) { - } - } - sleep(CHECK_MESSAGE_TIME); - } - } - }); - updateMessageThread.start(); - } - private String encode(String str) { try { return URLEncoder.encode(str, EncodeConstants.ENCODING_UTF_8); From c348d42efc5daf54e6a9b5ecb5d8e17ca2514abb Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 15 Jun 2017 15:51:01 +0800 Subject: [PATCH 010/101] build failed --- .../com/fr/design/extra/LoginWebBridge.java | 143 ++++++++++++------ 1 file changed, 93 insertions(+), 50 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index 76f119c382..de0be5c91d 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -6,20 +6,17 @@ import com.fr.design.dialog.UIDialog; import com.fr.design.extra.ucenter.Client; import com.fr.design.extra.ucenter.XMLHelper; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.mainframe.DesignerContext; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; -import com.fr.json.JSONObject; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; import javafx.scene.web.WebEngine; -import java.io.UnsupportedEncodingException; -import java.net.URI; import javax.swing.*; import java.awt.*; +import java.io.UnsupportedEncodingException; +import java.net.URI; import java.net.URLEncoder; -import java.util.HashMap; import java.util.LinkedList; public class LoginWebBridge { @@ -47,50 +44,48 @@ public class LoginWebBridge { //用户名,密码为空 private static final String LOGIN_INFO_EMPTY = "-5"; private static final int TIME_OUT = 10000; + private static final String LOGIN_SUCCESS = "ok"; + private static final String LOGIN_FAILED = "failed"; - private static com.fr.design.extra.LoginWebBridge helper; + private static LoginWebBridge helper; + private UILabel pluginuiLabel; private UIDialog uiDialog; + private UIDialog qqDialog; private UILabel uiLabel; private String userName; - public int getMessageCount() { - return messageCount; - } - - /** - * 测试论坛网络连接 - * @return - */ - private boolean testConnection() { - HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.test")); - return client.isServerAlive(); + public LoginWebBridge() { + String username = DesignerEnvManager.getEnvManager().getBBSName(); + setUserName(username, uiLabel); } - public static com.fr.design.extra.LoginWebBridge getHelper() { + public static LoginWebBridge getHelper() { if (helper != null) { return helper; } - synchronized (com.fr.design.extra.LoginWebBridge.class) { + synchronized (LoginWebBridge.class) { if (helper == null) { - helper = new com.fr.design.extra.LoginWebBridge(); + helper = new LoginWebBridge(); } return helper; } } - public static com.fr.design.extra.LoginWebBridge getHelper(WebEngine webEngine) { - getHelper(); - helper.setEngine(webEngine); - return helper; + public int getMessageCount() { + return messageCount; } - private WebEngine webEngine; + public void setUILabelInPlugin(UILabel uiLabel) { + this.pluginuiLabel = uiLabel; + } - public void setEngine(WebEngine webEngine) { - this.webEngine = webEngine; + public void setQqDialog(UIDialog qqDialog) { + closeQQWindow(); + this.qqDialog = qqDialog; } public void setDialogHandle(UIDialog uiDialog) { + closeWindow(); this.uiDialog = uiDialog; } @@ -98,28 +93,35 @@ public class LoginWebBridge { this.uiLabel = uiLabel; } - public LoginWebBridge() { - String username = DesignerEnvManager.getEnvManager().getBBSName(); - setUserName(username, uiLabel); - } - /** * 设置显示的用户名 + * * @param userName 登录用户名 - * @param label label显示 + * @param label label显示 */ public void setUserName(String userName, UILabel label) { if (uiLabel == null) { this.uiLabel = label; } - if(StringUtils.isEmpty(userName)){ + if (StringUtils.isEmpty(userName)) { return; } this.userName = userName; } + /** + * 测试论坛网络连接 + * + * @return + */ + private boolean testConnection() { + HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.test")); + return client.isServerAlive(); + } + /** * 设置获取的消息长度,并设置显示 + * * @param count */ public void setMessageCount(int count) { @@ -137,7 +139,7 @@ public class LoginWebBridge { uiLabel.setText(sb.toString()); } - private String encode(String str){ + private String encode(String str) { try { return URLEncoder.encode(str, EncodeConstants.ENCODING_UTF_8); } catch (UnsupportedEncodingException e) { @@ -145,7 +147,7 @@ public class LoginWebBridge { } } - private void sleep(long millis){ + private void sleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { @@ -159,7 +161,7 @@ public class LoginWebBridge { public void registerHref() { try { Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.register"))); - }catch (Exception e) { + } catch (Exception e) { FRContext.getLogger().info(e.getMessage()); } } @@ -170,13 +172,14 @@ public class LoginWebBridge { public void forgetHref() { try { Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.reset"))); - }catch (Exception e) { + } catch (Exception e) { FRContext.getLogger().info(e.getMessage()); } } /** * 设计器端的用户登录 + * * @param username 用户名 * @param password 密码 * @return 登录信息标志 @@ -187,9 +190,10 @@ public class LoginWebBridge { /** * 插件管理的用户登录部分 + * * @param username 用户名 * @param password 密码 - * @param uiLabel 设计器端的label + * @param uiLabel 设计器端的label * @return 登录信息标志 */ public String pluginManageLogin(String username, String password, UILabel uiLabel) { @@ -198,9 +202,10 @@ public class LoginWebBridge { /** * 登录操作 + * * @param username 用户名 * @param password 密码 - * @param uiLabel 两边的label显示 + * @param uiLabel 两边的label显示 * @return 登录信息标志 */ public String login(String username, String password, UILabel uiLabel) { @@ -231,8 +236,8 @@ public class LoginWebBridge { /** * 更新后台的用户信息 + * * @param username 用户名 - * @param password 密码 */ public void updateUserInfo(String username) { this.userName = username; @@ -240,6 +245,7 @@ public class LoginWebBridge { /** * 关闭窗口并且重新赋值 + * * @param username */ public void loginSuccess(String username, UILabel uiLabel) { @@ -254,13 +260,7 @@ public class LoginWebBridge { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - //弹出qq登录的窗口 - QQLoginPane managerPane = new QQLoginPane(); - UIDialog qqlog = new QQLoginDialog(DesignerContext.getDesignerFrame(),managerPane); - QQLoginWebBridge.getHelper().setDialogHandle(uiDialog); - QQLoginWebBridge.getHelper().setQQDialogHandle(qqlog); - QQLoginWebBridge.getHelper().setUILabel(uiLabel); - qqlog.setVisible(true); + WebViewDlgHelper.createQQLoginDialog(); } }); } @@ -286,12 +286,55 @@ public class LoginWebBridge { } else { return UNKNOWN_ERROR;//未知错误,-3 } - }else { + } else { return NET_FAILED; } - }catch (Exception e) { + } catch (Exception e) { FRContext.getLogger().info(e.getMessage()); } return UNKNOWN_ERROR; } + + /** + * 关闭QQ授权窗口 + */ + public void closeQQWindow() { + if (qqDialog != null) { + qqDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + qqDialog.setVisible(false); + } + } + + /** + * 获取用户信息 + * + * @param userInfo + */ + public void getLoginInfo(String userInfo) { + org.json.JSONObject jo = new org.json.JSONObject(userInfo); + String status = jo.get("status").toString(); + if (status.equals(LOGIN_SUCCESS)) { + String username = jo.get("username").toString(); + int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString()); + closeWindow(); + closeQQWindow(); + pluginuiLabel.setText(username); + DesignerEnvManager.getEnvManager().setBBSName(username); + DesignerEnvManager.getEnvManager().setBbsUid(uid); + DesignerEnvManager.getEnvManager().setInShowBBsName(username); + } else if (status.equals(LOGIN_FAILED)) { + //账号没有QQ授权 + closeQQWindow(); + try { + Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding"))); + } catch (Exception exp) { + } + } + } + + public void openUrlAtLocalWebBrowser(WebEngine eng, String url) { + if (url.indexOf("qqLogin.html") > 0) { + return; + } + } } \ No newline at end of file From 002e0c731c4a2a3f921aec3171cdba13c1a207ad Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 23 Jun 2017 15:51:52 +0800 Subject: [PATCH 011/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/report/MeterPlotReportDataContentPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java index b447c7d098..100c19f7de 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java @@ -24,7 +24,7 @@ import java.awt.*; public class MeterPlotReportDataContentPane extends AbstractReportDataContentPane { private static final String CATENAME = Inter.getLocText(new String[]{"ChartF-Meter", "StyleFormat-Category", "WF-Name"}); - private static final String NVALUE = Inter.getLocText("Needle Value"); + private static final String NVALUE = Inter.getLocText("Chart-Pointer_Value"); private TinyFormulaPane singCatePane; private TinyFormulaPane singValuePane; From 4f91e67e80d004bedfcc60764f1304708aaa7f76 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 23 Jun 2017 16:10:01 +0800 Subject: [PATCH 012/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9pmd=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=88=E5=9B=BD=E9=99=85=E5=8C=96=E5=91=BD=E5=90=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 2 ++ .../src/com/fr/design/locale/designer_en_US.properties | 2 ++ .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../chart/gui/data/report/MeterPlotReportDataContentPane.java | 2 +- 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 12b87ad5a7..3129cfba01 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2001,3 +2001,5 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according parent's FR-Designer_Build_Tree_Accord_Marked_Filed_Length=Build Tree according marked filed's length FR-Product_Demo=Demo FR-Designer_Tree_Data_Field=Tree Data Field +FR-Designer_Data_Filter=Data Filter + 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 ac7375c1a2..183874d008 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 @@ -2002,3 +2002,5 @@ FR-Designer_Tree_Data_Field=Tree Data Field FR-Designer_Parent_Marked_Field=Parent Tag Field FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according to the parent tag field of the selected data set FR-Product_Demo=Demo +FR-Designer_Data_Filter=Data Filter + 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 25c7e8e321..341ac70a0e 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 @@ -2001,3 +2001,4 @@ FR-Designer_Tree_Data_Field=\u30C4\u30EA\u30FC\u30C7\u30FC\u30BF\u30D5\u30A3\u30 FR-Designer_Parent_Marked_Field=\u89AA\u30DE\u30FC\u30AF\u30D5\u30A3\u30FC\u30EB\u30C9 FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u89AA\u30DE\u30FC\u30AF\u30D5\u30A3\u30FC\u30EB\u30C9\u3088\u308A\u30C4\u30EA\u30FC\u3092\u69CB\u7BC9\u3059\u308B FR-Product_Demo=\u88FD\u54C1\u30C7\u30E2 +FR-Designer_Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF 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 4e210d8721..9e596a5d22 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 @@ -2001,3 +2001,4 @@ FR-Designer_Tree_Data_Field=\uD2B8\uB9AC\uB370\uC774\uD130\uD544\uB4DC FR-Designer_Parent_Marked_Field=\uBD80\uBAA8\uD0DC\uADF8\uD544\uB4DC FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\uC120\uD0DD\uD55C\uB370\uC774\uD130\uC138\uD2B8\uC758\uBD80\uBAA8\uD0DC\uADF8\uD544\uB4DC\uC5D0\uB530\uB77C\uD2B8\uB9AC\uC0DD\uC131 FR-Product_Demo=\uC81C\uD488\uC2DC\uC5F0 +FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4 \ No newline at end of file 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 cc090d98e5..f82431235e 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 @@ -2001,3 +2001,4 @@ FR-Designer_Tree_Data_Field=\u6811\u6570\u636E\u5B57\u6BB5 FR-Designer_Parent_Marked_Field=\u7236\u6807\u8BB0\u5B57\u6BB5 FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u4F9D\u8D56\u6240\u9009\u6570\u636E\u96C6\u7684\u7236\u6807\u8BB0\u5B57\u6BB5\u6784\u5EFA\u6811 FR-Product_Demo=\u4EA7\u54C1\u6F14\u793A +FR-Designer_Data_Filter=\u6570\u636E\u7B5B\u9009 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 9278fd6e1b..4a93abfc5d 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 @@ -2002,3 +2002,4 @@ FR-Designer_Tree_Data_Field=\u6A39\u72C0\u8CC7\u6599\u6B04\u4F4D FR-Designer_Parent_Marked_Field=\u7236\u6A19\u8A18\u6B04\u4F4D FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u4F9D\u8CF4\u6240\u9078\u8CC7\u6599\u96C6\u7684\u7236\u6A19\u8A18\u6B04\u4F4D\u69CB\u5EFA\u6A39 FR-Product_Demo=\u529F\u80FD\u5C55\u793A +FR-Designer_Data_Filter=\u8CC7\u6599\u7BE9\u9078 \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java index 100c19f7de..1e07a587d4 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java @@ -59,7 +59,7 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan double[] cs = {p}; components = new Component[][]{ new Component[]{new JSeparator()}, - new Component[]{new BoldFontTextLabel(Inter.getLocText("Data_Filter"))}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer_Data_Filter"))}, new Component[]{filterPane = new ChartDataFilterPane(new MeterPlot(), parent)}, }; JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSize, cs); From 5974527fe4c9760625bb38cf5492a6c92cdfcc66 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 23 Jun 2017 16:11:57 +0800 Subject: [PATCH 013/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9pmd=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=88=E5=9B=BD=E9=99=85=E5=8C=96=E5=91=BD=E5=90=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 +-- .../src/com/fr/design/locale/designer_en_US.properties | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3129cfba01..b1e8bf0175 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2001,5 +2001,4 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according parent's FR-Designer_Build_Tree_Accord_Marked_Filed_Length=Build Tree according marked filed's length FR-Product_Demo=Demo FR-Designer_Tree_Data_Field=Tree Data Field -FR-Designer_Data_Filter=Data Filter - +FR-Designer_Data_Filter=Data Filter \ No newline at end of file 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 183874d008..38a2157d92 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 @@ -2002,5 +2002,4 @@ FR-Designer_Tree_Data_Field=Tree Data Field FR-Designer_Parent_Marked_Field=Parent Tag Field FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according to the parent tag field of the selected data set FR-Product_Demo=Demo -FR-Designer_Data_Filter=Data Filter - +FR-Designer_Data_Filter=Data Filter \ No newline at end of file From fa223daecf6bb1332f4451498218ab02be6cbcf6 Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 28 Jun 2017 11:10:34 +0800 Subject: [PATCH 014/101] =?UTF-8?q?CQ-9=20=E6=B2=A1=E6=9C=89=E8=A3=85?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=9A=84=E8=AE=BE=E8=AE=A1=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=B8=A6=E6=9C=89=E6=8F=92=E4=BB=B6=E6=8E=A7=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=97=B6=EF=BC=8C=E9=9C=80=E8=A6=81=E8=83=BD?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E6=89=93=E5=BC=80=E5=B9=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/ErrorCreator.java | 28 +++++++++++++++++++ .../design/designer/creator/NullCreator.java | 6 +++- .../designer/creator/XCreatorUtils.java | 3 ++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 designer_form/src/com/fr/design/designer/creator/ErrorCreator.java diff --git a/designer_form/src/com/fr/design/designer/creator/ErrorCreator.java b/designer_form/src/com/fr/design/designer/creator/ErrorCreator.java new file mode 100644 index 0000000000..54a679fe14 --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/ErrorCreator.java @@ -0,0 +1,28 @@ +package com.fr.design.designer.creator; + +import com.fr.form.ui.ErrorMarker; +import com.fr.form.ui.Widget; +import com.fr.stable.StringUtils; + +import java.awt.*; + +/** + * Created by richie on 2017/6/28. + */ +public class ErrorCreator extends NullCreator { + + public ErrorCreator(Widget widget, Dimension initSize) { + super(widget, initSize); + } + + + @Override + protected String showText() { + ErrorMarker marker = (ErrorMarker)toData(); + String text = marker.getWidgetValue().getDisplayValue(); + if (StringUtils.isEmpty(text)) { + return super.showText(); + } + return text; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/NullCreator.java b/designer_form/src/com/fr/design/designer/creator/NullCreator.java index 642b74fd0a..6159311b8e 100644 --- a/designer_form/src/com/fr/design/designer/creator/NullCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/NullCreator.java @@ -23,11 +23,15 @@ public class NullCreator extends XWidgetCreator { @Override protected JComponent initEditor() { - UILabel l = new UILabel("UNEXPECTED WIDGET"); + UILabel l = new UILabel(showText()); l.setForeground(Color.red); l.setVerticalAlignment(SwingConstants.CENTER); l.setHorizontalAlignment(SwingConstants.CENTER); setBorder(DEFALUTBORDER); return editor = l; } + + protected String showText() { + return "UNEXPECTED WIDGET"; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java b/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java index 3c58e2f192..9dfc803fa4 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java @@ -73,6 +73,9 @@ public class XCreatorUtils { objectMap.put(NameWidget.class, XNameWidget.class); objectMap.put(CardSwitchButton.class, XCardSwitchButton.class); objectMap.put(CardAddButton.class, XCardAddButton.class); + + objectMap.put(ErrorMarker.class, ErrorCreator.class); + putExtraEditor(); xLayoutMap.put(WAbsoluteLayout.class, XWAbsoluteLayout.class); From 32d5c1bf20a0b3a46fef3a3a6143d03ce04f34e7 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Thu, 6 Jul 2017 18:56:26 +0800 Subject: [PATCH 015/101] =?UTF-8?q?gis=E5=9C=B0=E5=9B=BE=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=BB=8F=E7=BA=AC=E5=BA=A6=E5=90=8E=EF=BC=8C=E7=BB=8F=E7=BA=AC?= =?UTF-8?q?=E5=BA=A6=E9=9D=A2=E6=9D=BF=E4=B8=8D=E7=8E=B0=E5=AE=9Ebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/report/GisMapTableDataContentPane.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java b/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java index 5a2f3a4b93..e9aef9d973 100644 --- a/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java +++ b/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java @@ -74,6 +74,12 @@ public class GisMapTableDataContentPane extends FurtherBasicBeanPane(new String[]{Inter.getLocText("Chart-Gis_Address"), Inter.getLocText("Chart-Gis_LatLng")}); lnglatOrder = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Lng_First"),Inter.getLocText("Chart-Lat_First")}); + addressType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + orderPane.setVisible(addressType.getSelectedIndex() == 1); + } + }); addressBox = new UIComboBox(); addressNameBox = new UIComboBox(); double p = TableLayout.PREFERRED; From f8da6a4c518938e5e7048a237de4a5dd6538d355 Mon Sep 17 00:00:00 2001 From: loy Date: Fri, 7 Jul 2017 16:49:18 +0800 Subject: [PATCH 016/101] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5=E9=A2=84=E8=A7=88=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 3 +- .../design/preview/WriteEnhancePreview.java | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/preview/WriteEnhancePreview.java diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index fd4cd7b0da..e429f9d46d 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -36,6 +36,7 @@ import com.fr.design.parameter.ParameterDefinitePane; import com.fr.design.parameter.ParameterInputPane; import com.fr.design.preview.PagePreview; import com.fr.design.preview.ViewPreview; +import com.fr.design.preview.WriteEnhancePreview; import com.fr.design.preview.WritePreview; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; @@ -673,7 +674,7 @@ public class JWorkBook extends JTemplate { public PreviewProvider[] supportPreview() { Set set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); return ArrayUtils.addAll(new PreviewProvider[]{ - new PagePreview(), new WritePreview(), new ViewPreview() + new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview() }, set.toArray(new PreviewProvider[set.size()])); } diff --git a/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java b/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java new file mode 100644 index 0000000000..0c6108b053 --- /dev/null +++ b/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java @@ -0,0 +1,40 @@ +package com.fr.design.preview; + +import com.fr.base.io.IOFile; +import com.fr.design.fun.impl.AbstractPreviewProvider; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by loy on 2017/7/7. + */ +public class WriteEnhancePreview extends AbstractPreviewProvider { + @Override + public String nameForPopupItem() { + //TODO 国际化 + return "新填报预览"; + } + + @Override + public String iconPathForPopupItem() { + return "com/fr/design/images/buttonicon/writes.png"; + } + + @Override + public String iconPathForLarge() { + return "com/fr/design/images/buttonicon/writeb24.png"; + } + + @Override + public int previewTypeCode() { + return IOFile.WRITE_PREVIEW_TYPE; + } + + @Override + public Map parametersForPreview() { + Map map = new HashMap(); + map.put("op", "write_ex"); + return map; + } +} From 6b7f98b513d22d571814158b468b53af4689f638 Mon Sep 17 00:00:00 2001 From: syoki Date: Sat, 8 Jul 2017 16:03:38 +0900 Subject: [PATCH 017/101] =?UTF-8?q?=E3=80=90=E6=97=A5=E8=AF=AD=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E4=BF=AE=E6=94=B9=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_ja_JP.properties | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) 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 2cdaeea481..276f9ebe27 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 @@ -641,7 +641,7 @@ FR-Designer-Plugin_Detecting_Update=\u66F4\u65B0\u691C\u8A3C\u4E2D HF-Whether_to_define_the_selected_type=\u9078\u629E\u30BF\u30A4\u30D7\u306E\u5B9A\u7FA9 StyleAlignment-Right=\u53F3\u8A70\u3081 FR-Designer_Alignment-Style=\u63C3\u3048\u65B9\u6CD5 -PageSetup-Title_Start_Column=\u91CD\u8907\u30BF\u30A4\u30C8\u30EB\u5217 +PageSetup-Title_Start_Column=\u91CD\u8907\u30D8\u30C3\u30C0\u30FC\u5217 Tree-Mutiple_Selection_Or_Not=\u8907\u6570\u9078\u629E FR-Designer-Plugin_Search=\u691C\u7D22 Choose_Role=\u6A29\u9650\u5236\u5FA1 @@ -779,7 +779,7 @@ FR-Base_Value=\u5024 fileLocked_undeleted=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u30ED\u30C3\u30AF\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3002OK\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3001\u30EA\u30B9\u30C8\u3092\u518D\u8AAD\u307F\u8FBC\u307F\u3057\u3066\u304F\u3060\u3055\u3044\u3002 Web_Apply=WEB\u30A2\u30D7\u30EA Refresh_Database=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u66F4\u65B0 -Set_Row_Title_End=\u91CD\u8907\u7D42\u4E86\u884C\u8A2D\u5B9A +Set_Row_Title_End=\u91CD\u8907\u30D5\u30C3\u30BF\u30FC\u884C\u8A2D\u5B9A FR-Utils-New_Folder=\u65B0\u898F\u30D5\u30A9\u30EB\u30C0\u30FC\u306E\u4F5C\u6210 BiasD-From-upper_left_to_lower_right=\u5DE6\u4E0A\u5074\u304B\u3089\u53F3\u4E0B\u5074\u3078\u5E83\u3052\u308B CapsLock=Caps Lock\u304C\u30AA\u30F3\u306B\u306A\u3063\u3066\u3044\u308B @@ -793,7 +793,7 @@ BackgroundTexture-GreenMarble=\u5927\u7406\u77F3(\u7DD1) read_time_out=\u30ED\u30FC\u30C9\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8 JavaScript-Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F DS-Relation_TableData=\u95A2\u9023\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 -CellWrite-Page_Before_Row=\u884C\u524D\u306E\u6539\u9801 +CellWrite-Page_Before_Row=\u884C\u524D\u306E\u6539\u30DA\u30FC\u30B8 FR-Designer-Plugin_Load_Plugins_From_Server=\u30D7\u30E9\u30B0\u30A4\u30F3\u30B9\u30C8\u30A2\u304B\u3089\u30C7\u30FC\u30BF\u53D6\u5F97\u4E2D D-Dispaly_Divide_Result_Set_into_Groups=\u7D50\u679C\u30BB\u30C3\u30C8\u3092\u30B0\u30EB\u30FC\u30D7\u5206\u3051 Closed=\u7D42\u4E86\u6E08\u307F @@ -886,7 +886,7 @@ Device=\u30C7\u30D0\u30A4\u30B9 M_Insert-Cell=\u30BB\u30EB\u8981\u7D20 Present-Formula_Present=\u6570\u5F0F\u5F62\u614B FRFont-Superscript=\u4E0A\u4ED8\u304D -CellWrite-Page_Before_Column=\u5217\u524D\u306E\u6539\u9801 +CellWrite-Page_Before_Column=\u5217\u524D\u306E\u6539\u30DA\u30FC\u30B8 Golden=\u91D1\u8272 Preference-Support_Cell_Editor_Definition=\u30BB\u30EB\u30A8\u30C7\u30A3\u30BF\u3092\u30B5\u30DD\u30FC\u30C8 M-Page_Preview=\u30DA\u30FC\u30B8\u5225\u30D7\u30EC\u30D3\u30E5\u30FC @@ -997,7 +997,7 @@ Hyperlink-Web_link=\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u30EA\u30F3\u30AF StyleAlignment-between_-90_and_90=-90\u304B\u308990\u306E\u7BC4\u56F2 FormulaD-Custom_Function=\u30AB\u30B9\u30BF\u30E0\u95A2\u6570 FR-Designer_Integer=\u6574\u6570 -PageSetup-Finis_Start_Row=\u91CD\u8907\u7D42\u4E86\u884C +PageSetup-Finis_Start_Row=\u91CD\u8907\u30D5\u30C3\u30BF\u30FC\u884C RWA-Remove_Field=\u30D5\u30A3\u30FC\u30EB\u30C9\u524A\u9664 Form-Desin_Width=\u30C7\u30B6\u30A4\u30F3\u5E45 No-tableData=\u623B\u3055\u308C\u305F\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093 @@ -1318,7 +1318,7 @@ Des-Remove_WorkSheet=\u9078\u629E\u3057\u305F\u30B7\u30FC\u30C8\u306B\u30C7\u30F Rotation=\u56DE\u8EE2 Undefined=\u672A\u5B9A\u7FA9 Support-Auto_Complete_Shortcut=\u81EA\u52D5\u88DC\u5B8C\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u30AD\u30FC -Set_Column_Title_End=\u91CD\u8907\u7D42\u4E86\u5217\u8A2D\u5B9A +Set_Column_Title_End=\u91CD\u8907\u30D5\u30C3\u30BF\u30FC\u5217\u8A2D\u5B9A Submit_Url=\u66F8\u304D\u8FBC\u307F\u30A2\u30C9\u30EC\u30B9 ReportServerP-Are_you_sure_to_delete_the_selected_printer=\u9078\u629E\u3055\u308C\u305F\u30D7\u30EA\u30F3\u30BF\u3092\u524A\u9664\u3057\u307E\u3059\u304B long_data_can_not_show_fully=\u9577\u3044\u30C7\u30FC\u30BF\u306E\u8868\u793A\u306F\u4E0D\u5B8C\u5168 @@ -1376,7 +1376,7 @@ Compile_Success=\u30B3\u30F3\u30D1\u30A4\u30EB\u306B\u6210\u529F\u3057\u307E\u30 BackgroundTexture-RecycledPaper=\u518D\u751F\u7D19 StyleAlignment-Single_Line=1\u884C\u8868\u793A Utils-Move_Down=\u4E0B\u3078 -Please_Set_Repeat_First=\u91CD\u8907\u30BF\u30A4\u30C8\u30EB\u884C\u3068\u5217\u3092\u4E8B\u524D\u306B\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +Please_Set_Repeat_First=\u91CD\u8907\u30D8\u30C3\u30C0\u30FC\u884C\u3068\u5217\u3092\u4E8B\u524D\u306B\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 Writer-ShortCuts_Setting=\u66F8\u304D\u8FBC\u307F\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u30AD\u30FC\u8A2D\u5B9A Verify-Data_Verify=\u30C7\u30FC\u30BF\u691C\u8A3C FR-mobile_analysis_style=\u89E3\u6790\u65B9\u6CD5 @@ -1407,7 +1407,7 @@ Widget-Load_By_Async=\u975E\u540C\u671F\u30ED\u30FC\u30C9 Shape=\u56F3\u5F62 BindColumn-This_Condition_has_been_existed=\u3053\u306E\u6761\u4EF6\u306F\u65E2\u306B\u3042\u308A\u307E\u3059 NS-exception_readError=\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\:1305 \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u89E3\u6790\u30A8\u30E9\u30FC -Set_Column_Title_Start=\u91CD\u8907\u30BF\u30A4\u30C8\u30EB\u5217\u8A2D\u5B9A +Set_Column_Title_Start=\u91CD\u8907\u30D8\u30C3\u30C0\u30FC\u5217\u8A2D\u5B9A Fri=\u91D1\u66DC\u65E5 M_Report-Report_Parameter=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF REPORTLETS=\u8907\u6570\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u30D1\u30B9\u306E\u30D1\u30E9\u30E1\u30FC\u30BF @@ -1530,7 +1530,7 @@ M_Insert-Barcode=\u30D0\u30FC\u30B3\u30FC\u30C9 Bounds=\u30DC\u30FC\u30C0\u30FC FR-Designer-Undo_All_Authority_Operations=\u524D\u56DE\u306E\u7DE8\u96C6\u6A29\u9650\u306E\u3059\u3079\u3066\u306E\u64CD\u4F5C\u3092\u5143\u306B\u623B\u3059 Datasource-Context=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 -CellWrite-Page_After_Column=\u5217\u5F8C +CellWrite-Page_After_Column=\u5217\u5F8C\u306E\u6539\u30DA\u30FC\u30B8 FR-Designer_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB Button-Group-Display-Columns=\u5217\u306E\u6570\u3092\u8868\u793A\u3059\u308B Widget-Height=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u9AD8\u3055 @@ -1737,9 +1737,9 @@ Env-Remote_Server=\u30EA\u30E2\u30FC\u30C8\u30B5\u30FC\u30D0 FR-Utils_Background=\u80CC\u666F FR-Designer-Plugin_Warning=\u8B66\u544A Server-version-info=\u958B\u3044\u305F\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u4E0A\u4F4D\u30A8\u30C7\u30A3\u30B7\u30E7\u30F3\u306E\u30C7\u30B6\u30A4\u30CA\u30FC\u3067\u4F5C\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u4E0A\u4F4D\u30A8\u30C7\u30A3\u30B7\u30E7\u30F3\u3067\u4F5C\u6210\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u3068\u30A8\u30E9\u30FC\u306E\u767A\u751F\u539F\u56E0\u3068\u306A\u308B\u307B\u304B\u3001\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u6A5F\u80FD\u3084\u5C5E\u6027\u306E\u4E00\u90E8\u3092\u5931\u3046\u6050\u308C\u304C\u3042\u308A\u307E\u3059\u3002\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u4F5C\u6210\u7528\u306E\u30C7\u30B6\u30A4\u30CA\u30FC\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u3001\u914D\u5099\u3055\u308C\u308B\u30A8\u30C7\u30A3\u30B7\u30E7\u30F3\u3088\u308A\u3082\u4E0B\u4F4D\u306E\u30A8\u30C7\u30A3\u30B7\u30E7\u30F3\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 -CellWrite-Page_After_Row=\u884C\u5F8C +CellWrite-Page_After_Row=\u884C\u5F8C\u306E\u6539\u30DA\u30FC\u30B8 HF-Right_Section=\u53F3\u5074 -PageSetup-Title_Start_Row=\u91CD\u8907\u30BF\u30A4\u30C8\u30EB\u884C +PageSetup-Title_Start_Row=\u91CD\u8907\u30D8\u30C3\u30C0\u30FC\u884C From=From Preference-Grid_Line_Color=\u30B0\u30EA\u30C3\u30C9\u7DDA\u306E\u8272 RowTo=~ @@ -1820,7 +1820,7 @@ HighLight=\u30CF\u30A4\u30E9\u30A4\u30C8 FR-Designer_Dropdown-More-Preview=\u30D7\u30EB\u30C0\u30A6\u30F3\u3067\u66F4\u306A\u308B\u30D7\u30EC\u30D3\u30E5\u30FC\u65B9\u6CD5\u3092\u53D6\u5F97 local=\u30ED\u30FC\u30AB\u30EB FR-Designer_Gradation=\u30EC\u30D9\u30EB -PageSetup-Finis_Start_Column=\u91CD\u8907\u7D42\u4E86\u5217 +PageSetup-Finis_Start_Column=\u91CD\u8907\u30D5\u30C3\u30BF\u30FC\u5217 Env-Invalid_User_and_Password=\u7121\u52B9\u306A\u30E6\u30FC\u30B6\u30FC\u540D\u307E\u305F\u306F\u30D1\u30B9\u30EF\u30FC\u30C9\u3067\u3059 FR-Designer-Plugin_All_Plugins=\u3059\u3079\u3066\u306E\u30D7\u30E9\u30B0\u30A4\u30F3 FR-Designer_Prepare_Export=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3092\u958B\u59CB\u3057\u3066\u3044\u307E\u3059\u3002\u304A\u5F85\u3061\u304F\u3060\u3055\u3044 @@ -1933,7 +1933,7 @@ Sun=\u65E5 FR-Designer_ToolBar_Bottom=\u4E0B\u90E8\u306E\u30C4\u30FC\u30EB\u30D0\u30FC Widget-Width=\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5E45 Series_Name=\u7CFB\u5217\u540D -Set_Row_Title_Start=\u91CD\u8907\u30BF\u30A4\u30C8\u30EB\u884C\u8A2D\u5B9A +Set_Row_Title_Start=\u91CD\u8907\u30D8\u30C3\u30C0\u30FC\u884C\u8A2D\u5B9A HF-Default_Page=\u65E2\u5B9A\u30DA\u30FC\u30B8 Env_Des=\u30ED\u30B0\u30A4\u30F3\u74B0\u5883\u4E2D\u306E\u5E33\u7968\u5DE5\u7A0B\u306B\u6A29\u9650\u3092\u4ED8\u4E0E\u3059\u308B\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u540D\u3068\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u8A18\u5165\u306F\u5FC5\u305A\u5BFE\u5FDC\u3059\u308B\u30ED\u30B0\u30A4\u30F3\u74B0\u5883\u306E\u30E6\u30FC\u30B6\u30FC\u3068\u30D1\u30B9\u30EF\u30FC\u30C9\u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093\u3002 Widget-User_Defined=\u4E8B\u524D\u5B9A\u7FA9 From 62066d4e953d9a125e584007a1ff81ddab9b4adb Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 10 Jul 2017 11:16:43 +0800 Subject: [PATCH 018/101] =?UTF-8?q?REPORT-3184=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=AE=89=E8=A3=85=E5=90=8E=E9=BB=98=E8=AE=A4=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=9B=AE=E5=BD=95=E7=9A=84=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 ++- .../src/com/fr/design/locale/designer_en_US.properties | 3 ++- .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 3 ++- designer_base/src/com/fr/start/BaseDesigner.java | 6 +++--- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index b1e8bf0175..836b30c98d 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2001,4 +2001,5 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according parent's FR-Designer_Build_Tree_Accord_Marked_Filed_Length=Build Tree according marked filed's length FR-Product_Demo=Demo FR-Designer_Tree_Data_Field=Tree Data Field -FR-Designer_Data_Filter=Data Filter \ No newline at end of file +FR-Designer_Data_Filter=Data Filter +Default=Default 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 38a2157d92..c545b6f7e1 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 @@ -2002,4 +2002,5 @@ FR-Designer_Tree_Data_Field=Tree Data Field FR-Designer_Parent_Marked_Field=Parent Tag Field FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according to the parent tag field of the selected data set FR-Product_Demo=Demo -FR-Designer_Data_Filter=Data Filter \ No newline at end of file +FR-Designer_Data_Filter=Data Filter +Default=Default 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 276f9ebe27..3ebf48af52 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 @@ -2002,3 +2002,4 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u89AA\u30DE\u30FC\u30AF\u30D5 FR-Product_Demo=\u88FD\u54C1\u30C7\u30E2 FR-Designer_Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF FR-Designer_Can_not_use_FormatBursh=\u9023\u7D9A\u3057\u306A\u3044\u8907\u6570\u9818\u57DF\u3067\u306F\u66F8\u5F0F\u30B3\u30D4\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 +Default=\u65E2\u5B9A 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 9e596a5d22..069cb57a8c 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 @@ -2001,4 +2001,5 @@ FR-Designer_Tree_Data_Field=\uD2B8\uB9AC\uB370\uC774\uD130\uD544\uB4DC FR-Designer_Parent_Marked_Field=\uBD80\uBAA8\uD0DC\uADF8\uD544\uB4DC FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\uC120\uD0DD\uD55C\uB370\uC774\uD130\uC138\uD2B8\uC758\uBD80\uBAA8\uD0DC\uADF8\uD544\uB4DC\uC5D0\uB530\uB77C\uD2B8\uB9AC\uC0DD\uC131 FR-Product_Demo=\uC81C\uD488\uC2DC\uC5F0 -FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4 \ No newline at end of file +FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4 +Default=\uAE30\uBCF8 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 f82431235e..dddd287f34 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 @@ -2002,3 +2002,4 @@ FR-Designer_Parent_Marked_Field=\u7236\u6807\u8BB0\u5B57\u6BB5 FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u4F9D\u8D56\u6240\u9009\u6570\u636E\u96C6\u7684\u7236\u6807\u8BB0\u5B57\u6BB5\u6784\u5EFA\u6811 FR-Product_Demo=\u4EA7\u54C1\u6F14\u793A FR-Designer_Data_Filter=\u6570\u636E\u7B5B\u9009 +Default=\u9ED8\u8BA4 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 4a93abfc5d..c85f1d3822 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 @@ -2002,4 +2002,5 @@ FR-Designer_Tree_Data_Field=\u6A39\u72C0\u8CC7\u6599\u6B04\u4F4D FR-Designer_Parent_Marked_Field=\u7236\u6A19\u8A18\u6B04\u4F4D FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u4F9D\u8CF4\u6240\u9078\u8CC7\u6599\u96C6\u7684\u7236\u6A19\u8A18\u6B04\u4F4D\u69CB\u5EFA\u6A39 FR-Product_Demo=\u529F\u80FD\u5C55\u793A -FR-Designer_Data_Filter=\u8CC7\u6599\u7BE9\u9078 \ No newline at end of file +FR-Designer_Data_Filter=\u8CC7\u6599\u7BE9\u9078 +Default=\u9810\u8A2D diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 905d44ba96..4c9329c243 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -61,12 +61,12 @@ public abstract class BaseDesigner extends ToolBarMenuDock { } BuildContext.setBuildFilePath(buildPropertiesPath()); - //下面这两句的位置不能随便调换,因为会影响语言切换的问题 - initLanguage(); - // 先加载设计器的国际化文件 Inter.loadLocaleFile(GeneralContext.getLocale(), DesignModule.LOCALE_FILE_PATH); + //下面这两句的位置不能随便调换,因为会影响语言切换的问题 + initLanguage(); + SplashWindow splashWindow = new SplashWindow(createSplashPane()); if (args != null) { for (String arg : args) { From f86e0ee7b738cd4e851be8058cc9b6ac06c32a19 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Tue, 11 Jul 2017 15:05:40 +0800 Subject: [PATCH 019/101] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20build=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.release.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.release.gradle b/build.release.gradle index 1c00529e68..1efdd55cc8 100644 --- a/build.release.gradle +++ b/build.release.gradle @@ -2,8 +2,9 @@ apply plugin: "java" tasks.withType(JavaCompile){ options.encoding = "UTF-8" } + def basicDir="../../" -def libDir="${basicDir}/finereport-lib-stable/master" +def libDir="${basicDir}/finereport-lib-stable" //获取什么分支名 FileTree files =fileTree(dir:"./",include:"build.*.gradle") def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) @@ -26,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"./tmp") - unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") From a3864c350d1e5c1b3321f68290382ffddb22abc5 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 11 Jul 2017 17:25:40 +0800 Subject: [PATCH 020/101] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20=E4=BF=AE=E6=94=B99.0=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E6=8F=92=E4=BB=B6=20=E6=89=80=E6=9C=89=E8=AF=BB?= =?UTF-8?q?=E5=86=99xml=E7=9A=84class=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=BD=BF=E7=94=A8=E9=80=9A=E7=94=A8=E7=9A=84GeneralXM?= =?UTF-8?q?LTool=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=AF=E6=8F=92=E4=BB=B6=E7=9A=84Class=E5=B9=B6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95PluginID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 13 +++++++++---- .../src/com/fr/design/menu/MenuManager.java | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 2dd6bef373..aa7467f4be 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -3,7 +3,10 @@ */ package com.fr.design; -import com.fr.base.*; +import com.fr.base.BaseXMLUtils; +import com.fr.base.Env; +import com.fr.base.FRContext; +import com.fr.base.Utils; import com.fr.dav.LocalEnv; import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.constants.UIConstants; @@ -11,6 +14,7 @@ import com.fr.env.RemoteEnv; import com.fr.env.SignIn; import com.fr.file.FILEFactory; import com.fr.general.*; +import com.fr.general.xml.GeneralXMLTools; import com.fr.stable.*; import com.fr.stable.core.UUID; import com.fr.stable.project.ProjectConstants; @@ -18,7 +22,6 @@ import com.fr.stable.xml.*; import javax.swing.*; import javax.swing.SwingWorker.StateValue; - import java.awt.*; import java.io.*; import java.util.*; @@ -1798,8 +1801,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { if (env == null) { return; } - - writer.startTAG("Env").attr("class", env.getClass().getName()).attr("name", name); + + writer.startTAG("Env"); + GeneralXMLTools.writeClassNameAttr(env.getClass(), writer); + writer.attr("name", name); env.writeXML(writer); diff --git a/designer_base/src/com/fr/design/menu/MenuManager.java b/designer_base/src/com/fr/design/menu/MenuManager.java index e2019449c0..2db6c41a5e 100644 --- a/designer_base/src/com/fr/design/menu/MenuManager.java +++ b/designer_base/src/com/fr/design/menu/MenuManager.java @@ -4,7 +4,7 @@ import com.fr.design.DesignState; import com.fr.design.actions.MenuAction; import com.fr.file.XMLFileManager; import com.fr.general.FRLogger; -import com.fr.general.GeneralUtils; +import com.fr.general.xml.GeneralXMLTools; import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLReadable; @@ -140,7 +140,7 @@ public class MenuManager extends XMLFileManager { return; } try { - MenuAction action = (MenuAction) GeneralUtils.classForName(name).newInstance(); + MenuAction action = (MenuAction) GeneralXMLTools.readXMLableClass(reader,name).newInstance(); menu.addShortCut(action); } catch (Exception exp) { FRLogger.getLogger().error(exp.getMessage(), exp); From dda8a8182643c16c8ad52920e01e7195bfcce565 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 12 Jul 2017 11:00:53 +0800 Subject: [PATCH 021/101] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=201=E3=80=81=E5=B0=86ClassForName?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=94=BE=E5=88=B0StableUtils=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=202=E3=80=81xmlreader=E5=92=8Cwriter=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E8=AF=BB=E5=86=99Class=E5=AF=B9=E8=B1=A1=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E5=B0=81=E8=A3=85=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/DesignerEnvManager.java | 3 +-- designer_base/src/com/fr/design/menu/MenuManager.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index aa7467f4be..5658a318dc 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -14,7 +14,6 @@ import com.fr.env.RemoteEnv; import com.fr.env.SignIn; import com.fr.file.FILEFactory; import com.fr.general.*; -import com.fr.general.xml.GeneralXMLTools; import com.fr.stable.*; import com.fr.stable.core.UUID; import com.fr.stable.project.ProjectConstants; @@ -1803,7 +1802,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } writer.startTAG("Env"); - GeneralXMLTools.writeClassNameAttr(env.getClass(), writer); + writer.classAttr(env.getClass()); writer.attr("name", name); env.writeXML(writer); diff --git a/designer_base/src/com/fr/design/menu/MenuManager.java b/designer_base/src/com/fr/design/menu/MenuManager.java index 2db6c41a5e..18d6b0e022 100644 --- a/designer_base/src/com/fr/design/menu/MenuManager.java +++ b/designer_base/src/com/fr/design/menu/MenuManager.java @@ -4,7 +4,6 @@ import com.fr.design.DesignState; import com.fr.design.actions.MenuAction; import com.fr.file.XMLFileManager; import com.fr.general.FRLogger; -import com.fr.general.xml.GeneralXMLTools; import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLReadable; @@ -140,7 +139,7 @@ public class MenuManager extends XMLFileManager { return; } try { - MenuAction action = (MenuAction) GeneralXMLTools.readXMLableClass(reader,name).newInstance(); + MenuAction action = (MenuAction) reader.getAttrAsClass().newInstance(); menu.addShortCut(action); } catch (Exception exp) { FRLogger.getLogger().error(exp.getMessage(), exp); From f67dea4d07c18aa4315f76a6a698eebd0c8b9287 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 12 Jul 2017 11:41:06 +0800 Subject: [PATCH 022/101] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/xpane/ToolTipEditor.java | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/gui/xpane/ToolTipEditor.java b/designer_form/src/com/fr/design/gui/xpane/ToolTipEditor.java index 8306bb9d67..6fbc858b06 100644 --- a/designer_form/src/com/fr/design/gui/xpane/ToolTipEditor.java +++ b/designer_form/src/com/fr/design/gui/xpane/ToolTipEditor.java @@ -17,6 +17,12 @@ import com.fr.form.ui.EditorHolder; import com.fr.form.ui.Widget; import com.fr.form.ui.WidgetValue; import com.fr.general.Background; +import com.fr.general.GeneralContext; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.injectable.PluginModule; +import com.fr.plugin.manage.PluginFilter; +import com.fr.plugin.observer.PluginEvent; +import com.fr.plugin.observer.PluginEventListener; import com.fr.stable.ArrayUtils; import javax.swing.*; @@ -27,12 +33,31 @@ import java.awt.event.MouseEvent; import java.awt.geom.RoundRectangle2D; public class ToolTipEditor extends JWindow { - - private static ToolTipEditor editor = new ToolTipEditor(); - - public static ToolTipEditor getInstance() { - return editor; - } + + private static volatile ToolTipEditor editor = new ToolTipEditor(); + + static { + GeneralContext.listenPluginRunningChanged(new PluginEventListener() { + + @Override + public void on(PluginEvent event) { + + editor = new ToolTipEditor(); + } + }, new PluginFilter() { + + @Override + public boolean accept(PluginContext context) { + + return context.contain(PluginModule.ExtraDesign); + } + }); + } + + public static ToolTipEditor getInstance() { + + return editor; + } private XEditorHolder holder; private Border buttonBorder = new UIRoundedBorder(new Color(149, 149, 149), 1, 5); From ce8a3b10564e6033b0f335b9563dab77b91252f7 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 12 Jul 2017 15:32:42 +0800 Subject: [PATCH 023/101] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index a178150921..4ef8d61e16 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2181,7 +2181,7 @@ public class RemoteEnv extends AbstractEnv { try { HashMap para = new HashMap(); para.put("op", "plugin"); - para.put("cmd", "get_states"); + para.put("cmd", "get_status"); para.put("current_uid", this.createUserID()); para.put("currentUsername", this.getUser()); From 1de6733c9b96c348bffc2b8e2fa21c407339aca0 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 12 Jul 2017 15:57:47 +0800 Subject: [PATCH 024/101] update --- .../design/cell/editor/RichTextToolBar.java | 2 +- .../fr/design/expand/ExpandFatherPane.java | 16 +- .../mainframe/CellElementPropertyPane.java | 62 +++++- .../design/mainframe/bbs/UserInfoLabel.java | 2 +- .../mainframe/cell/CellElementEditPane.java | 49 ++++- .../mainframe/cell/QuickEditorRegion.java | 2 +- .../cell/settingpane/CellExpandAttrPane.java | 77 +++++++- .../cell/settingpane/CellOtherSetPane.java | 3 +- .../cell/settingpane/CellPresentPane.java | 21 ++- .../cell/settingpane/CellStylePane.java | 18 +- .../src/com/fr/design/DesignerEnvManager.java | 2 +- .../fr/design/foldablepane/HeaderPane.java | 111 +++++++++++ .../design/foldablepane/UIExpandablePane.java | 95 ++++++++++ .../gui/icontainer/UIResizableContainer.java | 177 ++++++++++++++--- .../fr/design/gui/style/BackgroundPane.java | 24 ++- .../com/fr/design/gui/style/BorderPane.java | 69 +++++-- .../com/fr/design/gui/style/FRFontPane.java | 88 +++++---- .../com/fr/design/gui/style/FormatPane.java | 178 ++++++++++-------- .../src/com/fr/design/menu/MenuManager.java | 12 +- .../series/PlotSeries/MapCustomPane.java | 4 +- 20 files changed, 797 insertions(+), 215 deletions(-) create mode 100644 designer_base/src/com/fr/design/foldablepane/HeaderPane.java create mode 100644 designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java diff --git a/designer/src/com/fr/design/cell/editor/RichTextToolBar.java b/designer/src/com/fr/design/cell/editor/RichTextToolBar.java index 1bf8a2f569..0b5721975d 100644 --- a/designer/src/com/fr/design/cell/editor/RichTextToolBar.java +++ b/designer/src/com/fr/design/cell/editor/RichTextToolBar.java @@ -81,7 +81,7 @@ public class RichTextToolBar extends BasicPane{ private void initAllButton(){ fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); fontNameComboBox.setPreferredSize(new Dimension(144, 20)); - fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES); + fontSizeComboBox = new UIComboBox(FRFontPane.getFontSizes()); colorSelectPane = new UIToolbarColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); colorSelectPane.set4Toolbar(); diff --git a/designer/src/com/fr/design/expand/ExpandFatherPane.java b/designer/src/com/fr/design/expand/ExpandFatherPane.java index aeaf427d7c..88aeb44c31 100644 --- a/designer/src/com/fr/design/expand/ExpandFatherPane.java +++ b/designer/src/com/fr/design/expand/ExpandFatherPane.java @@ -22,6 +22,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; public abstract class ExpandFatherPane extends JPanel implements GlobalNameObserver { @@ -33,6 +35,7 @@ public abstract class ExpandFatherPane extends JPanel implements GlobalNameObser private String expandFatherName = ""; private GlobalNameListener globalNameListener = null; private boolean isAlreadyAddListener = false; + private final JPanel customPane; public ExpandFatherPane() { this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL)); @@ -41,7 +44,7 @@ public abstract class ExpandFatherPane extends JPanel implements GlobalNameObser Inter.getLocText("Default"), Inter.getLocText("Custom")}); final CardLayout cardLayout = new CardLayout(); - final JPanel customPane = new JPanel(cardLayout); + customPane = new JPanel(cardLayout); customParentColumnRowPane = new ColumnRowPane() { @Override @@ -63,13 +66,22 @@ public abstract class ExpandFatherPane extends JPanel implements GlobalNameObser cc.add(imageButton, BorderLayout.EAST); customPane.add(cc, "content"); customPane.add(new JPanel(), "none"); + customPane.setPreferredSize(new Dimension(0, 0) ); this.add(comboBox, BorderLayout.NORTH); this.add(customPane, BorderLayout.CENTER); + comboBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - cardLayout.show(customPane, comboBox.getSelectedIndex() == 2 ? "content" : "none"); + if(comboBox.getSelectedIndex() == 2){ + customPane.setPreferredSize(new Dimension(100, 20) ); + cardLayout.show(customPane,"content"); + }else { + cardLayout.show(customPane,"none"); + customPane.setPreferredSize(new Dimension(0, 0) ); + } +// cardLayout.show(customPane, comboBox.getSelectedIndex() == 2 ? "content" : "none"); if (globalNameListener != null && shouldResponseNameListener()) { globalNameListener.setGlobalName(expandFatherName); } diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index 55235c5c98..6785b17f98 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -3,11 +3,21 @@ */ package com.fr.design.mainframe; +import java.awt.*; + +import javax.swing.*; + import com.fr.base.BaseUtils; +import com.fr.design.fun.CellAttributeProvider; +import com.fr.design.fun.PresentKindProvider; import com.fr.design.gui.frpane.UITitlePanel; +import com.fr.design.gui.ibutton.UIHeadGroup; +import com.fr.design.gui.ibutton.UISideGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itabpane.TitleChangeListener; import com.fr.design.mainframe.cell.CellElementEditPane; +import com.fr.design.mainframe.cell.settingpane.AbstractCellAttrPane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.grid.selection.CellSelection; @@ -22,9 +32,6 @@ import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.Elem; import com.fr.report.elementcase.TemplateElementCase; -import javax.swing.*; -import java.awt.*; - /** * 所有组件一次全部加载,不存在延迟加载。 原因:设计器打开第一张模板的时候,会初始化许多许多东西。这个过程需要很长时间(快的3-5s)。 @@ -35,7 +42,7 @@ import java.awt.*; * @since 2012-5-24下午1:50:21 */ public class CellElementPropertyPane extends DockingView { - + static { GeneralContext.listenPluginRunningChanged(new PluginEventListener() { @@ -43,7 +50,7 @@ public class CellElementPropertyPane extends DockingView { public void on(PluginEvent event) { synchronized (CellElementPropertyPane.class) { - singleton = null; + singleton = new CellElementPropertyPane(); } } }, new PluginFilter() { @@ -51,11 +58,13 @@ public class CellElementPropertyPane extends DockingView { @Override public boolean accept(PluginContext context) { - return context.contain(PluginModule.ExtraDesign); + return context.contain(PluginModule.ExtraDesign, PresentKindProvider.MARK_STRING) || + context.contain(PluginModule.ExtraDesign, CellAttributeProvider.MARK_STRING); } }); } + public synchronized static CellElementPropertyPane getInstance() { if (singleton == null) { singleton = new CellElementPropertyPane(); @@ -78,6 +87,43 @@ public class CellElementPropertyPane extends DockingView { } }; + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + GUICoreUtils.centerWindow(jf); + final JPanel jPanel = (JPanel) jf.getContentPane(); + jPanel.setLayout(new BorderLayout()); + final CardLayout card = new CardLayout(); + final JPanel center = new JPanel(); + center.setLayout( new CardLayout()); + + final JPanel content = new JPanel(); + content.setLayout(new BorderLayout()); + final CellElementPropertyPane pane = new CellElementPropertyPane(); + content.add(new CellElementPropertyPane(), BorderLayout.CENTER); + Icon[] iconArray = new Icon[2]; + iconArray[0] = BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"); + center.add(content,content.getUIClassID()); + iconArray[1] = BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"); + center.add(new JPanel(),""); +// for (int i = 0; i < 4; i++) { +// iconArray[0] = BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"); +// center.add(content,content.getUIClassID()); +// } + + + final TitleChangeListener titleChangeListener = null; + UISideGroup tabsHeaderIconPane = new UISideGroup(iconArray) { + }; + JPanel j1 = new JPanel(); + j1.setLayout(new GridLayout(10,1)); + j1.add(tabsHeaderIconPane); + tabsHeaderIconPane.setNeedLeftRightOutLine(false); + jPanel.add(j1, BorderLayout.WEST); + jPanel.add(center,BorderLayout.CENTER); + jf.setSize(500, 500); + jf.setVisible(true); + } private CellElementPropertyPane() { this.setLayout(new BorderLayout()); @@ -97,7 +143,7 @@ public class CellElementPropertyPane extends DockingView { title.setVerticalAlignment(SwingConstants.CENTER); titlePane.add(title, BorderLayout.CENTER); titlePane.setBorder(BorderFactory.createEmptyBorder(0,0,1,0)); - this.add(titlePane, BorderLayout.NORTH); +// this.add(titlePane, BorderLayout.NORTH); this.add(cellElementEditPane, BorderLayout.CENTER); } @@ -130,7 +176,7 @@ public class CellElementPropertyPane extends DockingView { public void reInit(ElementCasePane ePane) { if (titlePane.getParent() == null) { // 如果处于隐藏状态,则让其显示 - this.add(titlePane, BorderLayout.NORTH); +// this.add(titlePane, BorderLayout.NORTH); this.add(cellElementEditPane, BorderLayout.CENTER); } cellElementEditPane.populate(ePane); diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index 4d58b3db67..2630c2702b 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -265,7 +265,7 @@ public class UserInfoLabel extends UILabel { UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")); closeOther.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { - BBSPluginLogin.getInstance().logOut(); +// BBSPluginLogin.getInstance().logOut(); UserLoginContext.fireLoginContextListener(); } diff --git a/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java b/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java index 3da7406c65..8d3980a48d 100644 --- a/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java +++ b/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java @@ -1,21 +1,24 @@ package com.fr.design.mainframe.cell; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Dimension; +import java.awt.*; import java.util.*; +import java.util.List; -import javax.swing.Icon; -import javax.swing.JPanel; +import javax.swing.*; import com.fr.base.BaseUtils; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.CellAttributeProvider; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ibutton.UIHeadGroup; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itabpane.TitleChangeListener; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.EastTopArrow; import com.fr.design.mainframe.cell.settingpane.*; import com.fr.design.dialog.BasicPane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; @@ -44,21 +47,33 @@ public class CellElementEditPane extends BasicPane { private int PaneListIndex; private CardLayout card; private JPanel center; - + private JPanel downTitle; + private JPanel title; + private UILabel titlename; private TitleChangeListener titleChangeListener = null; private CellAttributeProvider cellAttributeProvider = null; + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel)jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new CellElementEditPane(),BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(270, 400); + jf.setVisible(true); + } public CellElementEditPane() { setLayout(new BorderLayout()); initPaneList(); - Icon[] iconArray = new Icon[paneList.size()]; + String[] iconArray = new String[paneList.size()]; card = new CardLayout(); center = new JPanel(card); for (int i = 0; i < paneList.size(); i++) { AbstractCellAttrPane pane = paneList.get(i); - iconArray[i] = BaseUtils.readIcon(pane.getIconPath()); + iconArray[i] = pane.getIconPath(); center.add(pane, pane.title4PopupWindow()); } @@ -74,8 +89,22 @@ public class CellElementEditPane extends BasicPane { } }; tabsHeaderIconPane.setNeedLeftRightOutLine(false); - this.add(tabsHeaderIconPane, BorderLayout.NORTH); - this.add(center, BorderLayout.CENTER); + + titlename = new UILabel(Inter.getLocText("Cell-Cell_Attributes")); + titlename.setFont(new Font("Dialog", 1, 14)); + titlename.setForeground(new Color(30,190,245)); + title = new JPanel(); + title.setLayout(new BorderLayout()); + title.add(titlename, BorderLayout.NORTH); + + downTitle = new JPanel(); + downTitle.setLayout(new BorderLayout()); + downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH); + downTitle.add(center, BorderLayout.CENTER); + + this.add(title, BorderLayout.NORTH); + this.add(downTitle, BorderLayout.CENTER); + } diff --git a/designer/src/com/fr/design/mainframe/cell/QuickEditorRegion.java b/designer/src/com/fr/design/mainframe/cell/QuickEditorRegion.java index 7ac79975a1..f105ad4792 100644 --- a/designer/src/com/fr/design/mainframe/cell/QuickEditorRegion.java +++ b/designer/src/com/fr/design/mainframe/cell/QuickEditorRegion.java @@ -35,7 +35,7 @@ public class QuickEditorRegion extends JPanel { private static QuickEditorRegion singleton = new QuickEditorRegion(); private static JPanel EMPTY; - private QuickEditorRegion() { + public QuickEditorRegion() { this.setLayout(new BorderLayout()); } diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java index 1b95b85697..d6a5a9befb 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java @@ -10,6 +10,8 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.foldablepane.UIExpandablePane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.report.cell.DefaultTemplateCellElement; @@ -31,6 +33,9 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { private UICheckBox horizontalExpandableCheckBox; private UICheckBox verticalExpandableCheckBox; private SortExpandAttrPane sortAfterExpand; + private JPanel layoutPane; + private JPanel basicPane; + private JPanel seniorPane; /** * @@ -56,6 +61,17 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { } + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new CellExpandAttrPane().layoutPane(), BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(290, 400); + jf.setVisible(true); + } + private void initAllNames() { expandDirectionButton.setGlobalName(Inter.getLocText("ExpandD-Expand_Direction")); leftFatherPane.setGlobalName(Inter.getLocText("LeftParent")); @@ -65,24 +81,63 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { } private JPanel layoutPane() { + layoutPane = new JPanel(new BorderLayout()); + basicPane = new JPanel(); + seniorPane = new JPanel(); + basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"),290,20,basicPane()); + seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"),290,20,seniorPane()); + layoutPane.add(basicPane,BorderLayout.NORTH); + layoutPane.add(seniorPane,BorderLayout.CENTER); + return layoutPane; +// double f = TableLayout.FILL; +// double p = TableLayout.PREFERRED; +// Component[][] components = new Component[][]{ +// new Component[]{new UILabel(Inter.getLocText("ExpandD-Expand_Direction") + ":", SwingConstants.RIGHT), expandDirectionButton}, +// new Component[]{new UILabel(Inter.getLocText("LeftParent") + ":", SwingConstants.RIGHT), leftFatherPane}, +// new Component[]{new UILabel(Inter.getLocText("ExpandD-Up_Father_Cell") + ":", SwingConstants.RIGHT), rightFatherPane}, +// new Component[]{new JSeparator(), null}, +// new Component[]{new UILabel(Inter.getLocText("ExpandD-Expandable") + ":", SwingConstants.RIGHT), horizontalExpandableCheckBox}, +// new Component[]{null, verticalExpandableCheckBox}, +// new Component[]{new UILabel(Inter.getLocText("ExpandD-Sort_After_Expand") + ":", SwingConstants.RIGHT), sortAfterExpand}, +// }; +// double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p, p, p}; +// double[] columnSize = {p, f}; +// int[][] rowCount = {{1, 1}, {1, 3}, {1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 3}}; +// return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + } + + private JPanel basicPane(){ + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{null,null}, + new Component[]{new UILabel(" "+Inter.getLocText("ExpandD-Expand_Direction")+" ", SwingConstants.LEFT), expandDirectionButton}, + new Component[]{new UILabel(" "+Inter.getLocText("LeftParent"), SwingConstants.LEFT), leftFatherPane}, + new Component[]{new UILabel(" "+Inter.getLocText("ExpandD-Up_Father_Cell"), SwingConstants.LEFT), rightFatherPane}, + }; + double[] rowSize = {p, p, p, p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1},{1, 1}, {1, 3}, {1, 3}}; + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + } + + private JPanel seniorPane() { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("ExpandD-Expand_Direction") + ":", SwingConstants.RIGHT), expandDirectionButton}, - new Component[]{new UILabel(Inter.getLocText("LeftParent") + ":", SwingConstants.RIGHT), leftFatherPane}, - new Component[]{new UILabel(Inter.getLocText("ExpandD-Up_Father_Cell") + ":", SwingConstants.RIGHT), rightFatherPane}, - new Component[]{new JSeparator(), null}, - new Component[]{new UILabel(Inter.getLocText("ExpandD-Expandable") + ":", SwingConstants.RIGHT), horizontalExpandableCheckBox}, - new Component[]{null, verticalExpandableCheckBox}, - new Component[]{new UILabel(Inter.getLocText("ExpandD-Sort_After_Expand") + ":", SwingConstants.RIGHT), sortAfterExpand}, + new Component[]{null,null}, + new Component[]{horizontalExpandableCheckBox, null}, + new Component[]{verticalExpandableCheckBox, null}, + new Component[]{new UILabel(" "+Inter.getLocText("ExpandD-Sort_After_Expand") + Inter.getLocText("FR-Action_Sort"), SwingConstants.RIGHT), sortAfterExpand}, }; - double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p, p, p}; + double[] rowSize = {p, p, p, p, p, p, p, p}; double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 3}, {1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 3}}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 3}, {1, 3}}; return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); } + @Override protected void populateBean() { this.leftFatherPane.setElementCasePane(elementCasePane); @@ -120,9 +175,11 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { @Override public String getIconPath() { - return "com/fr/design/images/expand/cellAttr.gif"; +// return "com/fr/design/images/expand/cellAttr.gif"; + return Inter.getLocText("Expand"); } + @Override public void updateBean(TemplateCellElement cellElement) { CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 0e45a1e970..c5d7af1b1c 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -214,7 +214,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane { @Override public String getIconPath() { - return "com/fr/design/images/m_format/cellstyle/otherset.png"; +// return "com/fr/design/images/m_format/cellstyle/otherset.png"; + return Inter.getLocText("Other"); } @Override diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java index 0c357e30dd..d0f13c5d28 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java @@ -25,21 +25,22 @@ public class CellPresentPane extends AbstractCellAttrPane { */ public JPanel createContentPane() { presentPane = new PresentPane(); - JPanel content = new JPanel(new BorderLayout()); - content.add(presentPane, BorderLayout.CENTER); - presentPane.addTabChangeListener(new ItemListener() { + JPanel content = new JPanel(new BorderLayout()); + content.add(presentPane, BorderLayout.CENTER); + presentPane.addTabChangeListener(new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - adjustValues(); - } - }); - return content; + @Override + public void itemStateChanged(ItemEvent e) { + adjustValues(); + } + }); + return content; } @Override public String getIconPath() { - return "com/fr/design/images/data/source/dataDictionary.png"; +// return "com/fr/design/images/data/source/dataDictionary.png"; + return Inter.getLocText("Present"); } @Override diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index 563b26bba2..2d508c4f3c 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java @@ -2,12 +2,13 @@ package com.fr.design.mainframe.cell.settingpane; import java.awt.*; -import javax.swing.JPanel; +import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import com.fr.base.Style; import com.fr.design.mainframe.cell.settingpane.style.StylePane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; @@ -40,11 +41,24 @@ public class CellStylePane extends AbstractCellAttrPane { return content; } + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new CellStylePane().createContentPane(), BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(290, 400); + jf.setVisible(true); + } + @Override public String getIconPath() { - return "com/fr/design/images/m_format/cell.png"; +// return "com/fr/design/images/m_format/cell.png"; + return Inter.getLocText("FR-Designer_Style"); } + @Override public void updateBean(TemplateCellElement cellElement) { cellElement.setStyle(stylePane.updateBean()); diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 5658a318dc..a5d58ffc06 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -1802,7 +1802,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } writer.startTAG("Env"); - writer.classAttr(env.getClass()); +// writer.classAttr(env.getClass()); writer.attr("name", name); env.writeXML(writer); diff --git a/designer_base/src/com/fr/design/foldablepane/HeaderPane.java b/designer_base/src/com/fr/design/foldablepane/HeaderPane.java new file mode 100644 index 0000000000..b136d4b77a --- /dev/null +++ b/designer_base/src/com/fr/design/foldablepane/HeaderPane.java @@ -0,0 +1,111 @@ +package com.fr.design.foldablepane; + +import com.fr.design.constants.UIConstants; + +import java.awt.*; +import java.awt.image.BufferedImage; +import javax.swing.JPanel; + +/** + * Created by MoMeak on 2017/7/5. + */ +public class HeaderPane extends JPanel { + private static final long serialVersionUID = 1L; + private int headWidth = 280; + private int headHeight = 25; + private Color bgColor; + private boolean isShow; + private String title; + private Image image; + private int fontSize = 13; + public void setShow(boolean isShow) { + this.isShow = isShow; + } + + public void setTitle(String title) + { + this.title = title; + } + + public void setHeadWidth(int headwidth){ + this.headWidth = headwidth; + } + + public void setheadHeight(int headHeight){ + this.headHeight = headHeight; + } + + public void setFontSize(int fontSize){ + this.fontSize = fontSize; + } + + + @Override + protected void paintComponent(Graphics g) { + Graphics2D g2d = (Graphics2D) g.create(); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + BufferedImage panelImage = createPanelImage(); + g2d.drawImage(panelImage, null, 0, 0); + } + + private BufferedImage createPanelImage() { + BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB); + Graphics2D g2d = panelImage.createGraphics(); + + g2d.fillRect(0, 0, headWidth, headHeight); + g2d.drawImage(UIConstants.DRAG_BAR, 0, 0, headWidth, headHeight, null); + g2d.setFont(new Font("SimSun", 0, fontSize)); + g2d.setPaint(bgColor); +// g2d.drawString(this.title, fontSize/2, headHeight-fontSize/3); + g2d.drawString(this.title, 0, headHeight-fontSize/3); + if(this.isShow) + { + image = UIConstants.DRAG_DOWN_PRESS; + g2d.drawImage(image, title.length() * fontSize, headHeight/2-1, null); + } + else + { + image = UIConstants.DRAG_RIGHT_PRESS; + g2d.drawImage(image, title.length() * fontSize, headHeight/3, null); + } + + + return panelImage; + } + + @Override + public Dimension getPreferredSize() { + return new Dimension(this.getWidth(), headHeight); + } + + @Override + public Dimension getSize() { + return new Dimension(this.getWidth(), headHeight); + } + + public HeaderPane(Color bgColor) { + this.bgColor = bgColor; + this.isShow = true; + + } + + public HeaderPane(Color bgColor, String title , int headWidth, int headHeight) { + this(bgColor); + this.title = title; + this.headHeight = headHeight; + this.headWidth = headWidth; + } + + public static void main(String[] args) + { +// JFrame mainFrame = new JFrame("UI Demo - Gloomyfish"); +// mainFrame.getContentPane().setLayout(new BorderLayout()); +// mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本",280,25), BorderLayout.CENTER); +// mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// mainFrame.pack(); +// mainFrame.setSize(280, 400); +// mainFrame.setVisible(true); + } + +} diff --git a/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java b/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java new file mode 100644 index 0000000000..b6a908d333 --- /dev/null +++ b/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java @@ -0,0 +1,95 @@ +package com.fr.design.foldablepane; + +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +import javax.swing.*; + + +/** + * Created by MoMeak on 2017/7/5. + */ +public class UIExpandablePane extends JPanel { + private static final long serialVersionUID = 1L; + private HeaderPane headerPanel; + private JPanel contentPanel; + private Color color = Color.black; + private String title; + private int headWidth; + private int headHeight; + + + public UIExpandablePane(String title,int headWidth,int headHeight,JPanel contentPanel) + { + super(); + this.title = title; + this.headWidth = headWidth; + this.headHeight = headHeight; + this.contentPanel = contentPanel; + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + headerPanel = new HeaderPane(color, title,headWidth,headHeight); + headerPanel.addMouseListener(new PanelAction()); + this.add(headerPanel, BorderLayout.NORTH); + this.add(contentPanel, BorderLayout.CENTER); + setOpaque(false); + } + + class PanelAction extends MouseAdapter + { + public void mousePressed(MouseEvent e) + { + HeaderPane hp = (HeaderPane)e.getSource(); + if(contentPanel.isShowing()) + { + contentPanel.setVisible(false); + hp.setShow(false); + } + else + { + contentPanel.setVisible(true); + hp.setShow(true); + } + hp.getParent().validate(); + hp.getParent().repaint(); + } + } + + + public static void main(String[] args) + { +// JFrame jf = new JFrame("test"); +// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// JPanel content = (JPanel) jf.getContentPane(); +// content.setLayout(new BorderLayout()); +// +// JPanel myPanel = new JPanel(); +// myPanel.setLayout(new BorderLayout()); +// JPanel Panel = new JPanel(); +// Panel.setBackground(Color.blue); +// myPanel.add(new UIExpandablePane("基本",280,25,Panel),BorderLayout.CENTER); +//// myPanel.setLayout(new GridBagLayout()); +//// myPanel.add(new JExpandablePanel()); +//// GridBagConstraints gbc = new GridBagConstraints(); +//// JPanel[] panels = new JPanel[4]; // +//// gbc.insets = new Insets(1,3,0,3); +//// gbc.weightx = 1.0; +//// gbc.fill = GridBagConstraints.HORIZONTAL; +//// gbc.gridwidth = GridBagConstraints.REMAINDER; +//// for(int j = 0; j < panels.length; j++) +//// { +//// panels[j] = new JExpandablePanel(); +//// myPanel.add(panels[j], gbc); +//// } +// content.add(myPanel, BorderLayout.CENTER); +// GUICoreUtils.centerWindow(jf); +// jf.setSize(280, 400); +// jf.setVisible(true); + } + +} diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 96eccfc595..0c8633fbd0 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -5,7 +5,6 @@ import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.stable.Constants; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.stable.collections.utils.MathUtils; import javax.swing.*; import java.awt.*; @@ -19,7 +18,9 @@ public class UIResizableContainer extends JPanel { private int containerWidth = 240; private int preferredWidth = 240; private int toolPaneY = 300; + private int toolPaneHeightRight = 20; private int toolPaneHeight = 10; + private int clickToolPaneHeight = 40; private int bottomHeight = 30; private JComponent upPane; @@ -28,7 +29,7 @@ public class UIResizableContainer extends JPanel { private JComponent parameterPane = new JPanel(); private HorizotalToolPane horizontToolPane; - private VerticalToolPane verticalToolPane; + private VerticalToolPaneRight verticalToolPane; private int direction; private boolean hasParameterPane; @@ -45,7 +46,7 @@ public class UIResizableContainer extends JPanel { private boolean isDownPaneVisible = true ; private int paraHeight; - public UIResizableContainer(int direction) { + public UIResizableContainer(int direction) { this(new JPanel(), new JPanel(), direction); } @@ -79,13 +80,12 @@ public class UIResizableContainer extends JPanel { public UIResizableContainer(JComponent upPane, JComponent downPane, int direction) { setBackground(UIConstants.NORMAL_BACKGROUND); - this.upPane = upPane; this.direction = direction; this.downPane = downPane; this.horizontToolPane = new HorizotalToolPane(); - this.verticalToolPane = new VerticalToolPane(); + this.verticalToolPane = new VerticalToolPaneRight(); setLayout(containerLayout); add(upPane); @@ -94,6 +94,23 @@ public class UIResizableContainer extends JPanel { add(verticalToolPane); } + public static void main(String... args) { + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + + UIResizableContainer bb = new UIResizableContainer(1); + JPanel cc = new JPanel(); + cc.setBackground(Color.white); + + content.add(bb, BorderLayout.EAST); + content.add(cc, BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(500, 500); + jf.setVisible(true); + } + public UIResizableContainer(JComponent upPane, int direction) { setBackground(UIConstants.NORMAL_BACKGROUND); @@ -101,17 +118,17 @@ public class UIResizableContainer extends JPanel { this.direction = direction; this.horizontToolPane = new HorizotalToolPane(); + setLayout(containerLayout); add(upPane); add(horizontToolPane); - } public void setDownPane(JComponent downPane) { if (this.downPane != null){ return; } - this.verticalToolPane = new VerticalToolPane(); + this.verticalToolPane = new VerticalToolPaneRight(); this.downPane = downPane; add(downPane); add(verticalToolPane); @@ -232,6 +249,11 @@ public class UIResizableContainer extends JPanel { upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, getHeight() - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); } + }else { + parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());//10,0,230,462 + upPane.setBounds(0, toolPaneHeightRight, containerWidth, getHeight() - toolPaneHeightRight);//20,0,230,0 + verticalToolPane.setBounds(0, 0, containerWidth, toolPaneHeightRight);//0,0,10,462 + } } @@ -488,6 +510,7 @@ public class UIResizableContainer extends JPanel { public void paint(Graphics g) { Image button; if (direction == Constants.RIGHT) { +// g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { if (model == UIConstants.MODEL_NORMAL) { @@ -526,22 +549,134 @@ public class UIResizableContainer extends JPanel { } } + private class VerticalToolPaneRight extends JPanel { + private int model = UIConstants.MODEL_NORMAL; + + public VerticalToolPaneRight() { + super(); + addMouseMotionListener(new MouseMotionListener() { + + @Override + public void mouseMoved(MouseEvent e) { + if (e.getY() <= ARROW_RANGE_VERTICAL) { + setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + model = UIConstants.MODEL_PRESS; + } else if (isLeftRightDragEnabled) { + setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)); + } + repaint(); + } + + @Override + public void mouseDragged(MouseEvent e) { + if (!isLeftRightDragEnabled) { + return; + } + upPane.setVisible(true); + downPane.setVisible(true); + if (direction == Constants.RIGHT) { + containerWidth = e.getXOnScreen() - UIResizableContainer.this.getLocationOnScreen().x; + } else if (direction == Constants.LEFT) { + containerWidth = UIResizableContainer.this.getWidth() + (UIResizableContainer.this.getLocationOnScreen().x - e.getXOnScreen()); + } + + containerWidth = containerWidth > MAX_WIDTH ? MAX_WIDTH : containerWidth; + containerWidth = containerWidth < MIN_WIDTH ? MIN_WIDTH : containerWidth; + if (containerWidth < MIN_WIDTH) { + upPane.setVisible(false); + downPane.setVisible(false); + containerWidth = toolPaneHeight; + } + refreshContainer(); + if (BaseUtils.isAuthorityEditing()) { + DesignerContext.getDesignerFrame().doResize(); + } + + + } + }); + addMouseListener(new MouseAdapter() { + @Override + public void mouseEntered(MouseEvent e) { + if (!isLeftRightDragEnabled) { + return; + } + setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)); + } + + @Override + public void mouseExited(MouseEvent e) { + setCursor(Cursor.getDefaultCursor()); + model = UIConstants.MODEL_NORMAL; + repaint(); + } + + @Override + public void mouseClicked(MouseEvent e) { + if (e.getY() <= ARROW_RANGE_VERTICAL) { + if (containerWidth == clickToolPaneHeight) { + containerWidth = preferredWidth; + } else { + setPreferredWidth(containerWidth); + containerWidth = clickToolPaneHeight; + } + refreshContainer(); + if (BaseUtils.isAuthorityEditing()) { + DesignerContext.getDesignerFrame().doResize(); + } + } + } + }); + } + + @Override + public void paint(Graphics g) { + Image button; + if (direction == Constants.RIGHT) { + g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); + if (containerWidth == toolPaneHeight) { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_RIGHT_NORMAL; + } else { + button = UIConstants.DRAG_RIGHT_PRESS; + } + } else { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_LEFT_NORMAL; + } else { + button = UIConstants.DRAG_LEFT_PRESS; + } + } + g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); + if (isLeftRightDragEnabled) { + g.drawImage(UIConstants.DRAG_DOT_VERTICAL, 2, getHeight() / 2, 5, toolPaneHeight, null); + } + } else { + g.drawImage(UIConstants.DRAG_BAR, 0, 0, containerWidth, toolPaneHeightRight, null); +// g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); + if (containerWidth == clickToolPaneHeight) { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_LEFT_NORMAL; + } else { + button = UIConstants.DRAG_LEFT_PRESS; + } + } else { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_RIGHT_NORMAL; + } else { + button = UIConstants.DRAG_RIGHT_PRESS; + } + } +// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); + g.drawImage(button, 14, 7, 5, 5, null); + } + + } + } + /** * 主函数 * @param args 参数 */ - public static void main(String... args) { - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - UIResizableContainer bb = new UIResizableContainer(Constants.RIGHT); - JPanel cc = new JPanel(); - cc.setBackground(Color.blue); - content.add(bb, BorderLayout.EAST); - content.add(cc, BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(500, 500); - jf.setVisible(true); - } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java index 440d8fcef1..ced48d50d3 100644 --- a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java +++ b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java @@ -1,9 +1,15 @@ package com.fr.design.gui.style; +import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.design.ExtraDesignClassManager; +import com.fr.design.constants.LayoutConstants; import com.fr.design.fun.BackgroundQuickUIProvider; +import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.backgroundpane.*; import com.fr.general.Background; import com.fr.general.Inter; @@ -35,7 +41,7 @@ public class BackgroundPane extends AbstractBasicStylePane { this.setLayout(new BorderLayout(0, 6)); typeComboBox = new UIComboBox(); final CardLayout cardlayout = new CardLayout(); - this.add(typeComboBox, BorderLayout.NORTH); +// this.add(typeComboBox, BorderLayout.NORTH); paneList = supportKindsOfBackgroundUI(); @@ -50,7 +56,7 @@ public class BackgroundPane extends AbstractBasicStylePane { typeComboBox.addItem(pane.title4PopupWindow()); centerPane.add(pane, pane.title4PopupWindow()); } - this.add(centerPane, BorderLayout.CENTER); +// this.add(centerPane, BorderLayout.CENTER); typeComboBox.addItemListener(new ItemListener() { @Override @@ -59,6 +65,20 @@ public class BackgroundPane extends AbstractBasicStylePane { fireStateChanged(); } }); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill") + " ", SwingConstants.LEFT),typeComboBox}, + new Component[]{null, centerPane} + }; + double[] rowSize = {p, p, p}; + double[] columnSize = {p,f}; + int[][] rowCount = {{1, 1},{1, 1},{1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); + this.add(panel, BorderLayout.CENTER); + } protected BackgroundQuickPane[] supportKindsOfBackgroundUI() { diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index cb37f1c1a1..43238c3484 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -9,8 +9,11 @@ import java.awt.Color; import java.awt.Component; import java.awt.GridLayout; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; + +import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -21,6 +24,7 @@ import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; @@ -45,22 +49,28 @@ public class BorderPane extends AbstractBasicStylePane { private LineComboBox currentLineCombo; private NewColorSelectBox currentLineColorPane; + private JPanel panel; + private JPanel borderPanel; + private JPanel backgroundPanel; + private BackgroundPane backgroundPane; public BorderPane() { this.initComponents(); } + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new BorderPane(), BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(290, 400); + jf.setVisible(true); + } protected void initComponents() { initButtonsWithIcon(); this.setLayout(new BorderLayout(0, 6)); - double p = TableLayout.PREFERRED, f = TableLayout.FILL; - double[] columnSize1 = {p, f}, rowSize1 = {p, p}; - Component[][] components1 = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Style") + ":"), currentLineCombo}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Color") + ":"), currentLineColorPane}, - }; - JPanel northPane = TableLayoutHelper.createTableLayoutPane(components1, rowSize1, columnSize1); - double[] columnSize2 = {p, f}, rowSize2 = {p, p}; JPanel externalPane = new JPanel(new GridLayout(0, 4)); externalPane.add(topToggleButton); externalPane.add(leftToggleButton); @@ -69,14 +79,32 @@ public class BorderPane extends AbstractBasicStylePane { JPanel insidePane = new JPanel(new GridLayout(0, 2)); insidePane.add(horizontalToggleButton); insidePane.add(verticalToggleButton); - Component[][] components2 = new Component[][]{ - new Component[]{outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png")), innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))}, - new Component[]{externalPane, insidePane,} + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Style") + " ", SwingConstants.LEFT), currentLineCombo}, + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Color") + " ", SwingConstants.LEFT), currentLineColorPane}, + new Component[]{null,null}, + new Component[]{new UILabel("外边框 ", SwingConstants.LEFT),outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"))}, + new Component[]{null,externalPane}, + new Component[]{null,null}, + new Component[]{new UILabel("内边框 ", SwingConstants.LEFT),innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))}, + new Component[]{null,insidePane}, + new Component[]{null,null} }; - JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components2, rowSize2, columnSize2); - this.setLayout(new BorderLayout(0, 6)); - this.add(northPane, BorderLayout.NORTH); - this.add(centerPane, BorderLayout.CENTER); + double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p}; + double[] columnSize = {p,f}; + int[][] rowCount = {{1, 1},{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); + borderPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Border"),280,20,panel); + this.add(borderPanel,BorderLayout.NORTH); + + backgroundPane = new BackgroundPane(); + backgroundPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Background"),280,20,backgroundPane); + this.add(backgroundPanel,BorderLayout.CENTER); + outerToggleButton.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { @@ -113,7 +141,8 @@ public class BorderPane extends AbstractBasicStylePane { return Inter.getLocText("FR-Designer_Border"); } - public void populate(Style style) { + @Override + public void populateBean(Style style) { if (style == null) { style = Style.DEFAULT_STYLE; } @@ -127,8 +156,9 @@ public class BorderPane extends AbstractBasicStylePane { cellBorderStyle.setBottomColor(style.getBorderBottomColor()); cellBorderStyle.setRightStyle(style.getBorderRight()); cellBorderStyle.setRightColor(style.getBorderRightColor()); - + this.backgroundPane.populateBean(style.getBackground()); this.populateBean(cellBorderStyle, false, style.getBorderTop(), style.getBorderTopColor()); + } public void populateBean(CellBorderStyle cellBorderStyle, boolean insideMode, int currentStyle, Color currentColor) { @@ -151,10 +181,10 @@ public class BorderPane extends AbstractBasicStylePane { this.innerToggleButton.setEnabled(this.insideMode); this.horizontalToggleButton.setEnabled(this.insideMode); this.verticalToggleButton.setEnabled(this.insideMode); - } public Style update(Style style) { +// style = style.deriveBackground(backgroundPane.update()); if (style == null) { style = Style.DEFAULT_STYLE; } @@ -163,7 +193,6 @@ public class BorderPane extends AbstractBasicStylePane { style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); - return style; } diff --git a/designer_base/src/com/fr/design/gui/style/FRFontPane.java b/designer_base/src/com/fr/design/gui/style/FRFontPane.java index 2dafb005dc..bfe86801f6 100644 --- a/designer_base/src/com/fr/design/gui/style/FRFontPane.java +++ b/designer_base/src/com/fr/design/gui/style/FRFontPane.java @@ -7,6 +7,7 @@ package com.fr.design.gui.style; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.Vector; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -37,12 +38,15 @@ import com.fr.design.utils.gui.GUICoreUtils; * Pane to edit Font. */ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObserver { + private static final int MAX_FONT_SIZE = 100; public static Integer[] FONT_SIZES = {new Integer(6), new Integer(8), new Integer(9), new Integer(10), new Integer(11), new Integer(12), new Integer(14), new Integer(16), new Integer(18), new Integer(20), new Integer(22), new Integer(24), new Integer(26), new Integer(28), new Integer(36), new Integer(48), new Integer(72)}; - private static final Dimension BUTTON_SIZE = new Dimension(24, 20); + private static final Dimension BUTTON_SIZE = new Dimension(20, 18); + private final String[] fontSizeStyles = {Inter.getLocText("FRFont-plain"), Inter.getLocText("FRFont-bold"), Inter.getLocText("FRFont-italic"), Inter.getLocText("FRFont-bolditalic")}; private JPanel buttonPane; private JPanel isSuperOrSubPane; private UIComboBox fontNameComboBox; + private UIComboBox fontSizeStyleComboBox; private UIComboBox fontSizeComboBox; private UIToggleButton bold; private UIToggleButton italic; @@ -58,11 +62,24 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private UIToggleButton superPane; private UIToggleButton subPane; private JPanel linePane; + private int italic_bold; public FRFontPane() { this.initComponents(); } + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new FRFontPane(), BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(290, 400); + jf.setVisible(true); + } + + @Override protected String title4PopupWindow() { return Inter.getLocText("Sytle-FRFont"); @@ -73,7 +90,8 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse */ public void populateBean(FRFont frFont) { fontNameComboBox.setSelectedItem(frFont.getFamily()); - fontSizeComboBox.setSelectedItem(frFont.getSize()); + fontSizeStyleComboBox.setSelectedIndex(frFont.getStyle()); + fontSizeComboBox.setSelectedItem(Utils.round5(frFont.getSize2D())); bold.setSelected(frFont.isBold()); italic.setSelected(frFont.isItalic()); @@ -115,8 +133,11 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Family"))) { frFont = frFont.applyName((String) fontNameComboBox.getSelectedItem()); } + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Style"))) { + frFont = frFont.applyStyle(fontSizeStyleComboBox.getSelectedIndex()); + } if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Size"))) { - frFont = frFont.applySize((Integer) fontSizeComboBox.getSelectedItem()); + frFont = frFont.applySize(Float.parseFloat(fontSizeComboBox.getSelectedItem().toString())); } if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Foreground"))) { frFont = frFont.applyForeground(this.colorSelectPane.getColor()); @@ -147,7 +168,6 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private FRFont updateOthers(FRFont frFont) { - frFont = updateItalicBold(frFont); frFont = updateSubSuperscript(frFont); return frFont; } @@ -176,29 +196,6 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse return frFont; } - private FRFont updateItalicBold(FRFont frFont) { - int italic_bold = frFont.getStyle(); - boolean isItalic = italic_bold == Font.ITALIC || italic_bold == (Font.BOLD + Font.ITALIC); - boolean isBold = italic_bold == Font.BOLD || italic_bold == (Font.BOLD + Font.ITALIC); - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-italic"))) { - if (italic.isSelected() && !isItalic) { - italic_bold += Font.ITALIC; - } else if (!italic.isSelected() && isItalic) { - italic_bold -= Font.ITALIC; - } - frFont = frFont.applyStyle(italic_bold); - } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-bold"))) { - if (bold.isSelected() && !isBold) { - italic_bold += Font.BOLD; - } else if (!bold.isSelected() && isBold) { - italic_bold -= Font.BOLD; - } - frFont = frFont.applyStyle(italic_bold); - } - return frFont; - } - @Override public void populateBean(Style style) { this.populateBean(style.getFRFont()); @@ -212,10 +209,20 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse return style.deriveFRFont(frFont); } + public static Vector getFontSizes(){ + Vector FONT_SIZES = new Vector(); + for (int i = 1; i < MAX_FONT_SIZE; i++) { + FONT_SIZES.add(i); + } + return FONT_SIZES; + } + protected void initComponents() { + fontSizeStyleComboBox = new UIComboBox(fontSizeStyles); fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); fontNameComboBox.setPreferredSize(new Dimension(144, 20)); - fontSizeComboBox = new UIComboBox(FONT_SIZES); + fontSizeComboBox = new UIComboBox(getFontSizes()); + fontSizeComboBox.setEditable(true); this.underlineCombo = new LineComboBox(UIConstants.BORDER_LINE_STYLE_ARRAY); colorSelectPane = new UIColorButton(); bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); @@ -229,26 +236,31 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse isShadowCheckBox = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/shadow.png")); isShadowCheckBox.setPreferredSize(BUTTON_SIZE); superPane = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/sup.png")); - superPane.setPreferredSize(new Dimension(22, 18)); + superPane.setPreferredSize(BUTTON_SIZE); subPane = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/sub.png")); - subPane.setPreferredSize(new Dimension(22, 18)); + subPane.setPreferredSize(BUTTON_SIZE); isSuperOrSubPane = new TwoButtonPane(superPane, subPane); +// Component[] components_font = new Component[]{ +// colorSelectPane, italic, bold, underline, isStrikethroughCheckBox, isShadowCheckBox +// }; Component[] components_font = new Component[]{ - colorSelectPane, italic, bold, underline, isStrikethroughCheckBox, isShadowCheckBox + colorSelectPane, underline, isStrikethroughCheckBox, isShadowCheckBox }; buttonPane = new JPanel(new BorderLayout()); buttonPane.add(GUICoreUtils.createFlowPane(components_font, FlowLayout.LEFT, LayoutConstants.HGAP_SMALL)); - buttonPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); +// buttonPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); linePane = new JPanel(new CardLayout()); initAllNames(); setToolTips(); this.setLayout(new BorderLayout()); + this.add(fontNameComboBox, BorderLayout.NORTH); this.add(createPane(), BorderLayout.CENTER); DefaultValues defaultValues = FRContext.getDefaultValues(); populateBean(defaultValues.getFRFont()); } private void initAllNames() { + fontSizeStyleComboBox.setGlobalName(Inter.getLocText("FRFont-Style")); fontNameComboBox.setGlobalName(Inter.getLocText("FRFont-Family")); fontSizeComboBox.setGlobalName(Inter.getLocText("FRFont-Size")); colorSelectPane.setGlobalName(Inter.getLocText("FRFont-Foreground")); @@ -292,10 +304,11 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private JPanel createLeftPane() { double p = TableLayout.PREFERRED; - double[] columnSize = {p}; + double f = TableLayout.FILL; + double[] columnSize = {f}; double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ - new Component[]{fontNameComboBox}, + new Component[]{fontSizeStyleComboBox}, new Component[]{buttonPane}, new Component[]{createLinePane()} }; @@ -317,9 +330,10 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private JPanel createPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = {p}; + double[] columnSize = {f, f}; + double[] rowSize = {p,p}; Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{createLeftPane(), createRightPane()}, }; return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -349,7 +363,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse public TwoButtonPane(UIToggleButton leftButton, UIToggleButton rightButton) { this.leftButton = leftButton; this.rightButton = rightButton; - this.setLayout(new FlowLayout(FlowLayout.RIGHT, 1, 0)); + this.setLayout(new FlowLayout(FlowLayout.LEFT, 1, 0)); this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); initButton(leftButton); initButton(rightButton); diff --git a/designer_base/src/com/fr/design/gui/style/FormatPane.java b/designer_base/src/com/fr/design/gui/style/FormatPane.java index c426bbed26..7dc5f108fe 100644 --- a/designer_base/src/com/fr/design/gui/style/FormatPane.java +++ b/designer_base/src/com/fr/design/gui/style/FormatPane.java @@ -7,27 +7,24 @@ import com.fr.base.TextFormat; import com.fr.data.core.FormatField; import com.fr.data.core.FormatField.FormatContents; import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; -import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; 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.general.ComparatorUtils; import com.fr.general.Inter; -import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.TitledBorder; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; import java.awt.*; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; +import java.awt.event.*; import java.text.Format; import java.text.SimpleDateFormat; @@ -37,7 +34,7 @@ import java.text.SimpleDateFormat; * @author zhou * @since 2012-5-24上午10:57:00 */ -public class FormatPane extends AbstractBasicStylePane { +public class FormatPane extends AbstractBasicStylePane{ private static final long serialVersionUID = 724330854437726751L; private static final int LABLE_X = 4; @@ -54,13 +51,16 @@ public class FormatPane extends AbstractBasicStylePane { private Format format; private UIComboBox typeComboBox; + private UIComboBox textField; private UILabel sampleLabel; - - private FormatePaneNumField patternTextField = null; - private JList patternList = null; + private JPanel contentPane; + private JPanel txtCenterPane; private JPanel centerPane; + private JPanel formatFontPane; + private FRFontPane frFontPane; private boolean isRightFormate; private boolean isDate = false; + private boolean isFormat = false; /** * Constructor. */ @@ -68,40 +68,70 @@ public class FormatPane extends AbstractBasicStylePane { this.initComponents(TYPES); } + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new FormatPane(), BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(290, 400); + jf.setVisible(true); + } + protected void initComponents(Integer[] types) { this.setLayout(new BorderLayout(0, 4)); iniSampleLable(); - JPanel contentPane = new JPanel(new BorderLayout(0, 4)) { + contentPane = new JPanel(new BorderLayout(0, 4)) { @Override public Dimension getPreferredSize() { - return new Dimension(super.getPreferredSize().width, 185); + return new Dimension(super.getPreferredSize().width, 70); } - }; typeComboBox = new UIComboBox(types); + UIComboBoxRenderer render = createComBoxRender(); typeComboBox.setRenderer(render); typeComboBox.addItemListener(itemListener); contentPane.add(sampleLabel, BorderLayout.NORTH); - this.add(typeComboBox, BorderLayout.NORTH); +// this.add(typeComboBox, BorderLayout.NORTH); centerPane = new JPanel(new CardLayout()); centerPane.add(new JPanel(), "hide"); + centerPane.setPreferredSize(new Dimension(0, 0) ); centerPane.add(contentPane, "show"); - this.add(centerPane, BorderLayout.CENTER); + + formatFontPane = new JPanel(new BorderLayout()); + formatFontPane.add(centerPane, BorderLayout.NORTH); + formatFontPane.add(new FRFontPane(), BorderLayout.CENTER); + +// this.add(formatFontPane, BorderLayout.CENTER); // content pane. - JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - contentPane.add(centerPane, BorderLayout.CENTER); - patternTextField = new FormatePaneNumField(); - centerPane.add(patternTextField, BorderLayout.NORTH); - patternTextField.getDocument().addDocumentListener(patternTextDocumentListener); - patternList = new JList(new DefaultListModel()); - centerPane.add(new UIScrollPane(patternList), BorderLayout.CENTER); - patternList.addListSelectionListener(patternListSelectionListener); - patternList.setSelectionBackground(UIConstants.LIGHT_BLUE); - patternList.setSelectionForeground(Color.black); - // init values. + txtCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + contentPane.add(txtCenterPane, BorderLayout.CENTER); + + textField = new UIComboBox(FormatField.getInstance().getFormatArray(getFormatContents())); + textField.addItemListener(textFieldItemListener); + textField.setEditable(true); + txtCenterPane.add(textField, BorderLayout.NORTH); + + frFontPane = new FRFontPane(); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("FR-Base_Format")+" ", SwingConstants.LEFT), typeComboBox }, + new Component[]{null,centerPane}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_FRFont"), SwingConstants.LEFT), frFontPane}, + new Component[]{null,null} + }; + double[] rowSize = {p, p, p, p, p}; + double[] columnSize = {p,f}; + int[][] rowCount = {{1, 1},{1, 1}, {1, 1}, {1, 3}, {1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); + this.add(panel,BorderLayout.CENTER); } @@ -187,7 +217,6 @@ public class FormatPane extends AbstractBasicStylePane { } else { setPatternComboBoxAndList(FormatContents.NUMBER, pattern); } - patternTextField.setText(pattern); } else if (format instanceof SimpleDateFormat) { // date and time String pattern = ((SimpleDateFormat) format).toPattern(); if (!isTimeType(pattern)) { @@ -195,7 +224,6 @@ public class FormatPane extends AbstractBasicStylePane { } else { setPatternComboBoxAndList(FormatContents.TIME, pattern); } - patternTextField.setText(pattern); } else if (format instanceof TextFormat) { // Text this.typeComboBox.setSelectedItem(FormatContents.TEXT); } @@ -224,9 +252,9 @@ public class FormatPane extends AbstractBasicStylePane { this.typeComboBox.setSelectedItem(formatStyle); int i = isArrayContainPattern(FormatField.getInstance().getFormatArray(formatStyle), pattern); if (i == -1) { - this.patternList.setSelectedIndices(ArrayUtils.EMPTY_INT_ARRAY); + this.textField.setSelectedIndex(0); } else { - this.patternList.setSelectedIndex(i); + this.textField.setSelectedIndex(i); } } @@ -238,7 +266,7 @@ public class FormatPane extends AbstractBasicStylePane { * update */ public Format update() { - String patternString = patternTextField.getText(); + String patternString = String.valueOf(textField.getSelectedItem()); if (getFormatContents() == FormatContents.TEXT) { return FormatField.getInstance().getFormat(getFormatContents(), patternString); } @@ -262,10 +290,10 @@ public class FormatPane extends AbstractBasicStylePane { this.sampleLabel.setForeground(UIManager.getColor("Label.foreground")); try { isRightFormate = true; - if (StringUtils.isEmpty(patternTextField.getText())) { + if (StringUtils.isEmpty(String.valueOf(textField.getSelectedItem()))) { return; } - this.sampleLabel.setText(FormatField.getInstance().getFormatValue(getFormatContents(), patternTextField.getText())); + this.sampleLabel.setText(FormatField.getInstance().getFormatValue(getFormatContents(), String.valueOf(textField.getSelectedItem()))); } catch (Exception e) { this.sampleLabel.setForeground(Color.red); this.sampleLabel.setText(e.getMessage()); @@ -285,55 +313,37 @@ public class FormatPane extends AbstractBasicStylePane { @Override public void itemStateChanged(ItemEvent e) { - int contents = getFormatContents(); - CardLayout cardLayout = (CardLayout) centerPane.getLayout(); - if (isTextOrNull()) { - cardLayout.show(centerPane, "hide"); - patternTextField.setText(""); - } else { - cardLayout.show(centerPane, "show"); - } - - String[] patternArray = FormatField.getInstance().getFormatArray(contents, false); - // - DefaultListModel patternModel = (DefaultListModel) patternList.getModel(); - patternModel.removeAllElements(); - - for (int i = 0; i < patternArray.length; i++) { - patternModel.addElement(patternArray[i]); + if(e.getStateChange() == ItemEvent.SELECTED){ + int contents = getFormatContents(); + String[] items = FormatField.getInstance().getFormatArray(contents); + CardLayout cardLayout = (CardLayout) centerPane.getLayout(); + + if (isTextOrNull()) { + centerPane.setPreferredSize(new Dimension(0, 0) ); + cardLayout.show(centerPane, "hide"); + } else { + textField.removeAllItems(); + long begin = System.currentTimeMillis(); + for (int i = 0; i < items.length; i++) { + textField.addItem(items[i]); + } + long end = System.currentTimeMillis(); + System.out.println(end-begin+"ms"); + centerPane.setPreferredSize(new Dimension(270, 70) ); + cardLayout.show(centerPane, "show"); + } + isFormat = true; } - if (patternModel.size() > 0) { - patternList.setSelectedIndex(0); - } } - }; - /** - * text pattern document listener. - */ - DocumentListener patternTextDocumentListener = new DocumentListener() { - - public void insertUpdate(DocumentEvent evt) { - refreshPreviewLabel(); - } - - public void removeUpdate(DocumentEvent evt) { - refreshPreviewLabel(); - } - - public void changedUpdate(DocumentEvent evt) { - refreshPreviewLabel(); - } - }; - /** - * Pattern list selection listener. - */ - ListSelectionListener patternListSelectionListener = new ListSelectionListener() { - public void valueChanged(ListSelectionEvent evt) { - if (!evt.getValueIsAdjusting()) { - patternTextField.setText((String) patternList.getSelectedValue()); + ItemListener textFieldItemListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if(e.getStateChange() == ItemEvent.SELECTED){ + isFormat = true; + refreshPreviewLabel(); } } }; @@ -344,6 +354,8 @@ public class FormatPane extends AbstractBasicStylePane { */ public void populateBean(Style style) { this.populateBean(style.getFormat()); + isFormat = false; + this.frFontPane.populateBean(style.getFRFont()); } @Override @@ -351,7 +363,12 @@ public class FormatPane extends AbstractBasicStylePane { * update */ public Style update(Style style) { - return style.deriveFormat(this.update()); + if (isFormat){ + isFormat = false; + return style.deriveFormat(this.update()); + } else { + return style.deriveFRFont(this.frFontPane.update(style.getFRFont())); + } } /** @@ -401,4 +418,5 @@ public class FormatPane extends AbstractBasicStylePane { } } } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/menu/MenuManager.java b/designer_base/src/com/fr/design/menu/MenuManager.java index 18d6b0e022..0f1401ace0 100644 --- a/designer_base/src/com/fr/design/menu/MenuManager.java +++ b/designer_base/src/com/fr/design/menu/MenuManager.java @@ -138,12 +138,12 @@ public class MenuManager extends XMLFileManager { if (name.isEmpty()) { return; } - try { - MenuAction action = (MenuAction) reader.getAttrAsClass().newInstance(); - menu.addShortCut(action); - } catch (Exception exp) { - FRLogger.getLogger().error(exp.getMessage(), exp); - } +// try { +// MenuAction action = (MenuAction) reader.getAttrAsClass().newInstance(); +// menu.addShortCut(action); +// } catch (Exception exp) { +// FRLogger.getLogger().error(exp.getMessage(), exp); +// } } else if (reader.getTagName().equals("Menu")) { final MenuDef submenu = new MenuDef(); String tmpVal = StringUtils.EMPTY; diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java index d844631c05..21a778f1a2 100644 --- a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -19,7 +19,7 @@ import com.fr.general.GeneralUtils; import com.fr.general.Inter; import com.fr.general.data.DataModel; import com.fr.stable.StringUtils; -import org.apache.batik.swing.svg.SVGFileFilter; +//import org.apache.batik.swing.svg.SVGFileFilter; import javax.swing.*; import java.awt.*; @@ -107,7 +107,7 @@ refreshAreaNameBox(); public void actionPerformed(ActionEvent evt) { JFileChooser svgFileChooser = new JFileChooser(); - svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); +// svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); if (StringUtils.isNotBlank(lastSelectPath)) { svgFileChooser.setSelectedFile(new File(lastSelectPath)); } From 202f482b7e0b533fa63d8512f420f673642ca08f Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 12 Jul 2017 16:07:45 +0800 Subject: [PATCH 025/101] update --- .../mainframe/CellElementPropertyPane.java | 41 ------------------- .../mainframe/cell/CellElementEditPane.java | 3 -- .../com/fr/design/gui/style/BorderPane.java | 2 +- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index 6785b17f98..96ca02a5e3 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -11,13 +11,9 @@ import com.fr.base.BaseUtils; import com.fr.design.fun.CellAttributeProvider; import com.fr.design.fun.PresentKindProvider; import com.fr.design.gui.frpane.UITitlePanel; -import com.fr.design.gui.ibutton.UIHeadGroup; -import com.fr.design.gui.ibutton.UISideGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itabpane.TitleChangeListener; import com.fr.design.mainframe.cell.CellElementEditPane; -import com.fr.design.mainframe.cell.settingpane.AbstractCellAttrPane; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.grid.selection.CellSelection; @@ -87,43 +83,6 @@ public class CellElementPropertyPane extends DockingView { } }; - public static void main(String[] args){ - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - GUICoreUtils.centerWindow(jf); - final JPanel jPanel = (JPanel) jf.getContentPane(); - jPanel.setLayout(new BorderLayout()); - final CardLayout card = new CardLayout(); - final JPanel center = new JPanel(); - center.setLayout( new CardLayout()); - - final JPanel content = new JPanel(); - content.setLayout(new BorderLayout()); - final CellElementPropertyPane pane = new CellElementPropertyPane(); - content.add(new CellElementPropertyPane(), BorderLayout.CENTER); - Icon[] iconArray = new Icon[2]; - iconArray[0] = BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"); - center.add(content,content.getUIClassID()); - iconArray[1] = BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"); - center.add(new JPanel(),""); -// for (int i = 0; i < 4; i++) { -// iconArray[0] = BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"); -// center.add(content,content.getUIClassID()); -// } - - - final TitleChangeListener titleChangeListener = null; - UISideGroup tabsHeaderIconPane = new UISideGroup(iconArray) { - }; - JPanel j1 = new JPanel(); - j1.setLayout(new GridLayout(10,1)); - j1.add(tabsHeaderIconPane); - tabsHeaderIconPane.setNeedLeftRightOutLine(false); - jPanel.add(j1, BorderLayout.WEST); - jPanel.add(center,BorderLayout.CENTER); - jf.setSize(500, 500); - jf.setVisible(true); - } private CellElementPropertyPane() { this.setLayout(new BorderLayout()); diff --git a/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java b/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java index 8d3980a48d..07f95d54f9 100644 --- a/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java +++ b/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java @@ -13,9 +13,6 @@ import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itabpane.TitleChangeListener; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.mainframe.EastTopArrow; import com.fr.design.mainframe.cell.settingpane.*; import com.fr.design.dialog.BasicPane; import com.fr.design.utils.gui.GUICoreUtils; diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index 43238c3484..d214198a8f 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -184,7 +184,7 @@ public class BorderPane extends AbstractBasicStylePane { } public Style update(Style style) { -// style = style.deriveBackground(backgroundPane.update()); + style = style.deriveBackground(backgroundPane.update()); if (style == null) { style = Style.DEFAULT_STYLE; } From faf7195c9b9070f86f2856a6aff95924d48bcfba Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 12 Jul 2017 19:55:01 +0800 Subject: [PATCH 026/101] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20=E5=9B=BD=E9=99=85=E5=8C=96=E5=B0=91=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 1 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 2 ++ .../src/com/fr/design/locale/designer_ko_KR.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 2 ++ .../src/com/fr/design/locale/designer_zh_TW.properties | 2 ++ 6 files changed, 9 insertions(+) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 836b30c98d..bebb719d75 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2003,3 +2003,4 @@ FR-Product_Demo=Demo FR-Designer_Tree_Data_Field=Tree Data Field FR-Designer_Data_Filter=Data Filter Default=Default +FR-Base-Load_Resource_File=Load resource file 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 c545b6f7e1..fc7eb13c98 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 @@ -2004,3 +2004,4 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according to the pa FR-Product_Demo=Demo FR-Designer_Data_Filter=Data Filter Default=Default +FR-Base-Load_Resource_File=Load Configuration File 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 3ebf48af52..a7121617c0 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 @@ -2003,3 +2003,5 @@ FR-Product_Demo=\u88FD\u54C1\u30C7\u30E2 FR-Designer_Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF FR-Designer_Can_not_use_FormatBursh=\u9023\u7D9A\u3057\u306A\u3044\u8907\u6570\u9818\u57DF\u3067\u306F\u66F8\u5F0F\u30B3\u30D4\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 Default=\u65E2\u5B9A +FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9 + 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 069cb57a8c..50adf67cee 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 @@ -2003,3 +2003,4 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\uC120\uD0DD\uD55C\uB370\uC774 FR-Product_Demo=\uC81C\uD488\uC2DC\uC5F0 FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4 Default=\uAE30\uBCF8 +FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C 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 dddd287f34..8e669cfe0c 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 @@ -2003,3 +2003,5 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u4F9D\u8D56\u6240\u9009\u6570 FR-Product_Demo=\u4EA7\u54C1\u6F14\u793A FR-Designer_Data_Filter=\u6570\u636E\u7B5B\u9009 Default=\u9ED8\u8BA4 +FR-Base-Load_Resource_File=\u52A0\u8F7D\u914D\u7F6E\u6587\u4EF6 + 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 c85f1d3822..563f4bfd92 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 @@ -2004,3 +2004,5 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\u4F9D\u8CF4\u6240\u9078\u8CC7 FR-Product_Demo=\u529F\u80FD\u5C55\u793A FR-Designer_Data_Filter=\u8CC7\u6599\u7BE9\u9078 Default=\u9810\u8A2D +FR-Base-Load_Resource_File=\u52A0\u8F09\u914D\u7F6E\u6A94\u6848 + From 3921acd85e938f5d12112d789b0aef8c273c96c6 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 12 Jul 2017 20:33:17 +0800 Subject: [PATCH 027/101] =?UTF-8?q?alphafine=20=E9=80=89=E4=B8=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=9A=84=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/render/ContentCellRender.java | 11 ++++++++--- .../mainframe/alphafine/images/selected1.png | Bin 0 -> 14908 bytes .../mainframe/alphafine/images/selected2.png | Bin 0 -> 14941 bytes .../mainframe/alphafine/images/selected3.png | Bin 0 -> 14855 bytes .../mainframe/alphafine/images/selected4.png | Bin 0 -> 14907 bytes .../mainframe/alphafine/images/selected5.png | Bin 0 -> 14834 bytes 6 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/selected1.png create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/selected2.png create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/selected3.png create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/selected4.png create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/selected5.png diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java index 28d70e5b7a..25506cbcc2 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java @@ -28,13 +28,18 @@ public class ContentCellRender implements ListCellRenderer { panel.setBackground(null); panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); titleLabel.setText(" " + model.getName()); - String iconUrl = "/com/fr/design/mainframe/alphafine/images/alphafine" + model.getType().getTypeValue() + ".png"; if (model.hasAction()) { if (isSelected) { + String iconUrl = "/com/fr/design/mainframe/alphafine/images/selected" + model.getType().getTypeValue() + ".png"; panel.setBackground(AlphaFineConstants.BLUE); + titleLabel.setForeground(Color.white); + titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl))); + } else { + String iconUrl = "/com/fr/design/mainframe/alphafine/images/alphafine" + model.getType().getTypeValue() + ".png"; + titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl))); + titleLabel.setForeground(AlphaFineConstants.BLACK); } - titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl))); - titleLabel.setForeground(AlphaFineConstants.BLACK); + } else { titleLabel.setIcon(null); titleLabel.setForeground(AlphaFineConstants.MEDIUM_GRAY); diff --git a/designer/src/com/fr/design/mainframe/alphafine/images/selected1.png b/designer/src/com/fr/design/mainframe/alphafine/images/selected1.png new file mode 100644 index 0000000000000000000000000000000000000000..3d7cf2514a45895e3a555c5020c8ae78275bafaf GIT binary patch literal 14908 zcmeI3eQXnD9LH}iY%pZJ1TcW&SzwWu?(W)dw3oIp*NqPBm|Jx(hQRH5-OjbW(q7lD zf(%3u#E^(VKxIhKO$d$wiHSs6VoVe@LANPEgEJDqO~O`7bl>)L!rBVvTU$N_Qd*g*X{unzzkqU8Mipiy^R3-->_jm(7 zS7c}oo)TPwTkyz!;A2wyy!DbS`Rk=IO2)g#EDYwvW{cNOIbOFrWof@$)Cds7kfwC{ z?M+^RDi{1xz{d+kjo?z|rMh}qbS5TeL?)$Y%&`k0aSWT%6SYN_LUe|V;9A*2pTNnI z&n`(Wb99xJ4I?BA3zb#1lzh_0@uElJy3j}^n-Vjg$R}7hSuiVJHN8~LXzYxRWwfl0 zSxoC$nud}@l}R~ll0$ShCFju4tQIWn5jh}bat^SA9GuMEQx;eY<#F(=Q}Vev*(|!b zI)UWoyP5mLt26gN9sDbg+!GR%g)b zc(qQ)IMh0=HczeB^Rzl&r*%3wE$Gs55r{S$Y#)`{BJlxbzr<2I?lU!HAC-EwPXuQj z=YllK=0HWsV~FfuMO3yhH()t0Cn z)mJIA>Iy{lIvovO6r+5`yl{WAw;JJv`;)y1>$4tFHfv(#lA0lxa{fk-h6-@2Aei&> z^0awID!Dn?Q6`22SCvHsd)Tk6OeR0(N$yB#tRBke96<3b{W1sE4h0~upnNJOvz zK*kss5)mxGxL_K{7~?`Bf&~~COamEXTu4N)0ONvbAY+URi3k>8Trdq}jBz0m!2*m6 zrh$wxE+isYfN{YzkTJ%EL<9>kE|>-~#<-A(U;)Mj(?G@;7ZMRHz_?%<$Qa{7B7y}N z7fb^gV_Zl?umIzNX&~df;>t=q04R9CQ-4A5cweTa$qF6~BzbGOjUd9{QNrez3F4n2 z@clbM1ZaZjTSpM=K7x2edSmSu#RQSItHe@Z4_!R6r(jh#H)VUv@xk*?Y{|~)S(#D1 zE<8Y5wl+>Xb?lk4t>@p{v$191@JUtp)%mx2gY@`otJi=8~U;%|IFll;~F<#UB1jatBPoB4)06iC`)?ZReX1 zXWQ-PuJ3GL@vi;GvAW;-v%0L=Z54gahxoMiqjTn-n;0NFI!?UZH@z=2P#Ns%yJ?MS?gx9{xz*Ov{paERt=+*FDom}}SDGvPzS=UUGI+Feb#L~-vouz$?%m)!(6+nBJ@`6%plf^g;Ni@MqRGXd&%H?uma}(iuJ3Ape&eA_i*veW zUD>_x^v#;Rm&3m{{KyS9T$uM-_jffnHc&)xa}GUu!@m<>ysXxp?Ekvc(z$5hv8r9| yf3<(y94=Z@cD7ABi*Ntr&HkRA&oozW5t|;JlJ0r`&JW7-oh3!3mXDrVx8*-{24<`P literal 0 HcmV?d00001 diff --git a/designer/src/com/fr/design/mainframe/alphafine/images/selected2.png b/designer/src/com/fr/design/mainframe/alphafine/images/selected2.png new file mode 100644 index 0000000000000000000000000000000000000000..dd04302fc1c97c1f0a9efe308ec39e6ea45abd31 GIT binary patch literal 14941 zcmeI3eQXnD9LH}17MU5o5I5wt6hww}cei%ydbXY03T%OnvNyMgu-n~jJ818Y_DahF zV?Z!2N(e71;l+SL0t}S6XaqB<8YGfTF&T&wl@JWFh@g|GyabbuK=uaQb=osS?gpV8ha zWffDe6GXubv8q42)Kmw1TvbvzhE%}(BO&`w7fLLoL^}4V` zU24-8X$5t)PM5Ak_6oYZoO}aE8w+%1OAei9DabX=)a6oiK1o?f+GL<;hO#get&6_& z_H+?9W15g-zD@X<+qO0%rWzGiudlCka~3xhdvI%Bnyj@RQ!TH2@1S`H9IktTKe zs#YihSt0mjzn2qcEeDq}CE3-hVq<)A24vEDh8(*P6o;^BJrP@YDMV(-3a*tY@d~Ue zd#hyGZI7%nS3g2sNr|?q%)04LmJ=n7Yqph4G{t8;o=xMMi=pVF1k~D)#m5M&FLRUa57p&j#X;vvL8`#?4;TFTElEQj@g0|;u`uh?$UCKCl-B&~f$y>Ne`w+`Wj`xCu!Yqcb*_S|T>gl5R4oxhQzp%UCG2=@HE zJY$}fOl(ecxWu5~u62lD5Bs#0NrPP<_9S*BHP#JfggTfyPJw1Qg(aJNFn zZdV3Qb8Is_>WM4i|xGAY+URi3k>8Trdq}jBz0m!2*m6rh$wxE+isYfN{Yz zkTJ%EL<9>kE|>-~#<-A(U;)Mj(?G@;7ZMRHz_?%<$Qa{7B7y}N7fb^gV_Zl?umIzN zX&_^a3yBC8U|cW_WQ=hk5y1kC3#NgLF)kz`Sb%ZCG>|dIg+v4kFfNz|GRC-&h+qN6 z1=B#r7#9)|EWo&68ps&qLL!0%7#B zj0>iLj4>`GB3OWN!8DNZJ#nSS9{?02@YG)bJl?nda3>EQ4b*X^6;6U^0gn>4ts{tk z?}G0u1mUL$qPLzPm~8}+C2wAQVm3jf94>PdRRw=oxyAYFh6UrlTz$=--90am`T3+N{b+pcFe~wOY9H|iGh*kkX=`d0xQ5ka-r5y% ztqinPh8AZ0v-zUz8GU)pmDFo(--YPikBvzgdt;u5Xlm=4weH!_`i7sMJ}9r58#3&! zJFu~B%L`dYj!mx}{?o9+&fn9d)WSAPz47!>buFWeIajGHu4$%5?VMkpdC~>$cHZYri+WOl<#UWZFAL&;OkfYONn}eMWJrO89$d|BhqjSG%+P9n7KD z>cRt)Iw#hc4|Mb_>p7XdH&k?E-*J!Y#|aBxlZ$N!N8LXB*<^oy`@2g@y2hv-CGFk& z?_AAbipxISH_^56*2(hyciIn>pFO{5afj>Zn;qNJ>~nrK|8Zusv2*Ihn`?_V-lRq^ z+JAoCrx)rPxZcd3>>H)ce;pimW>xRisjaT}_rLYUOE)B`y?4^_zTwJ*b16I1mY=vg f{^KWRrrsV)R4coxn}`eHCqT<)l{?-mu3!5fuH6mHk2+p+fU=-sw% zLL4u?#TgKSLO^0rOo#yn8Y7B`L-Zd|49P$war*~EFhCZA7#Kd+cJ0%y;}OH3Pm}h3 zd!Fz2_j~U1yzKtDH*4lsPRV*Oi=wD0)m5Hac+J+o6Yqk*1;aOZc$uVBHK`PJ|4jXx zQC(YjiJ}~ZVtu35=$*$2a?s5Cj(JIfX3V1gjfctbcCkW?;QYK-LNV5~ROMngoR zwUrvn^n!*)Z;hc`4grJBY&QvPvBOZ}G_y9R!(yFfurREhW}Gx@H8Cv5I5~zj#6CuM z7K~gWpP#Gs%#D?Uf0Y_rHBI4Yy0f#>+*xdvLoGDxbUJCqLR%~*s4%HrlE#Nkk~$-r zWHgTls6t3oG*OledS1R+Zr4hUM!it{6T7dV5-%jFF?Nt59p)99H8XTNlTV0yl=e^{ zGBlq+g8&EuNmHSZP3u!yWldIF<#9^JyT>gI=fvxc*G@a$U@&cIRjcTL2x3UnI@S6v z1<2ukrX4s1Qlw6F9#d3i6s;4Dv02R-_ge zooGaq@fF3D%Kte*cp@6 z4@ykU&CP;|b+R^I;2Eb-;*a3-dQtnB)E-%A*LO-RweJ>FBla<=p9_ibl;Z=4Mj!pH zmPnIkOsOhSg=@15S+j8EM$WN1ur#@Kv?Cx!&Lf2nsX*UtrN+_i7C*q^=acS<>{^Z& z^pngj=$irfTy#=vVpwr!%qITd35@1P?BmzyYz5NIwo)`zL^XaARrYJ0dH!-X@F}?N9Y4tPPT=xh=7BDb0vWKY61^Lmhlb0B*a@R%~<8sm-a5 z8Zit4jUEy1VO3w5tUcyQ?MQ2E8qbJy#Ej9&LjIjc<}%s}9~R(q3LSq?NuK8TX1L8k z;*M@}Vl*8og3`do1Q!+&Dj>K}8rYcN!XiQi1Q$vJ8xveuM5ut^LTO-Qf(wfX6%bq~ z4QxzsVG*GMf(xaAjR`I+B2++dp){~D!G%SH3J5Ng1~w+Ru!v9r!G+Sm#sn7@5h@_K zP#V~n;KCw81q2sL0~-@uSVX9R;6iC&V}c8d2o(@qC=F~(aA6Ul0)h*rfsF|+EFx4u zaG^A?F~NmJgbD~Qlm<2?xUh&&0l|gRz{Ug@77;2SxKJ9{nBc-9LIngDN&_1cTv$Y? zfZ#%DVB?$O%1XTY2PF8uUnhLAucOD_244y^2vxOSit2_h5%#R2sH->N^&CaDGZgj5 zVv6E6QdFM2Zqebn6qWH}wWq8;d}{Ua*=-GFxtW6(3)d^lUu*5lo;JC0``&4<=63A3 zGoKxl`#!rb_+9@qmns_*t9zCZW9Eh`QU9l7xJz^S&Q z=a%d|HsstjxO=2Qx#N?}x-VAz8ty&1^-TG)Z)a`Yz|j8T$3`Ch`Sg(W^UJv}&%AJD zPkvKQB{libwTXG`Eb;W)*RDQt^?dk^_utvJZj)b`-qKB-sa-f+w6S-%K-sbBuLnj3 zKgc-QTbUDlXu`6$rmpf2>~_4qe#*fsJ@+o?`HekO_Tga8yG!#<W98HjmH9 z+xv?Bhr=|`|de*c#EP%2EH%)-SQ7V>3DX& zvuEdid1%3ezLj~89_amL*T9!6XaBur)$>_%)^~00cYl1@yj0py*q8n35_Rg2Yxdn; uyyH)0YFnm!`J=OsFF9d-Y5VSx0;+6zQ?E4e({%k+&FYHzo?TBbUimMpTTYe$ literal 0 HcmV?d00001 diff --git a/designer/src/com/fr/design/mainframe/alphafine/images/selected4.png b/designer/src/com/fr/design/mainframe/alphafine/images/selected4.png new file mode 100644 index 0000000000000000000000000000000000000000..2d4c9b262042d77638f762e4e776d3f02ca94227 GIT binary patch literal 14907 zcmeI3eQXnD9LH}kc_~Z?QHf+^wPR6~_U`(&-r07}b+92Fa|{^BfZO%9-PYdK_QtxI z;O0<+7*rStLE;pM;&jHu1&~)m@Fg+6#O)8rqJs>?nQSCD1SY}f+OB=pbv$7B^J&ud z*XQ|uf4}EG&r9#0+gx02+ASprMqm%ml)v_W7tL1S@#=6HX4Cch`j@3>&UY{>%>7bIo0U(GXP3jDm zHuwdyL_9lH<`$FZqB5nFgEL}thiu9eLT2%I7Z zN@dyWjI6Ta5ro>jJatuNYoBm)yeO$$=iA9dQ+&qb`2-iI2u{_jr?U05v6MEmw23v- zPf<3OqM#%ZWkL?O>=7#)5_1?S)==uk zQmQAscUg{C&od{lZV3SZ9@QEjR?Hc-iT`&3Bl#iw_%-UQ1?f&3Dv~O!8b3);u2kx| zfRI}S*2LZI_DJ5*#>4`4QvC<;ile6@(mHyEM%L`u8MUhi8w*wg7#SCy1=>!IX^U5m z=*!eu_0~o7W-|p|B&~i%y>Ne`cNM}5_a}Pe*5#6@IE~SA3C)m8J%1xd!!mHIAULfS zi^*aq6Pptq#bQYCmbpZ*hlA?Mq^(g;Vn;`x z%IIm1ZHD_C#INW+Cx+AEA}|ePjBz0m!2*m6rh$wxE+isYfN{YzkTJ%EL<9>kE|>-~ z#<-A(U;)Mj(?G@;7ZMRHz_?%<$Qa{7B7y}N7fb^gV_Zl?umIzNX&_^a3yBC8U|cW_ zWQ=hk5y1kC3#NgLF)kz`Sb%ZCG>|dIg+v4kFfNz|GRC-&h+qN61=B#r7#9)|EWo&6 z8ps&qLL!0%7#Bj0>iLj4>`GB3OWN z!8DLD#)U)#3otI21~R@QE=~LaKtTde{ndlV`!;#YYrvy{TE3vfO%RRXQNpGcg1B)T zeE&%hbreDLuO|q07eUOHx2-#~kRVdF6uNRtL+4tzpM0*Hd+3{-e`?s!zSg%DjjQHx z%i%sH}(yS%;#%P z9PDd8eR}xVPt4#;Kc4R^?fBx`^G8oT7|gi+?}3wEMN2shRz6G!EQ8n=!QSrY>Vg`oxn*cJC#+|87}3RMcfVu<^)+i-Y}3 zE)RZke10x7=i1`qAN{uS@vhG53oFb+&F4C{wr6#|w}l=c_MFOVd-OVSZ1TnlZ#BuM ze7#v$rrRF4*0d#~wd=vo<$FtW+Shf9oil|UE$>e+e|`1hsn)K6uimldPaW_(`VUIFEt-}hCW=A z`p1O!uV?3F&q%jUVl?&{8537D4^44SOP_SJDW!KZHF<&O-H-FV9%$Du}n_U`&`?b()W>u@!6jQt5i4RX6a?asA#UGGY} zY1C}5U_=bWU=X5-ikb+D7*JT$83xfQnh+xzUVs=A4P+1oB7*o_+qKWSjt2}cpC)a8 zeV*_4_q+Q%e|m484NZ-YmzB;dr6{V*-{5P8-{r=8#&r0(;NlGte%&2wSff$Y?1zl^ zG=KAh=PAm$SZ;0C+XE{ENsXGtpxOb%iByGFK{k_?sYkoADju9jGig49i-$bY(`JUmYxck5pu(O73$(Z)YW*asz$t- zS=Ka;kglsUW>q!)NI;Zi#o+p=n=LfuM?9Yo_(UCe4X=r-Hu08L-X`!?!NxD)oC3!o zNixcU904^bhk6QgSUADT33ex%15p;{fGa2{>f$YBLA6Mppd^IUcvRHAa#RchHl~E# zY`zgu=H``9r$*E`ye#0gy4hmQh$}tU1izx`q9Osm&kGyOvK$nE$aUB`PBMi$c+q4N ztqzkjBw0+7-Qp7Mz+nkG?P-XC0BWC<+NVkhW4&Zk2X8YqVxN?HWn6}Poftth#?{|$ zi6Utxm1>YRI754onG5G{dN*qU-4k2KJ0fy=SBi;o4H#?A!;CMw+%}fmr3_Dc?Fyn~ z>}OudSP~%UW+$}fFDvKF+T{N`fSLS=ed-#?PN3XuL1j{ig4#^>zh5p^3In*e76yfQI83cQ=0)RwQD(YG6;8cAgI zHX8?DEN^^fy=Z@-cMZmi_7{5d);2}fy_Rgbf@Z{J?7x|cO7fJ&g6I@tCsDR)?X<%c53yTO9 z5L_q?Y2Hx zBFMAHN>0x@L66zzPhZv8_vKz`VR?6XU+<5#pN)Kd@RP^Row?_M%TIQVzH$A-OQR1n z`}g))U*wOh9vr!{Xzf1>4l%!meG%W`fsSbK1)e!l(LFD*W507KJiqeWS%brOT^q9h zzJ&d>>dm3|TIRqLTr(4g>FRAeziM0i?8(i$hOLACxz?qpD|Y!UXBW@BgZl3p-YL1#{M*0$ zQv<6{9R90u)&XwYg}T9`Vs~inf~%YKSFeUwdXG+f`CzE)xlOjSbKZA+Q?b3KYP-I1 z+s+aDzCd~OSaSFAe!Kho>!VfsOlRcd7k5^EwE5EfpWfa0^N}mv)l}ucK=kwb_g^ Date: Wed, 12 Jul 2017 20:54:55 +0800 Subject: [PATCH 028/101] =?UTF-8?q?=E5=8A=A0=E4=B8=80=E6=9D=A1=E5=88=86?= =?UTF-8?q?=E5=89=B2=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/component/AlphaFineDialog.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 5a1c892201..6e94a5c151 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -299,8 +299,12 @@ public class AlphaFineDialog extends UIDialog { leftSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); rightSearchResultPane = new JPanel(); rightSearchResultPane.setBackground(Color.white); + UILabel splitLine = new UILabel(); + splitLine.setBackground(AlphaFineConstants.GRAY); + splitLine.setPreferredSize(new Dimension(1, AlphaFineConstants.CONTENT_HEIGHT)); + rightSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH - 1, AlphaFineConstants.CONTENT_HEIGHT)); searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); - rightSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); + searchResultPane.add(splitLine, BorderLayout.CENTER); searchResultPane.add(rightSearchResultPane, BorderLayout.EAST); UILabel splitLabel = new UILabel(); splitLabel.setBackground(AlphaFineConstants.GRAY); From ed95b49e463a51592e29221111ab428e74e72baf Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 12 Jul 2017 20:58:42 +0800 Subject: [PATCH 029/101] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineDialog.java | 2 +- designer_base/src/com/fr/design/locale/designer.properties | 2 +- .../src/com/fr/design/locale/designer_en_US.properties | 2 +- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 +- .../src/com/fr/design/locale/designer_zh_TW.properties | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 6e94a5c151..c2d5a53c43 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -168,7 +168,7 @@ public class AlphaFineDialog extends UIDialog { * 初始化输入框 */ private void initSearchTextField() { - searchTextField = new AlphaFineTextField(PLACE_HOLDER); + searchTextField = new AlphaFineTextField(Inter.getLocText("FR-Designer_AlphaFine")); initTextFieldKeyListener(); searchTextField.setFont(AlphaFineConstants.GREATER_FONT); searchTextField.setBackground(Color.white); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3c6d79d4dd..75aa03f718 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -1999,7 +1999,7 @@ FR-Designer_Templates_Content=Templates Contents FR-Designer_AlphaFine_ShowAll=show all FR-Designer_AlphaFine_Latest=Latest FR-Designer_AlphaFine_ShowLess=show less -FR-Designer_Alphafine=AlphaFine +FR-Designer_AlphaFine=AlphaFine FR-Designer-Alphafine_No_Remind= <<<<<<< HEAD FR-Designer_AlphaFine_NoResult=no results 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 1d11d02d12..addb7514c8 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 @@ -1997,7 +1997,7 @@ FR-Designer_Templates_Content=Files'contents FR-Designer_AlphaFine_ShowAll=Show all FR-Designer_AlphaFine_Latest=Recent FR-Designer_AlphaFine_ShowLess=Show less -FR-Designer_Alphafine=AlphaFine +FR-Designer_AlphaFine=AlphaFine <<<<<<< HEAD FR-Designer-Alphafine_No_Remind=don't remind FR-Designer_AlphaFine_NoResult=No results 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 9e5a80bfa9..44ffa555bd 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 @@ -1997,7 +1997,7 @@ FR-Designer_AlphaFine_ShowAll=\u663E\u793A\u5168\u90E8 FR-Designer_AlphaFine_Recommend=\u731C\u60A8\u9700\u8981 FR-Designer_AlphaFine_Latest=\u672C\u5730\u5E38\u7528 FR-Designer_AlphaFine_ShowLess=\u6536\u8D77 -FR-Designer_Alphafine=AlphaFine\u667A\u80FD\u641C\u7D22 +FR-Designer_AlphaFine=AlphaFine\u667A\u80FD\u641C\u7D22 FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer_AlphaFine_NoResult=\u6682\u65E0\u76F8\u5173\u5185\u5BB9 FR-Designer_ConnectionFailed=\u94FE\u63A5\u5931\u8D25 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 313e867403..e3f98c9c5b 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 @@ -1997,7 +1997,7 @@ FR-Designer_Templates=\u6A21\u677F FR-Designer_Templates_Content=\u6A21\u677F\u5167\u5BB9 FR-Designer_AlphaFine_Latest=\u6700\u8FD1\u5E38\u7528 FR-Designer_AlphaFine_ShowLess=\u6536\u8D77 -FR-Designer_Alphafine=AlphaFine\u667A\u80FD\u641C\u7D22 +FR-Designer_AlphaFine=AlphaFine\u667A\u80FD\u641C\u7D22 FR-Designer_AlphaFine_ShowAll=\u986F\u793A\u5168\u90E8 FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer_AlphaFine_NoResult=\u66AB\u7121\u76F8\u95DC\u5167\u5BB9 From 4659e8e3120d2c06dfff3f4e18387d39ea30d190 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 13 Jul 2017 10:37:03 +0800 Subject: [PATCH 030/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=88=9D?= =?UTF-8?q?=E6=AD=A5=E5=90=88=E5=B9=B6=E5=A4=96=E6=A1=86=E6=9E=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icontainer/UIEastResizableContainer.java | 299 ++++++++++++++++++ .../mainframe/EastRegionContainerPane.java | 247 ++++++++++++++- 2 files changed, 539 insertions(+), 7 deletions(-) create mode 100644 designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java new file mode 100644 index 0000000000..e1a1c2a167 --- /dev/null +++ b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -0,0 +1,299 @@ +package com.fr.design.gui.icontainer; + +import com.fr.base.BaseUtils; +import com.fr.design.constants.UIConstants; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.stable.Constants; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseMotionListener; + +/** + * Created by plough on 2017/7/7. + */ +public class UIEastResizableContainer extends JPanel { + private static final long serialVersionUID = 1854340560790476907L; + private int containerWidth = 240; + private int preferredWidth = 240; + private int topToolPaneHeight = 20; + private int leftPaneWidth = 40; + + private JComponent leftPane; + private JComponent rightPane; + + // private HorizotalToolPane horizontToolPane; + private TopToolPane topToolPane; + + + private static final int ARROW_MARGIN = 15; + private static final int ARROW_RANGE = 35; + + private boolean isRightPaneVisible = true; + + public UIEastResizableContainer() { + this(new JPanel(), new JPanel()); + } + + /** + * 设置面板宽度 + * + * @param width + */ + public void setContainerWidth(int width) { + this.containerWidth = width; + this.preferredWidth = width; + } + + + public void setRightPaneVisible(boolean isVisible){ + this.isRightPaneVisible = isVisible; + } + + private void setPreferredWidth(int width) { + this.preferredWidth = width; + } + + public UIEastResizableContainer(JComponent leftPane, JComponent rightPane) { + setBackground(UIConstants.NORMAL_BACKGROUND); + this.leftPane = leftPane; + this.rightPane = rightPane; + + this.topToolPane = new TopToolPane(); + + setLayout(containerLayout); + add(topToolPane); + add(leftPane); + add(rightPane); + } + + public static void main(String... args) { + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + + JPanel leftPane = new JPanel(); + leftPane.setBackground(Color.yellow); + JPanel rightPane = new JPanel(); + rightPane.setBackground(Color.green); + + UIButton b1, b2; + b1 = new UIButton("b1"); + b2 = new UIButton("b2"); + b1.setPreferredSize(new Dimension(40, 40)); + b2.setPreferredSize(new Dimension(40, 40)); + leftPane.add(b1); + leftPane.add(b2); + + + UIEastResizableContainer bb = new UIEastResizableContainer(leftPane, rightPane); + + JPanel cc = new JPanel(); + cc.setBackground(Color.white); + + content.add(bb, BorderLayout.EAST); + content.add(cc, BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(500, 500); + jf.setVisible(true); + } + + /** + * 将面板设置成最佳的宽度 + */ + public void setWindow2PreferWidth() { + if (containerWidth == leftPaneWidth) { + containerWidth = preferredWidth; + refreshContainer(); + } + } + + /** + * 得到容器的宽度 + * + * @return + */ + public int getContainerWidth() { + return this.containerWidth; + } + + /** + * 设置关闭设计器前最后一次面板的宽度 + * + * @param containerWidth + */ + public void setLastContainerWidth(int containerWidth) { + this.containerWidth = containerWidth; + } + + private LayoutManager containerLayout = new LayoutManager() { + + @Override + public void removeLayoutComponent(Component comp) { + // TODO Auto-generated method stub + + } + + @Override + public Dimension preferredLayoutSize(Container parent) { + return parent.getPreferredSize(); + } + + @Override + public Dimension minimumLayoutSize(Container parent) { + return null; + } + + @Override + public void layoutContainer(Container parent) { + if (topToolPane == null || rightPane == null) { + return; + } + + topToolPane.setBounds(0, 0, containerWidth, topToolPaneHeight);//0,0,10,462 + leftPane.setBounds(0, topToolPaneHeight, leftPaneWidth, getHeight() - topToolPaneHeight); + +// parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());//10,0,230,462 + rightPane.setBounds(leftPaneWidth, topToolPaneHeight, containerWidth-leftPaneWidth, getHeight() - topToolPaneHeight);//20,0,230,0 + } + + @Override + public void addLayoutComponent(String name, Component comp) { + } + }; + + @Override + /** + * 得到最佳大小 + */ + public Dimension getPreferredSize() { + return new Dimension(containerWidth, 400); + } + + /** + * 替换左子面板 + * + * @param pane 面板 + */ + public void replaceLeftPane(JComponent pane) { + remove(pane); + remove(this.leftPane); + add(this.leftPane = pane); + refreshContainer(); + } + + + /** + * 替换右子面板 + * + * @param pane 面板 + */ + public void replaceRightPane(JComponent pane) { + remove(pane); + remove(this.rightPane); + add(this.rightPane = pane); + refreshContainer(); + } + + /** + * 得到左子面板 + * + * @return + */ + public JComponent getLeftPane() { + return this.leftPane; + } + + /** + * 得到右子面板 + * + * @return + */ + public JComponent getRightPane() { + return this.rightPane; + } + + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + + private class TopToolPane extends JPanel { + private int model = UIConstants.MODEL_NORMAL; + + public TopToolPane() { + super(); + addMouseMotionListener(new MouseMotionListener() { + + @Override + public void mouseMoved(MouseEvent e) { + if (e.getX() <= ARROW_RANGE) { + setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + model = UIConstants.MODEL_PRESS; + } else { + setCursor(Cursor.getDefaultCursor()); + model = UIConstants.MODEL_NORMAL; + } + repaint(); + } + + @Override + public void mouseDragged(MouseEvent e) { + } + }); + addMouseListener(new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + setCursor(Cursor.getDefaultCursor()); + model = UIConstants.MODEL_NORMAL; + repaint(); + } + + @Override + public void mouseClicked(MouseEvent e) { + if (e.getX() <= ARROW_RANGE) { + if (containerWidth == leftPaneWidth) { + containerWidth = preferredWidth; + } else { + setPreferredWidth(containerWidth); + containerWidth = leftPaneWidth; + } + refreshContainer(); + if (BaseUtils.isAuthorityEditing()) { + DesignerContext.getDesignerFrame().doResize(); + } + } + } + }); + } + + @Override + public void paint(Graphics g) { + Image button; + + g.drawImage(UIConstants.DRAG_BAR, 0, 0, containerWidth, topToolPaneHeight, null); + if (containerWidth == leftPaneWidth) { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_LEFT_NORMAL; + } else { + button = UIConstants.DRAG_LEFT_PRESS; + } + } else { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_RIGHT_NORMAL; + } else { + button = UIConstants.DRAG_RIGHT_PRESS; + } + } +// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); + g.drawImage(button, 20, 7, 5, 5, null); + } + } + +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index e792cba108..99cf145170 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -1,11 +1,28 @@ package com.fr.design.mainframe; +import com.fr.base.BaseUtils; import com.fr.design.DesignerEnvManager; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.icontainer.UIResizableContainer; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Constants; -public class EastRegionContainerPane extends UIResizableContainer { +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; + +public class EastRegionContainerPane extends UIEastResizableContainer { private static EastRegionContainerPane THIS; + private List propertyItemList; + private CardLayout propertyCard; + private JPanel leftPane; + private JPanel rightPane; + private static final int CONTAINER_WIDTH = 260; + private static final int BUTTON_WIDTH = 40; /** * 得到实例 @@ -15,24 +32,240 @@ public class EastRegionContainerPane extends UIResizableContainer { public static final EastRegionContainerPane getInstance() { if (THIS == null) { THIS = new EastRegionContainerPane(); - THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY()); +// THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY()); THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth()); } return THIS; } public EastRegionContainerPane() { - super(Constants.LEFT); - setVerticalDragEnabled(false); + super(); +// setVerticalDragEnabled(false); + initPropertyItemList(); + initRightPane(); + initLeftPane(); +// super(leftPane, rightPane); setContainerWidth(260); } + private void initPropertyItemList() { + propertyItemList = new ArrayList<>(); + + // 单元格元素 + PropertyItem cellElement = new PropertyItem("cellElement", "/com/fr/design/images/buttonicon/add.png"); + // 单元格属性 + PropertyItem cellAttr = new PropertyItem("cellAttr", "com/fr/design/images/toolbarbtn/close.png"); + // 悬浮元素 + PropertyItem floatElement = new PropertyItem("floatElement", "com/fr/design/images/toolbarbtn/close.png"); + // 控件设置 + PropertyItem widgetSettings = new PropertyItem("widgetSettings", "com/fr/design/images/toolbarbtn/close.png"); + // 条件属性 + PropertyItem conditionAttr = new PropertyItem("conditionAttr", "com/fr/design/images/toolbarbtn/close.png"); + // 超级链接 + PropertyItem hyperlink = new PropertyItem("hyperlink", "com/fr/design/images/toolbarbtn/close.png"); + // 组件库 + PropertyItem widgetLib = new PropertyItem("widgetLib", "com/fr/design/images/toolbarbtn/close.png"); + propertyItemList.add(cellElement); + propertyItemList.add(cellAttr); + propertyItemList.add(floatElement); + propertyItemList.add(widgetSettings); + propertyItemList.add(conditionAttr); + propertyItemList.add(hyperlink); + propertyItemList.add(widgetLib); + } + + // 右侧属性面板 + private void initRightPane() { + rightPane = new JPanel(); + propertyCard = new CardLayout(); + rightPane.setBackground(Color.green); + rightPane.setLayout(propertyCard); + for (PropertyItem item : propertyItemList) { + rightPane.add(item.getName(), item.getPropertyPanel()); + } + + replaceRightPane(rightPane); + } + + // 左侧按钮面板 + private void initLeftPane() { + leftPane = new JPanel(); + for (PropertyItem item : propertyItemList) { + leftPane.add(item.getButton()); + } + +// leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS)); + leftPane.setBackground(Color.yellow); + replaceLeftPane(leftPane); + } + + public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) { + super(leftPane, rightPane); +// setVerticalDragEnabled(false); +// setContainerWidth(260); + } + + public void replaceUpPane(JComponent pane) { + propertyItemList.get(0).replaceContentPane(pane); + } + + public void replaceDownPane(JComponent pane) { + propertyItemList.get(1).replaceContentPane(pane); + } + + public JComponent getUpPane() { + return propertyItemList.get(0).getContentPane(); + } + + public JComponent getDownPane() { + return propertyItemList.get(1).getContentPane(); + } + + public void addParameterPane(JComponent paraPane) { + propertyItemList.get(2).replaceContentPane(paraPane); + } + + public void setParameterHeight(int height) { + // stub + } + + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel cc = new JPanel(); + cc.setBackground(Color.white); +// JPanel leftPane = new JPanel(); +// leftPane.setBackground(Color.yellow); +// JPanel rightPane = new JPanel(); +// rightPane.setBackground(Color.green); +// +// JButton b1, b2; +// b1 = new JButton("b1"); +// b2 = new JButton("b2"); +// b1.setPreferredSize(new Dimension(40, 40)); +// b2.setPreferredSize(new Dimension(40, 40)); +// leftPane.add(b1); +// leftPane.add(b2); +// leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS)); + + JPanel content = (JPanel)jf.getContentPane(); +// content.setLayout(null); + content.add(cc, BorderLayout.CENTER); + content.add(new EastRegionContainerPane(), BorderLayout.EAST); + GUICoreUtils.centerWindow(jf); + jf.setSize(400, 400); + jf.setVisible(true); + } + + public void removeParameterPane() { + + } + /** - * 刷新下面板 + * 刷新右面板 */ + public void refreshRightPane() { + if (this.getRightPane() instanceof DockingView) { + ((DockingView) this.getRightPane()).refreshDockingView(); + } + } + public void refreshDownPane() { - if (this.getDownPane() instanceof DockingView) { - ((DockingView) this.getDownPane()).refreshDockingView(); + JComponent pane = propertyItemList.get(1).getContentPane(); + if (pane instanceof DockingView) { + ((DockingView) pane).refreshDockingView(); + } + } + + public int getToolPaneY() { + return 0; + } + + + + class PropertyItem { + // private UIButton button; + private JButton button; + private String name; + private JPanel propertyPanel; + private JComponent contentPane; + private int x, y; // 弹出框的坐标 + private int height; // 弹出框的高度 + private boolean isPoppedOut; // 是否弹出 + + public PropertyItem(String name, String btnUrl) { + this.name = name; + initButton(btnUrl); + initPropertyPanel(); + } + + // 选项不可用 + public void setEnabled(boolean enabled) { + button.setEnabled(enabled); + } + + private void initPropertyPanel() { + propertyPanel = new JPanel(); + propertyPanel.setBackground(Color.pink); +// propertyPanel.setPreferredSize(getPreferredSize()); +// JPanel titlePanel = new JPanel(); +// titlePanel.setPreferredSize(new Dimension(propertyPanel.getPreferredSize().width, 20)); +// titlePanel + JButton testBtn = new JButton(name); + testBtn.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + setEnabled(!button.isEnabled()); + } + }); + contentPane = new JPanel(); + contentPane.add(testBtn); + propertyPanel.setLayout(new BorderLayout()); + propertyPanel.add(contentPane, BorderLayout.CENTER); + } + + public void replaceContentPane(JComponent pane) { +// remove(pane); + propertyPanel.remove(this.contentPane); + propertyPanel.add(this.contentPane = pane); + refreshContainer(); + } + + public JComponent getContentPane() { + return contentPane; + } + + private void refreshContainer() { + propertyPanel.validate(); + propertyPanel.repaint(); + propertyPanel.revalidate(); + } + + private void initButton(String btnUrl) { + button = new JButton(BaseUtils.readIcon(btnUrl)); +// button = new UIButton("btnd\nssdg"); +// button.set4LargeToolbarButton(); + button.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_WIDTH)); + button.setContentAreaFilled(false); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + propertyCard.show(rightPane, name); + } + }); + } + + public JButton getButton() { + return button; + } + + public String getName() { + return name; + } + + public JPanel getPropertyPanel() { + return propertyPanel; } } } \ No newline at end of file From 85de7e321207eed770938d8b1a55f8c6fb54597d Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 13 Jul 2017 10:43:09 +0800 Subject: [PATCH 031/101] =?UTF-8?q?rollback=E7=BC=96=E8=AF=91=E4=B8=8D?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E7=9A=84=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/bbs/UserInfoLabel.java | 2 +- .../src/com/fr/design/DesignerEnvManager.java | 2 +- .../src/com/fr/design/menu/MenuManager.java | 12 ++++++------ .../chart/series/PlotSeries/MapCustomPane.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index 2630c2702b..4d58b3db67 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -265,7 +265,7 @@ public class UserInfoLabel extends UILabel { UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")); closeOther.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { -// BBSPluginLogin.getInstance().logOut(); + BBSPluginLogin.getInstance().logOut(); UserLoginContext.fireLoginContextListener(); } diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index a5d58ffc06..5658a318dc 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -1802,7 +1802,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } writer.startTAG("Env"); -// writer.classAttr(env.getClass()); + writer.classAttr(env.getClass()); writer.attr("name", name); env.writeXML(writer); diff --git a/designer_base/src/com/fr/design/menu/MenuManager.java b/designer_base/src/com/fr/design/menu/MenuManager.java index 0f1401ace0..18d6b0e022 100644 --- a/designer_base/src/com/fr/design/menu/MenuManager.java +++ b/designer_base/src/com/fr/design/menu/MenuManager.java @@ -138,12 +138,12 @@ public class MenuManager extends XMLFileManager { if (name.isEmpty()) { return; } -// try { -// MenuAction action = (MenuAction) reader.getAttrAsClass().newInstance(); -// menu.addShortCut(action); -// } catch (Exception exp) { -// FRLogger.getLogger().error(exp.getMessage(), exp); -// } + try { + MenuAction action = (MenuAction) reader.getAttrAsClass().newInstance(); + menu.addShortCut(action); + } catch (Exception exp) { + FRLogger.getLogger().error(exp.getMessage(), exp); + } } else if (reader.getTagName().equals("Menu")) { final MenuDef submenu = new MenuDef(); String tmpVal = StringUtils.EMPTY; diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java index 21a778f1a2..d844631c05 100644 --- a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -19,7 +19,7 @@ import com.fr.general.GeneralUtils; import com.fr.general.Inter; import com.fr.general.data.DataModel; import com.fr.stable.StringUtils; -//import org.apache.batik.swing.svg.SVGFileFilter; +import org.apache.batik.swing.svg.SVGFileFilter; import javax.swing.*; import java.awt.*; @@ -107,7 +107,7 @@ refreshAreaNameBox(); public void actionPerformed(ActionEvent evt) { JFileChooser svgFileChooser = new JFileChooser(); -// svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); + svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); if (StringUtils.isNotBlank(lastSelectPath)) { svgFileChooser.setSelectedFile(new File(lastSelectPath)); } From d6d632aedc8bfe8eb321a7f3d5dcf58968b6dcab Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 13 Jul 2017 14:48:23 +0800 Subject: [PATCH 032/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BD=BF?= =?UTF-8?q?=E7=94=A8UIButton=E4=BD=9C=E4=B8=BA=E7=AB=96=E5=90=91tab?= =?UTF-8?q?=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icontainer/UIEastResizableContainer.java | 12 ++++--- .../mainframe/EastRegionContainerPane.java | 33 +++++++++++++++---- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java index e1a1c2a167..ae7c92fd92 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -33,7 +33,7 @@ public class UIEastResizableContainer extends JPanel { private static final int ARROW_MARGIN = 15; private static final int ARROW_RANGE = 35; - private boolean isRightPaneVisible = true; +// private boolean isRightPaneVisible = true; public UIEastResizableContainer() { this(new JPanel(), new JPanel()); @@ -49,11 +49,15 @@ public class UIEastResizableContainer extends JPanel { this.preferredWidth = width; } - - public void setRightPaneVisible(boolean isVisible){ - this.isRightPaneVisible = isVisible; + public boolean isRightPaneVisible() { + return containerWidth > leftPaneWidth; } + +// public void setRightPaneVisible(boolean isVisible){ +// this.isRightPaneVisible = isVisible; +// } + private void setPreferredWidth(int width) { this.preferredWidth = width; } diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 99cf145170..117a257b08 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -5,6 +5,7 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.icontainer.UIResizableContainer; +import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Constants; @@ -90,6 +91,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 左侧按钮面板 private void initLeftPane() { leftPane = new JPanel(); + leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0)); for (PropertyItem item : propertyItemList) { leftPane.add(item.getButton()); } @@ -186,7 +188,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { class PropertyItem { // private UIButton button; - private JButton button; + private UIButton button; private String name; private JPanel propertyPanel; private JComponent contentPane; @@ -243,20 +245,33 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } private void initButton(String btnUrl) { - button = new JButton(BaseUtils.readIcon(btnUrl)); + button = new UIButton(BaseUtils.readIcon(btnUrl)) { + public Dimension getPreferredSize() { + return new Dimension(BUTTON_WIDTH, BUTTON_WIDTH); + } + }; // button = new UIButton("btnd\nssdg"); // button.set4LargeToolbarButton(); - button.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_WIDTH)); - button.setContentAreaFilled(false); +// button.setBorder(BorderFactory.createEmptyBorder(0, 40, 0, 0)); +// button.setMargin(null); +// button.setOpaque(false); + button.set4LargeToolbarButton(); +// button.setSize(new Dimension(BUTTON_WIDTH, BUTTON_WIDTH)); +// button.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_WIDTH)); +// button.setContentAreaFilled(false); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - propertyCard.show(rightPane, name); + if (isRightPaneVisible()) { + propertyCard.show(rightPane, name); + } else { + popOut(); + } } }); } - public JButton getButton() { + public UIButton getButton() { return button; } @@ -267,5 +282,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public JPanel getPropertyPanel() { return propertyPanel; } + + // 弹出对话框 + public void popOut() { + JDialog dialog = new JDialog(); + dialog.setVisible(true); + } } } \ No newline at end of file From fc07b767bb008cd8c995b268a50aabc4f39fd8f5 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Thu, 13 Jul 2017 16:38:18 +0800 Subject: [PATCH 033/101] =?UTF-8?q?placeholder=E6=94=B9=E9=94=99=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index c2d5a53c43..074279e7cc 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -68,7 +68,7 @@ public class AlphaFineDialog extends UIDialog { private static final String DS_NAME = "dsname=\""; private static final String PLUGIN_MARK_SHORT = "k:4 "; private static final String PLUGIN_MARK = "k:shop "; - private static final String PLACE_HOLDER = "AlphaFine"; + private static final String PLACE_HOLDER = Inter.getLocText("FR-Designer_AlphaFine"); private AlphaFineTextField searchTextField; private UIButton closeButton; @@ -168,7 +168,7 @@ public class AlphaFineDialog extends UIDialog { * 初始化输入框 */ private void initSearchTextField() { - searchTextField = new AlphaFineTextField(Inter.getLocText("FR-Designer_AlphaFine")); + searchTextField = new AlphaFineTextField(PLACE_HOLDER); initTextFieldKeyListener(); searchTextField.setFont(AlphaFineConstants.GREATER_FONT); searchTextField.setBackground(Color.white); From 16cdd1cfb9cdcdd850aceab116d5f1ab1a810ba8 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 14 Jul 2017 09:37:43 +0800 Subject: [PATCH 034/101] =?UTF-8?q?=E6=8B=BC=E9=94=99=E4=BA=86=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/chart/ChartsConfigPane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java index bebf6d2c23..1bf04c4399 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java @@ -14,11 +14,11 @@ public abstract class ChartsConfigPane extends AbstractChartA public final static String CHART_STYLE_TITLE = Inter.getLocText("Chart-Style_Name"); - public abstract Class accptType(); + public abstract Class acceptType(); @Override public void populate(ChartCollection collection) { - if (StableUtils.classInstanceOf(collection.getSelectedChart().getClass(),accptType())) { + if (StableUtils.classInstanceOf(collection.getSelectedChart().getClass(), acceptType())) { populate(collection, (T)collection.getSelectedChart()); } } @@ -27,7 +27,7 @@ public abstract class ChartsConfigPane extends AbstractChartA @Override public void update(ChartCollection collection) { - if (StableUtils.classInstanceOf(collection.getSelectedChart().getClass(),accptType())) { + if (StableUtils.classInstanceOf(collection.getSelectedChart().getClass(), acceptType())) { update(collection, (T)collection.getSelectedChart()); } } From cdc56717371b7bcd6d7621f96c1890c311614f22 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 14 Jul 2017 09:38:19 +0800 Subject: [PATCH 035/101] =?UTF-8?q?=E6=8B=BC=E9=94=99=E4=BA=86=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E8=BF=9B=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/ChartsConfigPane.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java index 1bf04c4399..057973df05 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java @@ -16,6 +16,14 @@ public abstract class ChartsConfigPane extends AbstractChartA public abstract Class acceptType(); + /** + * 拼错了的方法,暂时做下兼容,后面就删掉 + */ + @Deprecated + public Class accptType() { + return acceptType(); + } + @Override public void populate(ChartCollection collection) { if (StableUtils.classInstanceOf(collection.getSelectedChart().getClass(), acceptType())) { From 19303658da7de628bc3303f32b056cae45d7679f Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Fri, 14 Jul 2017 10:13:43 +0800 Subject: [PATCH 036/101] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20=E8=A7=A3=E5=86=B3SandboxCollecti?= =?UTF-8?q?on=EF=BC=8C=E4=B8=8D=E5=85=B3=E9=97=AD=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=B0=B1=E6=97=A0=E6=B3=95GC=E7=9B=B8=E5=85=B3=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82=E6=94=B9=E6=88=90?= =?UTF-8?q?=E4=BA=86=E5=9C=A8=E5=86=85=E9=83=A8=E7=B1=BB=E4=B8=AD=E5=8F=AA?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=B8=80=E4=B8=AAID=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E5=85=B7=E4=BD=93=E7=9A=84=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 5658a318dc..536574f9c6 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -152,17 +152,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { designerEnvManager.setCurEnvName(name); } } + + GeneralContext.addEnvChangedListener(new EnvChangedListener() { + @Override + public void envChanged() { + + designerEnvManager.setCurrentDirectoryPrefix(FILEFactory.ENV_PREFIX); + designerEnvManager.setDialogCurrentDirectory(ProjectConstants.REPORTLETS_NAME); + } + }); + } - GeneralContext.addEnvChangedListener(new EnvChangedListener() { - @Override - public void envChanged() { - - designerEnvManager.setCurrentDirectoryPrefix(FILEFactory.ENV_PREFIX); - designerEnvManager.setDialogCurrentDirectory(ProjectConstants.REPORTLETS_NAME); - } - }); - + return designerEnvManager; } From 0569a1ff26f51ccd824c62de50456e8bd579a73e Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 14 Jul 2017 11:05:18 +0800 Subject: [PATCH 037/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BF=E6=94=B6=E8=B5=B7=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E7=AB=96=E5=90=91tab?= =?UTF-8?q?=EF=BC=8C=E5=BC=B9=E5=87=BA=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icontainer/UIEastResizableContainer.java | 7 ++ .../mainframe/EastRegionContainerPane.java | 80 ++++++++++++++----- 2 files changed, 66 insertions(+), 21 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java index ae7c92fd92..3a24e39027 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -228,6 +228,12 @@ public class UIEastResizableContainer extends JPanel { revalidate(); } + /** + * 伸缩右子面板时,触发此方法 + */ + public void onResize() { + } + private class TopToolPane extends JPanel { private int model = UIConstants.MODEL_NORMAL; @@ -268,6 +274,7 @@ public class UIEastResizableContainer extends JPanel { setPreferredWidth(containerWidth); containerWidth = leftPaneWidth; } + onResize(); refreshContainer(); if (BaseUtils.isAuthorityEditing()) { DesignerContext.getDesignerFrame().doResize(); diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 117a257b08..5f79606653 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -6,6 +6,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.icontainer.UIResizableContainer; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.style.AbstractPopBox; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Constants; @@ -46,7 +47,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { initRightPane(); initLeftPane(); // super(leftPane, rightPane); - setContainerWidth(260); + setContainerWidth(CONTAINER_WIDTH); } private void initPropertyItemList() { @@ -101,6 +102,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { replaceLeftPane(leftPane); } + @Override + public void onResize() { + for (PropertyItem item : propertyItemList) { + item.onResize(); + } + } + public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) { super(leftPane, rightPane); // setVerticalDragEnabled(false); @@ -192,9 +200,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private String name; private JPanel propertyPanel; private JComponent contentPane; + private PropertyFixedPopupPane popupPane; // 左侧固定弹出框 private int x, y; // 弹出框的坐标 private int height; // 弹出框的高度 private boolean isPoppedOut; // 是否弹出 + private Dimension fixedSize; public PropertyItem(String name, String btnUrl) { this.name = name; @@ -210,10 +220,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private void initPropertyPanel() { propertyPanel = new JPanel(); propertyPanel.setBackground(Color.pink); -// propertyPanel.setPreferredSize(getPreferredSize()); -// JPanel titlePanel = new JPanel(); -// titlePanel.setPreferredSize(new Dimension(propertyPanel.getPreferredSize().width, 20)); -// titlePanel + contentPane = generateContentPane(); + propertyPanel.setLayout(new BorderLayout()); + propertyPanel.add(contentPane, BorderLayout.CENTER); + } + + public JComponent generateContentPane() { + JComponent contentPane = new JPanel(); JButton testBtn = new JButton(name); testBtn.addActionListener(new ActionListener() { @Override @@ -221,14 +234,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { setEnabled(!button.isEnabled()); } }); - contentPane = new JPanel(); contentPane.add(testBtn); - propertyPanel.setLayout(new BorderLayout()); - propertyPanel.add(contentPane, BorderLayout.CENTER); + return contentPane; } public void replaceContentPane(JComponent pane) { -// remove(pane); propertyPanel.remove(this.contentPane); propertyPanel.add(this.contentPane = pane); refreshContainer(); @@ -238,6 +248,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return contentPane; } + public void onResize() { + if (isRightPaneVisible()) { + replaceContentPane(contentPane); + } else if(popupPane != null) { + popupPane.replaceContentPane(contentPane); + } + } + private void refreshContainer() { propertyPanel.validate(); propertyPanel.repaint(); @@ -250,22 +268,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return new Dimension(BUTTON_WIDTH, BUTTON_WIDTH); } }; -// button = new UIButton("btnd\nssdg"); -// button.set4LargeToolbarButton(); -// button.setBorder(BorderFactory.createEmptyBorder(0, 40, 0, 0)); -// button.setMargin(null); -// button.setOpaque(false); button.set4LargeToolbarButton(); -// button.setSize(new Dimension(BUTTON_WIDTH, BUTTON_WIDTH)); -// button.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_WIDTH)); -// button.setContentAreaFilled(false); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (isRightPaneVisible()) { propertyCard.show(rightPane, name); } else { - popOut(); + popupFixedPane(); } } }); @@ -284,9 +294,37 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } // 弹出对话框 - public void popOut() { - JDialog dialog = new JDialog(); - dialog.setVisible(true); + public void popupFixedPane() { + if (popupPane == null) { + popupPane = new PropertyFixedPopupPane(contentPane); + } + GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0); + } + } + + private class PropertyFixedPopupPane extends JPopupMenu { + private JComponent contentPane; + PropertyFixedPopupPane(JComponent contentPane) { + this.contentPane = contentPane; + this.add(contentPane); + this.setPreferredSize(new Dimension(CONTAINER_WIDTH - BUTTON_WIDTH, getPreferredSize().height)); + } + + public JComponent getContentPane() { + return contentPane; + } + + public void replaceContentPane(JComponent pane) { +// remove(pane); + this.remove(this.contentPane); + this.add(this.contentPane = pane); + refreshContainer(); + } + + private void refreshContainer() { + validate(); + repaint(); + revalidate(); } } } \ No newline at end of file From ac96717cb3ce16dc43c4492d7e87cddaec25fd9f Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 14 Jul 2017 11:55:21 +0800 Subject: [PATCH 038/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/ChartsConfigPane.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java index 057973df05..1bf04c4399 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartsConfigPane.java @@ -16,14 +16,6 @@ public abstract class ChartsConfigPane extends AbstractChartA public abstract Class acceptType(); - /** - * 拼错了的方法,暂时做下兼容,后面就删掉 - */ - @Deprecated - public Class accptType() { - return acceptType(); - } - @Override public void populate(ChartCollection collection) { if (StableUtils.classInstanceOf(collection.getSelectedChart().getClass(), acceptType())) { From 357d6c82db8c88ffa07d40169ccf8694fcfe33c6 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 14 Jul 2017 14:15:59 +0800 Subject: [PATCH 039/101] =?UTF-8?q?REPORT-3281=20=E5=90=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=AA=8C=E6=94=B6=E9=97=AE=E9=A2=98,=20=E6=97=A5?= =?UTF-8?q?=E6=96=87=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/BaseDesigner.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 4c9329c243..412b657271 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -16,13 +16,15 @@ import com.fr.design.fun.GlobalListenerProvider; import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.TemplatePane; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; -import com.fr.design.module.DesignModule; import com.fr.design.utils.DesignUtils; import com.fr.env.SignIn; import com.fr.file.FILE; import com.fr.file.FILEFactory; import com.fr.file.FileFILE; -import com.fr.general.*; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.general.ModuleContext; import com.fr.plugin.PluginCollector; import com.fr.stable.*; @@ -61,9 +63,6 @@ public abstract class BaseDesigner extends ToolBarMenuDock { } BuildContext.setBuildFilePath(buildPropertiesPath()); - // 先加载设计器的国际化文件 - Inter.loadLocaleFile(GeneralContext.getLocale(), DesignModule.LOCALE_FILE_PATH); - //下面这两句的位置不能随便调换,因为会影响语言切换的问题 initLanguage(); From eb852ef3cf94526803d7c1ffd0d45b4af1ed8428 Mon Sep 17 00:00:00 2001 From: loy Date: Fri, 14 Jul 2017 16:56:54 +0800 Subject: [PATCH 040/101] =?UTF-8?q?=E6=96=B0=E5=A1=AB=E6=8A=A5=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 1 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../src/com/fr/design/preview/WriteEnhancePreview.java | 4 ++-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 75aa03f718..4db8a0d8cc 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2006,3 +2006,4 @@ FR-Designer_AlphaFine_NoResult=no results FR-Designer_ConnectionFailed=connection failed FR-Designer_NoResult=No results FR-Designer-AlphaFine_SetShortcuts= +FR-Designer_Write_Enhance_Preview=Write Enhance Preview \ No newline at end of file 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 addb7514c8..247dc26df7 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 @@ -2006,3 +2006,4 @@ FR-Designer_AlphaFine_EnableAlphaFine=Enable AlphaFine FR-Designer_AlphaFine_EnableInternet=Internet FR-Designer_NoResult=No results FR-Designer-AlphaFine_SetShortcuts=please press two key to set shortcut +FR-Designer_Write_Enhance_Preview=Write Enhance Preview \ No newline at end of file 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 44ffa555bd..c538e6dfbf 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 @@ -2003,3 +2003,4 @@ FR-Designer_AlphaFine_NoResult=\u6682\u65E0\u76F8\u5173\u5185\u5BB9 FR-Designer_ConnectionFailed=\u94FE\u63A5\u5931\u8D25 FR-Designer_NoResult=\u6682\u4E0D\u652F\u6301\u663E\u793A FR-Designer-AlphaFine_SetShortcuts=\u8BF7\u76F4\u63A5\u5728\u952E\u76D8\u4E0A\u6309\u4E24\u4E2A\u7EC4\u5408\u952E +FR-Designer_Write_Enhance_Preview=\u65B0\u586B\u62A5\u9884\u89C8 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 e3f98c9c5b..55b3b0fc0f 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 @@ -2004,3 +2004,4 @@ FR-Designer_AlphaFine_NoResult=\u66AB\u7121\u76F8\u95DC\u5167\u5BB9 FR-Designer_ConnectionFailed=\u93C8\u63A5\u5931\u6557 FR-Designer_NoResult=\u66AB\u4E0D\u652F\u6301\u986F\u793A FR-Designer-AlphaFine_SetShortcuts=\u8ACB\u76F4\u63A5\u5728\u9375\u76E4\u4E0A\u6309\u5169\u500B\u7D44\u5408\u9375 +FR-Designer_Write_Enhance_Preview=\u65B0\u586B\u5831\u9810\u89BD diff --git a/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java b/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java index 0c6108b053..71705e9634 100644 --- a/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java +++ b/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java @@ -2,6 +2,7 @@ package com.fr.design.preview; import com.fr.base.io.IOFile; import com.fr.design.fun.impl.AbstractPreviewProvider; +import com.fr.general.Inter; import java.util.HashMap; import java.util.Map; @@ -12,8 +13,7 @@ import java.util.Map; public class WriteEnhancePreview extends AbstractPreviewProvider { @Override public String nameForPopupItem() { - //TODO 国际化 - return "新填报预览"; + return Inter.getLocText("FR-Designer_Write_Enhance_Preview"); } @Override From 1164a17f0cc193d36c53fea86f6d10fb6d3f7f9d Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 14 Jul 2017 17:11:42 +0800 Subject: [PATCH 041/101] =?UTF-8?q?REPORT-2825=20=E5=90=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=AA=8C=E6=94=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java index bd1f70829b..03e76dcdfc 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java @@ -2,6 +2,7 @@ package com.fr.design.fun.impl; import com.fr.design.fun.DesignerFrameUpButtonProvider; import com.fr.design.gui.ibutton.UIButton; +import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; /** @@ -10,7 +11,7 @@ import com.fr.stable.fun.mark.API; * Time: 15:50 */ @API(level = DesignerFrameUpButtonProvider.CURRENT_LEVEL) -public abstract class AbstractDsinFrameUpButtonProvider implements DesignerFrameUpButtonProvider { +public abstract class AbstractDsinFrameUpButtonProvider extends AbstractProvider implements DesignerFrameUpButtonProvider { @Override public UIButton[] getUpButtons(int menuState) { return new UIButton[0]; From 48cfd19b2152db221700abc23dcf9eaf9a642df3 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 14 Jul 2017 17:12:04 +0800 Subject: [PATCH 042/101] 1 --- .../fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java index 03e76dcdfc..94de38df87 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java @@ -11,7 +11,7 @@ import com.fr.stable.fun.mark.API; * Time: 15:50 */ @API(level = DesignerFrameUpButtonProvider.CURRENT_LEVEL) -public abstract class AbstractDsinFrameUpButtonProvider extends AbstractProvider implements DesignerFrameUpButtonProvider { +public abstract class AbstractDsinFrameUpButtonProvider exte nds AbstractProvider implements DesignerFrameUpButtonProvider { @Override public UIButton[] getUpButtons(int menuState) { return new UIButton[0]; From cae51e136d9281928fa897dbf26c6408f3a98888 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 14 Jul 2017 17:12:15 +0800 Subject: [PATCH 043/101] 1 --- .../fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java index 94de38df87..03e76dcdfc 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java @@ -11,7 +11,7 @@ import com.fr.stable.fun.mark.API; * Time: 15:50 */ @API(level = DesignerFrameUpButtonProvider.CURRENT_LEVEL) -public abstract class AbstractDsinFrameUpButtonProvider exte nds AbstractProvider implements DesignerFrameUpButtonProvider { +public abstract class AbstractDsinFrameUpButtonProvider extends AbstractProvider implements DesignerFrameUpButtonProvider { @Override public UIButton[] getUpButtons(int menuState) { return new UIButton[0]; From 6ee7cee67153785f80ecb7001a44019c3e0413be Mon Sep 17 00:00:00 2001 From: plough Date: Sat, 15 Jul 2017 07:01:05 +0800 Subject: [PATCH 044/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E5=AF=B9=E8=AF=9D=E6=A1=86=E7=9A=84=E5=88=9D=E6=AD=A5?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=9B=E8=B0=83=E6=95=B4=E5=BC=B9=E5=85=A5?= =?UTF-8?q?=E3=80=81=E5=BC=B9=E5=87=BA=E5=B7=A5=E5=85=B7=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 177 ++++++++++++++++-- 1 file changed, 165 insertions(+), 12 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 5f79606653..b73ff02ef6 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -2,18 +2,22 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.design.DesignerEnvManager; +import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.icontainer.UIResizableContainer; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.style.AbstractPopBox; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.FRFont; import com.fr.stable.Constants; +import com.fr.stable.StringUtils; import javax.swing.*; +import javax.swing.border.EmptyBorder; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; +import java.awt.event.*; import java.util.ArrayList; import java.util.List; @@ -24,7 +28,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private JPanel leftPane; private JPanel rightPane; private static final int CONTAINER_WIDTH = 260; - private static final int BUTTON_WIDTH = 40; + private static final int TAB_WIDTH = 40; + private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH; + private static final int POPUP_TOOLPANE_HEIGHT = 25; + private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30; /** * 得到实例 @@ -176,6 +183,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { * 刷新右面板 */ public void refreshRightPane() { + if (this.getRightPane() instanceof DockingView) { ((DockingView) this.getRightPane()).refreshDockingView(); } @@ -188,6 +196,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + public int getToolPaneY() { return 0; } @@ -198,9 +212,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // private UIButton button; private UIButton button; private String name; - private JPanel propertyPanel; + private JComponent propertyPanel; private JComponent contentPane; private PropertyFixedPopupPane popupPane; // 左侧固定弹出框 + private PopupToolPane popupToolPane; // 弹出工具条 private int x, y; // 弹出框的坐标 private int height; // 弹出框的高度 private boolean isPoppedOut; // 是否弹出 @@ -221,7 +236,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyPanel = new JPanel(); propertyPanel.setBackground(Color.pink); contentPane = generateContentPane(); + popupToolPane = new PopupToolPane(contentPane, PopupToolPane.UP_BUTTON); propertyPanel.setLayout(new BorderLayout()); + propertyPanel.add(popupToolPane, BorderLayout.NORTH); propertyPanel.add(contentPane, BorderLayout.CENTER); } @@ -256,16 +273,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } - private void refreshContainer() { - propertyPanel.validate(); - propertyPanel.repaint(); - propertyPanel.revalidate(); - } +// private void refreshContainer() { +// propertyPanel.validate(); +// propertyPanel.repaint(); +// propertyPanel.revalidate(); +// } private void initButton(String btnUrl) { button = new UIButton(BaseUtils.readIcon(btnUrl)) { public Dimension getPreferredSize() { - return new Dimension(BUTTON_WIDTH, BUTTON_WIDTH); + return new Dimension(TAB_WIDTH, TAB_WIDTH); } }; button.set4LargeToolbarButton(); @@ -289,7 +306,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return name; } - public JPanel getPropertyPanel() { + public JComponent getPropertyPanel() { return propertyPanel; } @@ -307,7 +324,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { PropertyFixedPopupPane(JComponent contentPane) { this.contentPane = contentPane; this.add(contentPane); - this.setPreferredSize(new Dimension(CONTAINER_WIDTH - BUTTON_WIDTH, getPreferredSize().height)); + this.setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, getPreferredSize().height)); } public JComponent getContentPane() { @@ -327,4 +344,140 @@ public class EastRegionContainerPane extends UIEastResizableContainer { revalidate(); } } + + // 弹出属性面板的工具条 + private class PopupToolPane extends JPanel { + private int model = UIConstants.MODEL_NORMAL; + private String title = "单元格元素"; + private JComponent contentPane; + private String buttonType; + private static final String NO_BUTTON = "NoButton"; + private static final String UP_BUTTON = "UpButton"; + private static final String DOWN_BUTTON = "DownButton"; + + public PopupToolPane(JComponent contentPane) { + this(contentPane, NO_BUTTON); + } + + public PopupToolPane(JComponent contentPane, String buttonType) { + super(); + this.contentPane = contentPane; + setLayout(new BorderLayout()); + UILabel label = new UILabel(title); + label.setForeground(new Color(69, 135, 255)); + add(label, BorderLayout.WEST); + setBorder(new EmptyBorder(5, 10, 0, 0)); + + initToolButton(buttonType); + } + + private void initToolButton(String buttonType) { + this.buttonType = buttonType; + if (buttonType.equals(NO_BUTTON)) { + return; + } + + if (buttonType.equals(UP_BUTTON)) { + + } else if (buttonType.equals(DOWN_BUTTON)) { + + } else { + throw new IllegalArgumentException("unknown button type: " + buttonType); + } + + addMouseMotionListener(new MouseMotionListener() { + @Override + public void mouseMoved(MouseEvent e) { + if (e.getX() >= ARROW_RANGE_START) { + setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + model = UIConstants.MODEL_PRESS; + } else { + setCursor(Cursor.getDefaultCursor()); + model = UIConstants.MODEL_NORMAL; + } + repaint(); + } + + @Override + public void mouseDragged(MouseEvent e) { + } + }); + addMouseListener(new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + setCursor(Cursor.getDefaultCursor()); + model = UIConstants.MODEL_NORMAL; + repaint(); + } + + @Override + public void mouseClicked(MouseEvent e) { + if (e.getX() >= ARROW_RANGE_START) { + popupDialog(); + } + } + }); + } + + public void popupDialog() { + new PopupDialog(contentPane); + } + + @Override + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, POPUP_TOOLPANE_HEIGHT); + } + + @Override + public void paint(Graphics g) { + super.paint(g); + Image button; + g.setColor(new Color(69, 135, 255)); + g.setFont(FRFont.getInstance().applySize(14)); +// g.drawString(title, 5, 20); +// g.drawImage(UIConstants.DRAG_BAR, 0, 0, CONTENT_WIDTH, POPUP_TOOLPANE_HEIGHT, null); + + if (buttonType.equals(NO_BUTTON)) { + return; + } + if (buttonType.equals(UP_BUTTON)) { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_LEFT_NORMAL; + } else { + button = UIConstants.DRAG_LEFT_PRESS; + } + } else { + if (model == UIConstants.MODEL_NORMAL) { + button = UIConstants.DRAG_RIGHT_NORMAL; + } else { + button = UIConstants.DRAG_RIGHT_PRESS; + } + } +// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); + g.drawImage(button, ARROW_RANGE_START + 12, 7, 5, 5, null); + } + } + + private class PopupDialog extends JDialog { + public PopupDialog(JComponent contentPane) { +// setUndecorated(true); +// JPanel pane = new JPanel(); +// pane.setBackground(Color.yellow); +// pane.setPreferredSize(new Dimension(100, 100)); +// +// getContentPane().add(pane); +// setSize(CONTENT_WIDTH, pane.getPreferredSize().height); + getContentPane().add(contentPane); + setSize(CONTENT_WIDTH, contentPane.getPreferredSize().height); + validate(); + + this.setVisible(true); + } + + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + } } \ No newline at end of file From 0a9708d434538dfd28bf0c27ac7bbb4592c5b813 Mon Sep 17 00:00:00 2001 From: plough Date: Sat, 15 Jul 2017 11:35:53 +0800 Subject: [PATCH 045/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=8F=AF=E6=8B=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 93 ++++++++++++++----- 1 file changed, 72 insertions(+), 21 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index b73ff02ef6..76f552dc09 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -51,8 +51,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { super(); // setVerticalDragEnabled(false); initPropertyItemList(); - initRightPane(); - initLeftPane(); + initContentPane(); // super(leftPane, rightPane); setContainerWidth(CONTAINER_WIDTH); } @@ -83,6 +82,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyItemList.add(widgetLib); } + private void initContentPane() { + initRightPane(); + initLeftPane(); + } + // 右侧属性面板 private void initRightPane() { rightPane = new JPanel(); @@ -109,6 +113,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { replaceLeftPane(leftPane); } + // 弹出面板时,更新框架内容 + private void removeItem(PropertyItem propertyItem) { + leftPane.remove(propertyItem.getButton()); + rightPane.remove(propertyItem.getPropertyPanel()); + refreshContainer(); + } + @Override public void onResize() { for (PropertyItem item : propertyItemList) { @@ -236,12 +247,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyPanel = new JPanel(); propertyPanel.setBackground(Color.pink); contentPane = generateContentPane(); - popupToolPane = new PopupToolPane(contentPane, PopupToolPane.UP_BUTTON); + popupToolPane = new PopupToolPane(this, PopupToolPane.UP_BUTTON); propertyPanel.setLayout(new BorderLayout()); propertyPanel.add(popupToolPane, BorderLayout.NORTH); propertyPanel.add(contentPane, BorderLayout.CENTER); } + public void setIsPoppedOut(boolean isPoppedOut) { + this.isPoppedOut = isPoppedOut; + } + public JComponent generateContentPane() { JComponent contentPane = new JPanel(); JButton testBtn = new JButton(name); @@ -350,18 +365,24 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private int model = UIConstants.MODEL_NORMAL; private String title = "单元格元素"; private JComponent contentPane; + private PropertyItem propertyItem; private String buttonType; + private JDialog parentDialog; // 如果不在对话框中,值为null + private boolean isMovable = false; + private Point mouseDownCompCoords; // 存储按下左键的位置,移动对话框时会用到 + private static final String NO_BUTTON = "NoButton"; private static final String UP_BUTTON = "UpButton"; private static final String DOWN_BUTTON = "DownButton"; - public PopupToolPane(JComponent contentPane) { - this(contentPane, NO_BUTTON); + public PopupToolPane(PropertyItem propertyItem) { + this(propertyItem, NO_BUTTON); } - public PopupToolPane(JComponent contentPane, String buttonType) { + public PopupToolPane(PropertyItem propertyItem, String buttonType) { super(); - this.contentPane = contentPane; + this.propertyItem = propertyItem; + this.contentPane = propertyItem.getContentPane(); setLayout(new BorderLayout()); UILabel label = new UILabel(title); label.setForeground(new Color(69, 135, 255)); @@ -371,7 +392,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { initToolButton(buttonType); } - private void initToolButton(String buttonType) { + public void setParentDialog(JDialog parentDialog) { + this.parentDialog = parentDialog; + isMovable = true; + } + + private void initToolButton(final String buttonType) { this.buttonType = buttonType; if (buttonType.equals(NO_BUTTON)) { return; @@ -400,6 +426,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void mouseDragged(MouseEvent e) { + if (isMovable && e.getX() < ARROW_RANGE_START) { + Point currCoords = e.getLocationOnScreen(); + parentDialog.setLocation(currCoords.x - mouseDownCompCoords.x, currCoords.y - mouseDownCompCoords.y); + } } }); addMouseListener(new MouseAdapter() { @@ -413,14 +443,35 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void mouseClicked(MouseEvent e) { if (e.getX() >= ARROW_RANGE_START) { - popupDialog(); + onPop(); } } + + @Override + public void mouseReleased(MouseEvent e) { + mouseDownCompCoords = null; + } + @Override + public void mousePressed(MouseEvent e) { + mouseDownCompCoords = e.getPoint(); + } + }); } - public void popupDialog() { - new PopupDialog(contentPane); + // 触发弹入、弹出 + private void onPop() { + if (buttonType.equals(UP_BUTTON)) { + popUpDialog(); + } + } + + public void popUpDialog() { + propertyItem.setIsPoppedOut(true); + new PopupDialog(propertyItem); +// initContentPane(); +// refreshContainer(); + removeItem(propertyItem); } @Override @@ -459,25 +510,25 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } private class PopupDialog extends JDialog { - public PopupDialog(JComponent contentPane) { -// setUndecorated(true); + private Container container; + public PopupDialog(PropertyItem propertyItem) { + container = getContentPane(); + setUndecorated(true); // JPanel pane = new JPanel(); // pane.setBackground(Color.yellow); // pane.setPreferredSize(new Dimension(100, 100)); // // getContentPane().add(pane); // setSize(CONTENT_WIDTH, pane.getPreferredSize().height); - getContentPane().add(contentPane); - setSize(CONTENT_WIDTH, contentPane.getPreferredSize().height); + PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.DOWN_BUTTON); + popupToolPane.setParentDialog(this); + JComponent contentPane = propertyItem.getContentPane(); + container.add(popupToolPane, BorderLayout.NORTH); + container.add(contentPane, BorderLayout.CENTER); + setSize(CONTENT_WIDTH, container.getPreferredSize().height); validate(); this.setVisible(true); } - - private void refreshContainer() { - validate(); - repaint(); - revalidate(); - } } } \ No newline at end of file From dadb31b82e43544deb44f8986a14c6e2535482a2 Mon Sep 17 00:00:00 2001 From: plough Date: Sat, 15 Jul 2017 23:22:39 +0800 Subject: [PATCH 046/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=8F=AF?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E3=80=81=E5=BC=B9=E5=85=A5=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=EF=BC=9B=E9=99=90=E5=88=B6=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E5=8F=AF=E7=A7=BB=E5=8A=A8=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 61 +++++++++++++++---- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 76f552dc09..baef0d069d 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -5,14 +5,10 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIEastResizableContainer; -import com.fr.design.gui.icontainer.UIResizableContainer; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; -import com.fr.design.style.AbstractPopBox; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; -import com.fr.stable.Constants; -import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.border.EmptyBorder; @@ -225,11 +221,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private String name; private JComponent propertyPanel; private JComponent contentPane; - private PropertyFixedPopupPane popupPane; // 左侧固定弹出框 + private FixedPopupPane popupPane; // 左侧固定弹出框 private PopupToolPane popupToolPane; // 弹出工具条 private int x, y; // 弹出框的坐标 private int height; // 弹出框的高度 - private boolean isPoppedOut; // 是否弹出 + private boolean isPoppedOut = false; // 是否弹出 private Dimension fixedSize; public PropertyItem(String name, String btnUrl) { @@ -328,15 +324,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 弹出对话框 public void popupFixedPane() { if (popupPane == null) { - popupPane = new PropertyFixedPopupPane(contentPane); + popupPane = new FixedPopupPane(contentPane); } GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0); } } - private class PropertyFixedPopupPane extends JPopupMenu { + private class FixedPopupPane extends JPopupMenu { private JComponent contentPane; - PropertyFixedPopupPane(JComponent contentPane) { + FixedPopupPane(JComponent contentPane) { this.contentPane = contentPane; this.add(contentPane); this.setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, getPreferredSize().height)); @@ -371,6 +367,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private boolean isMovable = false; private Point mouseDownCompCoords; // 存储按下左键的位置,移动对话框时会用到 + private static final int MIN_X = -150; + private static final int MIN_Y_SHIFT = 50; + private static final int MAX_X_SHIFT = 50; + private static final int MAX_Y_SHIFT = 50; + + private static final String NO_BUTTON = "NoButton"; private static final String UP_BUTTON = "UpButton"; private static final String DOWN_BUTTON = "DownButton"; @@ -426,9 +428,28 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void mouseDragged(MouseEvent e) { - if (isMovable && e.getX() < ARROW_RANGE_START) { + if (isMovable && mouseDownCompCoords != null) { Point currCoords = e.getLocationOnScreen(); - parentDialog.setLocation(currCoords.x - mouseDownCompCoords.x, currCoords.y - mouseDownCompCoords.y); + int x = currCoords.x - mouseDownCompCoords.x; + int y = currCoords.y - mouseDownCompCoords.y; + //屏幕可用区域 + Rectangle screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); + + int minY = screen.y; + int maxX = Toolkit.getDefaultToolkit().getScreenSize().width - MAX_X_SHIFT; + int maxY = Toolkit.getDefaultToolkit().getScreenSize().height - MAX_Y_SHIFT; + if (x < MIN_X) { + x = MIN_X; + } else if (x > maxX) { + x = maxX; + } + if (y < minY) { + y = minY; + } else if (y > maxY) { + y = maxY; + } + // 移动到屏幕边缘时,需要校正位置 + parentDialog.setLocation(x, y); } } }); @@ -453,7 +474,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } @Override public void mousePressed(MouseEvent e) { - mouseDownCompCoords = e.getPoint(); + if (e.getX() < ARROW_RANGE_START) { + mouseDownCompCoords = e.getPoint(); + } } }); @@ -463,6 +486,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private void onPop() { if (buttonType.equals(UP_BUTTON)) { popUpDialog(); + } else if (buttonType.equals(DOWN_BUTTON)) { + popToFrame(); } } @@ -474,6 +499,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { removeItem(propertyItem); } + public void popToFrame() { + propertyItem.setIsPoppedOut(false); + parentDialog.dispose(); + initContentPane(); + onResize(); + refreshContainer(); + } + @Override public Dimension getPreferredSize() { return new Dimension(super.getPreferredSize().width, POPUP_TOOLPANE_HEIGHT); @@ -526,8 +559,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { container.add(popupToolPane, BorderLayout.NORTH); container.add(contentPane, BorderLayout.CENTER); setSize(CONTENT_WIDTH, container.getPreferredSize().height); - validate(); + validate(); + Point btnCoords = propertyItem.getButton().getLocationOnScreen(); + this.setLocation(btnCoords.x - CONTENT_WIDTH, btnCoords.y); this.setVisible(true); } } From 73a01b1730612509dafb3ee0b16bde398f3b15ca Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 17 Jul 2017 09:09:14 +0800 Subject: [PATCH 047/101] =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=9D=A1panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JSliderPane.java | 256 ++++++++++++++++++ .../series/PlotSeries/MapCustomPane.java | 4 +- 2 files changed, 258 insertions(+), 2 deletions(-) create mode 100644 designer_base/src/com/fr/design/mainframe/JSliderPane.java diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java new file mode 100644 index 0000000000..40808db99c --- /dev/null +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -0,0 +1,256 @@ +package com.fr.design.mainframe; + +import com.fr.base.BaseUtils; +import com.fr.design.file.MutilTempalteTabPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.islider.UISlider; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import javax.swing.plaf.basic.BasicSliderUI; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * Created by MoMeak on 2017/7/13. + */ +public class JSliderPane extends JPanel { + + private final int KERNING = 2; + private static JSliderPane THIS; + private UITextField showVal; + private UISlider slider; + private int times; + private int sliderValue; + private UIButton downButton; + private UIButton upButton; + private int showValue; + //拖动条处理和button、直接输入不一样 + private boolean isButtonOrIsTxt = true; + + + public JSliderPane() { + this.setLayout(new BorderLayout()); + slider = new UISlider(0,100,50); + slider.setUI(new JSliderPaneUI(slider)); + slider.addChangeListener(listener); + + showVal = new UITextField(); + showVal.setText("100%"); + + showVal.getDocument().addDocumentListener(showValDocumentListener); + + downButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveDown.png")); + upButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveUp.png")); + downButton.setActionCommand("less"); + upButton.setActionCommand("more"); + downButton.addActionListener(buttonActionListener); + upButton.addActionListener(buttonActionListener); + +// double f = TableLayout.FILL; +// double p = TableLayout.PREFERRED; +// Component[][] components = new Component[][]{ +// new Component[]{downButton, slider, upButton, showVal}, +// }; +// double[] rowSize = {p}; +// double[] columnSize = {p,p,p,p}; +// JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + JPanel panel = new JPanel(new FlowLayout(1,1,0)); + + panel.add(downButton); + panel.add(slider); + panel.add(upButton); + panel.add(showVal); + +// JPanel panel = new JPanel(null); +// panel.add(downButton); +// panel.add(slider); +// panel.add(upButton); +// panel.add(showVal); +// downButton.setBounds(0,0,16,16); +// slider.setBounds(16+KERNING,0,160,16); +// upButton.setBounds(176+KERNING*2,0,16,16); +// showVal.setBounds(192+KERNING*3,0,40,16); + this.add(panel,BorderLayout.NORTH); + this.setBounds(0,0,260,16); + } + + public static final JSliderPane getInstance() { + if (THIS == null) { + THIS = new JSliderPane(); + } + return THIS; + } + + + + //定义一个监听器,用于监听所有滑动条 + ChangeListener listener = new ChangeListener() + { + public void stateChanged( ChangeEvent event) { + //取出滑动条的值,并在文本中显示出来 + if (!isButtonOrIsTxt){ + JSlider source = (JSlider) event.getSource(); + EventQueue.invokeLater(new Runnable() { + public void run() { + sliderValue = slider.getValue(); + getTimes(sliderValue); + showVal.setText(times + "%"); + } + }); + }else { + isButtonOrIsTxt = false; + } + } + }; + + DocumentListener showValDocumentListener = new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + isButtonOrIsTxt = true; + refreshSlider(); + } + + @Override + public void removeUpdate(DocumentEvent e) { +// refreshSlider(); + } + + @Override + public void changedUpdate(DocumentEvent e) { +// refreshSlider(); + } + }; + + private void refreshSlider(){ + showValue = Integer.parseInt(showVal.getText().substring(0, showVal.getText().indexOf("%"))); + if (showValue >100){ + slider.setValue((int)(showValue+200)/6); + }else if (showValue <100){ + slider.setValue((int)((showValue-10)/1.8)); + }else if (showValue == 100){ + slider.setValue(50); + } + } + + ActionListener buttonActionListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + showValue = Integer.parseInt(showVal.getText().substring(0, showVal.getText().indexOf("%"))); + isButtonOrIsTxt = true; + if(e.getActionCommand().equals("less")){ + int newDownVal = showValue - 10; + if (newDownVal >= 10 ){ + showVal.setText(newDownVal + "%"); + }else { + showVal.setText(10 + "%"); + } + } + if(e.getActionCommand().equals("more")){ + int newUpVal = showValue + 10; + if (newUpVal <= 400 ){ + showVal.setText(newUpVal + "%"); + }else { + showVal.setText(400 + "%"); + } + } + isButtonOrIsTxt = true; + } + }; + + private void getTimes(int value){ + if (value == 50){ + times=100; + }else if (value < 50){ + times = (int) Math.round(1.8*value + 10); + }else { + times = (int) (6*value - 200); + } + } + + + public static void main(String[] args) + { + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel)jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(JSliderPane.getInstance(),BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(320, 80); + jf.setVisible(true); + + } +} + +class JSliderPaneUI extends BasicSliderUI { + + public JSliderPaneUI(UISlider b) { + super(b); + } + + /** */ + /** + * 绘制指示物 + */ + + public Dimension getThumbSize() { + Dimension size = new Dimension(); + + if ( slider.getOrientation() == JSlider.VERTICAL ) { + size.width = 11; + size.height = 16; + } + else { + size.width = 11; + size.height = 16; + } + + return size; + } + + public void paintThumb(Graphics g) { + Rectangle knobBounds = thumbRect; + int w = knobBounds.width; + int h = knobBounds.height; + + g.translate(knobBounds.x, knobBounds.y); + if ( slider.isEnabled() ) { + g.setColor(slider.getBackground()); + } + else { + g.setColor(slider.getBackground().darker()); + } + g.setColor(Color.darkGray); + g.fillRect(0, 1, w-6, h+1); + } + + /** */ + /** + * 绘制刻度轨迹 + */ + public void paintTrack(Graphics g) { + int cy, cw; + Rectangle trackBounds = trackRect; + if (slider.getOrientation() == UISlider.HORIZONTAL) { + Graphics2D g2 = (Graphics2D) g; + cy = (trackBounds.height / 2); + cw = trackBounds.width; + g.setColor(Color.lightGray); + g.drawLine(0, cy, cw+5, cy); + g.drawLine(5+cw/2, cy-4, 5+cw/2, cy+4); + } else { + super.paintTrack(g); + } + } + +} diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java index d844631c05..21a778f1a2 100644 --- a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -19,7 +19,7 @@ import com.fr.general.GeneralUtils; import com.fr.general.Inter; import com.fr.general.data.DataModel; import com.fr.stable.StringUtils; -import org.apache.batik.swing.svg.SVGFileFilter; +//import org.apache.batik.swing.svg.SVGFileFilter; import javax.swing.*; import java.awt.*; @@ -107,7 +107,7 @@ refreshAreaNameBox(); public void actionPerformed(ActionEvent evt) { JFileChooser svgFileChooser = new JFileChooser(); - svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); +// svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); if (StringUtils.isNotBlank(lastSelectPath)) { svgFileChooser.setSelectedFile(new File(lastSelectPath)); } From 37459e61bc4d6e717a22ce7509cb2be72ea8c319 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 17 Jul 2017 09:15:17 +0800 Subject: [PATCH 048/101] =?UTF-8?q?rollback=E7=BC=96=E8=AF=91=E4=B8=8D?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E7=9A=84=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/chart/series/PlotSeries/MapCustomPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java index 21a778f1a2..d844631c05 100644 --- a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -19,7 +19,7 @@ import com.fr.general.GeneralUtils; import com.fr.general.Inter; import com.fr.general.data.DataModel; import com.fr.stable.StringUtils; -//import org.apache.batik.swing.svg.SVGFileFilter; +import org.apache.batik.swing.svg.SVGFileFilter; import javax.swing.*; import java.awt.*; @@ -107,7 +107,7 @@ refreshAreaNameBox(); public void actionPerformed(ActionEvent evt) { JFileChooser svgFileChooser = new JFileChooser(); -// svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); + svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); if (StringUtils.isNotBlank(lastSelectPath)) { svgFileChooser.setSelectedFile(new File(lastSelectPath)); } From 4eda8b556646482f41b9ecf11138ee0a2021c7d5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 09:59:41 +0800 Subject: [PATCH 049/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=9B=BA=E5=AE=9A=E5=BC=B9=E7=AA=97=E7=9A=84=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/EastRegionContainerPane.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index baef0d069d..97d6cc28b2 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; +import ij.gui.Toolbar; import javax.swing.*; import javax.swing.border.EmptyBorder; @@ -324,7 +325,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 弹出对话框 public void popupFixedPane() { if (popupPane == null) { - popupPane = new FixedPopupPane(contentPane); + popupPane = new FixedPopupPane(this); } GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0); } @@ -332,9 +333,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private class FixedPopupPane extends JPopupMenu { private JComponent contentPane; - FixedPopupPane(JComponent contentPane) { - this.contentPane = contentPane; + FixedPopupPane(PropertyItem propertyItem) { + contentPane = propertyItem.getContentPane(); + this.add(new PopupToolPane(propertyItem)); this.add(contentPane); + this.setOpaque(false); this.setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, getPreferredSize().height)); } From e5c2b0afd8ddef21ff76de08ad87c4fbd96e048b Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 13:54:45 +0800 Subject: [PATCH 050/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=8F=AF=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 64 ++++++++++++++++--- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 97d6cc28b2..1db206f5df 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -547,26 +547,74 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private class PopupDialog extends JDialog { private Container container; + private static final int RESIZE_RANGE = 4; + private Cursor originCursor; + private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR); + private Point mouseDownCompCoords; + private int minHeight; // 对话框最小高度 public PopupDialog(PropertyItem propertyItem) { container = getContentPane(); setUndecorated(true); -// JPanel pane = new JPanel(); -// pane.setBackground(Color.yellow); -// pane.setPreferredSize(new Dimension(100, 100)); -// -// getContentPane().add(pane); -// setSize(CONTENT_WIDTH, pane.getPreferredSize().height); PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.DOWN_BUTTON); popupToolPane.setParentDialog(this); JComponent contentPane = propertyItem.getContentPane(); container.add(popupToolPane, BorderLayout.NORTH); container.add(contentPane, BorderLayout.CENTER); - setSize(CONTENT_WIDTH, container.getPreferredSize().height); - + minHeight = container.getPreferredSize().height; + setSize(CONTENT_WIDTH, minHeight); validate(); Point btnCoords = propertyItem.getButton().getLocationOnScreen(); this.setLocation(btnCoords.x - CONTENT_WIDTH, btnCoords.y); + + initListener(); this.setVisible(true); } + private void initListener() { + addMouseMotionListener(new MouseMotionListener() { + @Override + public void mouseDragged(MouseEvent e) { + if (mouseDownCompCoords != null) { + Rectangle bounds = getBounds(); + Point currCoords = e.getLocationOnScreen(); + bounds.height = currCoords.y - mouseDownCompCoords.y + bounds.height; + // 校正位置 + if (bounds.height < minHeight) { + bounds.height = minHeight; + } + mouseDownCompCoords.y = currCoords.y; + setBounds(bounds); + } + } + + @Override + public void mouseMoved(MouseEvent e) { + if (originCursor == null) { // 记录最初的光标 + originCursor = getCursor(); + } + if (e.getY() > getHeight() - RESIZE_RANGE) { + setCursor(southResizeCursor); + } else { + // 还原 + if (mouseDownCompCoords == null && getCursor().equals(southResizeCursor)) { + setCursor(originCursor); + } + } + + repaint(); + } + }); + addMouseListener(new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + if (getCursor().equals(southResizeCursor)) { + mouseDownCompCoords = e.getLocationOnScreen(); + } + } + @Override + public void mouseReleased(MouseEvent e) { + mouseDownCompCoords = null; + } + }); + } } } \ No newline at end of file From 1aceeba735c8afb2271cf5874742e5fb78bd1f1b Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 17 Jul 2017 15:42:08 +0800 Subject: [PATCH 051/101] =?UTF-8?q?REPORT-1013=20=E7=94=A8log4j=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=97=A5=E5=BF=97.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 2 +- .../loghandler/DesignerLogAppendThread.java | 60 +++++++++++++++++++ .../loghandler/DesignerLogHandler.java | 24 ++------ .../com/fr/design/module/DesignModule.java | 6 +- 4 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 536574f9c6..d02d41abf4 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map.Entry; import java.util.logging.FileHandler; import java.util.logging.Handler; -import java.util.logging.Level; +import org.apache.log4j.Level; /** * The manager of Designer GUI. diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java new file mode 100644 index 0000000000..0d374bdfed --- /dev/null +++ b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java @@ -0,0 +1,60 @@ +package com.fr.design.mainframe.loghandler; + +import com.fr.general.LogRecordTime; +import com.fr.stable.StringUtils; +import org.apache.log4j.Appender; +import org.apache.log4j.Logger; +import org.apache.log4j.WriterAppender; + +import java.io.PipedReader; +import java.io.PipedWriter; +import java.io.Writer; +import java.util.Date; +import java.util.Scanner; +import java.util.logging.Level; +import java.util.logging.LogRecord; + +/** + * Created by Administrator on 2017/6/2/0002. + */ +public class DesignerLogAppendThread extends Thread{ + + PipedReader reader; + + public DesignerLogAppendThread() { + Logger root = Logger.getRootLogger(); + // ȡӼ¼Դ + Appender appender = root.getAppender("design"); + // һδӵܵ + reader = new PipedReader(); + // һӵӵreader + Writer writer = null; + try { + writer = new PipedWriter(reader); + // appender + ((WriterAppender) appender).setWriter(writer); + } catch (Throwable e) { + } + } + + public void run() { + // ϵɨ + Scanner scanner = new Scanner(reader); + + // ɨ赽ַӡĿ + while (scanner.hasNext()) { + try { + Thread.sleep(100); + String log = scanner.nextLine(); + if (StringUtils.isEmpty(log)) { + return; + } + + LogRecordTime logRecordTime = new LogRecordTime(new Date(),new LogRecord(Level.INFO, log)); + DesignerLogHandler.getInstance().printRemoteLog(logRecordTime); + } catch (Throwable e) { + + } + } + } +} diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java index e45ade484a..ddf301fd28 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java @@ -18,15 +18,14 @@ import java.awt.*; import java.awt.event.*; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.logging.Handler; import java.util.logging.LogRecord; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; public class DesignerLogHandler { - protected static final int INFO_INT = FRLogLevel.INFO.intValue(); - protected static final int ERRO_INT = FRLogLevel.ERROR.intValue(); - protected static final int SERVER_INT = FRLogLevel.SEVERE.intValue(); + protected static final int INFO_INT = FRLogLevel.INFO.toInt(); + protected static final int ERRO_INT = FRLogLevel.ERROR.toInt(); + protected static final int SERVER_INT = FRLogLevel.SEVERE.toInt(); private static final int GAP_X = -150; private static final int INFO_GAP_Y = -60; private static final int ERRO_GAP_Y = -40; @@ -91,7 +90,7 @@ public class DesignerLogHandler { @Override public void actionPerformed(ActionEvent e) { JPopupMenu showsetPopup = new JPopupMenu(); - int logLevelvalue = DesignerEnvManager.getEnvManager().getLogLevel().intValue(); + int logLevelvalue = DesignerEnvManager.getEnvManager().getLogLevel().toInt(); if (logLevelvalue <= INFO_INT) { showsetPopup.add(showInfo); showsetPopup.add(showError); @@ -169,21 +168,6 @@ public class DesignerLogHandler { } } }); - - // 写到日志面板上面的Log和日志工具栏 - FRContext.getLogger().addLogHandler(new Handler() { - public void publish(LogRecord logRecord) { - Date date = new Date(); - LogRecordTime logRecordTime = new LogRecordTime(date, logRecord); - printStackTrace(logRecordTime); - } - - public void flush() { - } - - public void close() { - } - }); } private JTextPane initLogJTextArea() { diff --git a/designer_base/src/com/fr/design/module/DesignModule.java b/designer_base/src/com/fr/design/module/DesignModule.java index f04aa54741..1929452b99 100644 --- a/designer_base/src/com/fr/design/module/DesignModule.java +++ b/designer_base/src/com/fr/design/module/DesignModule.java @@ -12,11 +12,11 @@ import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.mainframe.App; import com.fr.design.mainframe.DesignerFrame; +import com.fr.design.mainframe.loghandler.DesignerLogAppendThread; import com.fr.general.Inter; import com.fr.general.ModuleContext; import com.fr.js.*; import com.fr.module.TopModule; -import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraDesignClassManagerProvider; @@ -45,6 +45,10 @@ public abstract class DesignModule extends TopModule { ActionFactory.registerCellInsertActionClass(actionsForInsertCellElement()); ActionFactory.registerFloatInsertActionClass(actionsForInsertFloatElement()); DesignModuleFactory.registerCreators4Hyperlink(hyperlinkTypes()); + + // 将log4j日志输出到设计器日志面板的线程. + DesignerLogAppendThread logTread = new DesignerLogAppendThread(); + logTread.start(); } public boolean isStarted() { From e2790a4cc8ffb16c10998e2b0343c88c4d70ef19 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 17 Jul 2017 15:45:51 +0800 Subject: [PATCH 052/101] utf8 --- .../loghandler/DesignerLogAppendThread.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java index 0d374bdfed..12d2816276 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java @@ -23,25 +23,25 @@ public class DesignerLogAppendThread extends Thread{ public DesignerLogAppendThread() { Logger root = Logger.getRootLogger(); - // ȡӼ¼Դ + // 获取子记录器的输出源 Appender appender = root.getAppender("design"); - // һδӵܵ + // 定义一个未连接的输入流管道 reader = new PipedReader(); - // һӵӵreader + // 定义一个已连接的输出流管理,并连接到reader Writer writer = null; try { writer = new PipedWriter(reader); - // appender + // 设置 appender 输出流 ((WriterAppender) appender).setWriter(writer); } catch (Throwable e) { } } public void run() { - // ϵɨ + // 不间断地扫描输入流 Scanner scanner = new Scanner(reader); - // ɨ赽ַӡĿ + // 将扫描到的字符流打印在屏目 while (scanner.hasNext()) { try { Thread.sleep(100); From c5e83b3b132246af4094ba465eb257c6fe20d9c5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 16:31:47 +0800 Subject: [PATCH 053/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BC=B9=E7=AA=97bug=EF=BC=9A1=E3=80=81=E5=A4=B1?= =?UTF-8?q?=E7=84=A6=E5=90=8E=E8=A2=AB=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=A6=86?= =?UTF-8?q?=E7=9B=96=EF=BC=9B2=E3=80=81=E5=BC=B9=E5=87=BA=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E4=B8=8D=E5=90=8C=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=EF=BC=8C=E9=9D=A2=E6=9D=BF=E6=B2=A1=E6=9C=89=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=EF=BC=9B3=E3=80=81=E5=BC=B9=E5=87=BA=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E4=B8=8D=E5=90=8C=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=EF=BC=8C=E5=BC=B9=E5=9B=9E=EF=BC=8C=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=EF=BC=9B4=E3=80=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=97=B6=EF=BC=8C=E5=86=85=E5=AE=B9=E4=B8=8D?= =?UTF-8?q?=E5=BA=94=E8=A2=AB=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 102 +++++++++++++----- 1 file changed, 76 insertions(+), 26 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 1db206f5df..27a012783b 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -9,7 +9,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; -import ij.gui.Toolbar; import javax.swing.*; import javax.swing.border.EmptyBorder; @@ -156,6 +155,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public static void main(String[] args){ JFrame jf = new JFrame("test"); +// jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel cc = new JPanel(); @@ -224,6 +225,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private JComponent contentPane; private FixedPopupPane popupPane; // 左侧固定弹出框 private PopupToolPane popupToolPane; // 弹出工具条 + private PopupDialog popupDialog; // 弹出框 private int x, y; // 弹出框的坐标 private int height; // 弹出框的高度 private boolean isPoppedOut = false; // 是否弹出 @@ -270,6 +272,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public void replaceContentPane(JComponent pane) { propertyPanel.remove(this.contentPane); propertyPanel.add(this.contentPane = pane); + if (popupDialog != null && isPoppedOut) { + popupDialog.replaceContentPane(contentPane); + } + if (popupPane != null && !isRightPaneVisible()) { + popupPane.replaceContentPane(contentPane); + } + refreshContainer(); } @@ -322,23 +331,62 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return propertyPanel; } - // 弹出对话框 + // 固定弹窗 public void popupFixedPane() { if (popupPane == null) { popupPane = new FixedPopupPane(this); } GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0); } + + // 弹出对话框 + public void popupDialog() { +// setIsPoppedOut(true); + if (isPoppedOut) { + return; + } + isPoppedOut = true; + if (popupDialog == null) { + popupDialog = new PopupDialog(this); + } else { + popupDialog.replaceContentPane(contentPane); + popupDialog.setVisible(true); + } +// initContentPane(); +// refreshContainer(); + removeItem(this); + } + + public void popToFrame() { + if (isPoppedOut) { + isPoppedOut = false; +// popupDialog.dispose(); + popupDialog.setVisible(false); + initContentPane(); + onResize(); + refreshContainer(); + } + } } private class FixedPopupPane extends JPopupMenu { private JComponent contentPane; +// private PopupToolPane popupToolPane; + private int fixedHeight; FixedPopupPane(PropertyItem propertyItem) { contentPane = propertyItem.getContentPane(); - this.add(new PopupToolPane(propertyItem)); - this.add(contentPane); + this.setLayout(new BorderLayout()); +// popupToolPane = ; + this.add(new PopupToolPane(propertyItem), BorderLayout.NORTH); + this.add(contentPane, BorderLayout.CENTER); this.setOpaque(false); - this.setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, getPreferredSize().height)); + fixedHeight = getPreferredSize().height - contentPane.getPreferredSize().height; + updateSize(); + } + + private void updateSize() { + int newHeight = fixedHeight + contentPane.getPreferredSize().height; + this.setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, newHeight)); } public JComponent getContentPane() { @@ -349,6 +397,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // remove(pane); this.remove(this.contentPane); this.add(this.contentPane = pane); + updateSize(); refreshContainer(); } @@ -371,7 +420,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private Point mouseDownCompCoords; // 存储按下左键的位置,移动对话框时会用到 private static final int MIN_X = -150; - private static final int MIN_Y_SHIFT = 50; private static final int MAX_X_SHIFT = 50; private static final int MAX_Y_SHIFT = 50; @@ -488,28 +536,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 触发弹入、弹出 private void onPop() { if (buttonType.equals(UP_BUTTON)) { - popUpDialog(); + propertyItem.popupDialog(); } else if (buttonType.equals(DOWN_BUTTON)) { - popToFrame(); + propertyItem.popToFrame(); } } - public void popUpDialog() { - propertyItem.setIsPoppedOut(true); - new PopupDialog(propertyItem); -// initContentPane(); -// refreshContainer(); - removeItem(propertyItem); - } - - public void popToFrame() { - propertyItem.setIsPoppedOut(false); - parentDialog.dispose(); - initContentPane(); - onResize(); - refreshContainer(); - } - @Override public Dimension getPreferredSize() { return new Dimension(super.getPreferredSize().width, POPUP_TOOLPANE_HEIGHT); @@ -552,23 +584,41 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR); private Point mouseDownCompCoords; private int minHeight; // 对话框最小高度 + private JComponent contentPane; public PopupDialog(PropertyItem propertyItem) { + super(DesignerContext.getDesignerFrame()); container = getContentPane(); setUndecorated(true); PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.DOWN_BUTTON); popupToolPane.setParentDialog(this); - JComponent contentPane = propertyItem.getContentPane(); + contentPane = propertyItem.getContentPane(); container.add(popupToolPane, BorderLayout.NORTH); container.add(contentPane, BorderLayout.CENTER); minHeight = container.getPreferredSize().height; setSize(CONTENT_WIDTH, minHeight); - validate(); +// validate(); Point btnCoords = propertyItem.getButton().getLocationOnScreen(); this.setLocation(btnCoords.x - CONTENT_WIDTH, btnCoords.y); initListener(); this.setVisible(true); } + public void replaceContentPane(JComponent contentPane) { + container.remove(this.contentPane); + container.add(this.contentPane = contentPane); +// pack(); + if (getSize().height < container.getPreferredSize().height) { + setSize(CONTENT_WIDTH, container.getPreferredSize().height); + } + refreshContainer(); + } + + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + private void initListener() { addMouseMotionListener(new MouseMotionListener() { @Override From 1d44dc94db43896a37c21727e5a88c66e3c631e5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 17:15:02 +0800 Subject: [PATCH 054/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=A0=87=E9=A2=98=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/locale/designer.properties | 5 +++- .../design/locale/designer_en_US.properties | 5 +++- .../design/locale/designer_ja_JP.properties | 6 +++- .../design/locale/designer_ko_KR.properties | 7 +++-- .../design/locale/designer_zh_CN.properties | 4 +++ .../design/locale/designer_zh_TW.properties | 4 +++ .../mainframe/EastRegionContainerPane.java | 28 ++++++++++++------- 7 files changed, 44 insertions(+), 15 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3c6d79d4dd..9365dec33f 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2001,8 +2001,11 @@ FR-Designer_AlphaFine_Latest=Latest FR-Designer_AlphaFine_ShowLess=show less FR-Designer_Alphafine=AlphaFine FR-Designer-Alphafine_No_Remind= -<<<<<<< HEAD FR-Designer_AlphaFine_NoResult=no results FR-Designer_ConnectionFailed=connection failed FR-Designer_NoResult=No results FR-Designer-AlphaFine_SetShortcuts= +FR-Designer_Cell_Element=Cell Element +FR-Designer_Cell_Attributes=Cell Attributes +FR-Designer_Float_Element=Float Element +FR-Designer_Widget_Library=Widget Library 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 1d11d02d12..de31129798 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 @@ -1998,7 +1998,6 @@ FR-Designer_AlphaFine_ShowAll=Show all FR-Designer_AlphaFine_Latest=Recent FR-Designer_AlphaFine_ShowLess=Show less FR-Designer_Alphafine=AlphaFine -<<<<<<< HEAD FR-Designer-Alphafine_No_Remind=don't remind FR-Designer_AlphaFine_NoResult=No results FR-Designer_ConnectionFailed=Connection failed @@ -2006,3 +2005,7 @@ FR-Designer_AlphaFine_EnableAlphaFine=Enable AlphaFine FR-Designer_AlphaFine_EnableInternet=Internet FR-Designer_NoResult=No results FR-Designer-AlphaFine_SetShortcuts=please press two key to set shortcut +FR-Designer_Cell_Element=Cell Element +FR-Designer_Cell_Attributes=Cell Attributes +FR-Designer_Float_Element=Float Element +FR-Designer_Widget_Library=Widget Library 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 5b73160401..e17d249f55 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 @@ -1981,4 +1981,8 @@ FR-Designer_Edit_String_To_Formula=\u30AD\u30E3\u30E9\u30AF\u30BF\u30FC\u6587\u5 FR-Base_UnSignIn=\ \u672A\u30ED\u30B0\u30A4\u30F3 Every=\u6BCF CellWrite-Preview_Cell_Content=\u30BB\u30EB\u306E\u5185\u5BB9\u3092\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B -FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9 \ No newline at end of file +FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9 +FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20 +FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027 +FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20 +FR-Designer_Widget_Library= \ No newline at end of file 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 43c9eb1bcb..dfa6a7d32e 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 @@ -446,7 +446,6 @@ FR-Designer_WLayout-Absolute-ToolTips=\uC790\uC720\uC2DD\uB808\uC774\uC544\uC6C3 FR-Designer_Add_all=\uBAA8\uB450\uCD94\uAC00 FR-Designer_Reset= FR-Designer_Language_Change_Successful= -FR-Designer_Template_Web_Attributes= FR-Designer_Basic=\uAE30\uBCF8 FR-Designer_Printers(Server)=\uD504\uB9B0\uD130(\uC11C\uBC84) FR-Designer_Pagination_Setting=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uBBF8\uB9AC\uBCF4\uAE30\uC124\uC815 @@ -1982,4 +1981,8 @@ FR-Designer_Edit_String_To_Formula=\uBB38\uC790\uC5F4\uC744\uC218\uC2DD\uC73C\uB FR-Base_UnSignIn=\uC544\uC9C1 \uB4F1\uB85D Every=\uAC01 CellWrite-Preview_Cell_Content=\uC140\uB0B4\uC6A9\uBBF8\uB9AC\uBCF4\uAE30 -FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9 \ No newline at end of file +FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9 +FR-Designer_Cell_Element=\uC140\uC694\uC18C +FR-Designer_Cell_Attributes=\uC140\uC18D\uC131 +FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C +FR-Designer_Widget_Library= \ No newline at end of file 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 9e5a80bfa9..8060abc14c 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 @@ -2003,3 +2003,7 @@ FR-Designer_AlphaFine_NoResult=\u6682\u65E0\u76F8\u5173\u5185\u5BB9 FR-Designer_ConnectionFailed=\u94FE\u63A5\u5931\u8D25 FR-Designer_NoResult=\u6682\u4E0D\u652F\u6301\u663E\u793A FR-Designer-AlphaFine_SetShortcuts=\u8BF7\u76F4\u63A5\u5728\u952E\u76D8\u4E0A\u6309\u4E24\u4E2A\u7EC4\u5408\u952E +FR-Designer_Cell_Element=\u5355\u5143\u683C\u5143\u7D20 +FR-Designer_Cell_Attributes=\u5355\u5143\u683C\u5C5E\u6027 +FR-Designer_Float_Element=\u60AC\u6D6E\u5143\u7D20 +FR-Designer_Widget_Library=\u7EC4\u4EF6\u5E93 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 313e867403..6eea2a1fea 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 @@ -2004,3 +2004,7 @@ FR-Designer_AlphaFine_NoResult=\u66AB\u7121\u76F8\u95DC\u5167\u5BB9 FR-Designer_ConnectionFailed=\u93C8\u63A5\u5931\u6557 FR-Designer_NoResult=\u66AB\u4E0D\u652F\u6301\u986F\u793A FR-Designer-AlphaFine_SetShortcuts=\u8ACB\u76F4\u63A5\u5728\u9375\u76E4\u4E0A\u6309\u5169\u500B\u7D44\u5408\u9375 +FR-Designer_Cell_Element=\u5132\u5B58\u683C\u5143\u7D20 +FR-Designer_Cell_Attributes=\u5132\u5B58\u683C\u5C6C\u6027 +FR-Designer_Float_Element=\u61F8\u6D6E\u5143\u7D20 +FR-Designer_Widget_Library=\u7D44\u4EF6\u5EAB diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 27a012783b..73c1d9631a 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; +import com.fr.general.Inter; import javax.swing.*; import javax.swing.border.EmptyBorder; @@ -56,19 +57,19 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyItemList = new ArrayList<>(); // 单元格元素 - PropertyItem cellElement = new PropertyItem("cellElement", "/com/fr/design/images/buttonicon/add.png"); + PropertyItem cellElement = new PropertyItem("cellElement", Inter.getLocText("FR-Designer_Cell_Element"), "/com/fr/design/images/buttonicon/add.png"); // 单元格属性 - PropertyItem cellAttr = new PropertyItem("cellAttr", "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem cellAttr = new PropertyItem("cellAttr", Inter.getLocText("FR-Designer_Cell_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); // 悬浮元素 - PropertyItem floatElement = new PropertyItem("floatElement", "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem floatElement = new PropertyItem("floatElement", Inter.getLocText("FR-Designer_Float_Element"), "com/fr/design/images/toolbarbtn/close.png"); // 控件设置 - PropertyItem widgetSettings = new PropertyItem("widgetSettings", "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem widgetSettings = new PropertyItem("widgetSettings", Inter.getLocText("FR-Designer-Widget_Settings"), "com/fr/design/images/toolbarbtn/close.png"); // 条件属性 - PropertyItem conditionAttr = new PropertyItem("conditionAttr", "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem conditionAttr = new PropertyItem("conditionAttr", Inter.getLocText("FR-Designer_Condition_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); // 超级链接 - PropertyItem hyperlink = new PropertyItem("hyperlink", "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem hyperlink = new PropertyItem("hyperlink", Inter.getLocText("FR-Designer_Hyperlink"), "com/fr/design/images/toolbarbtn/close.png"); // 组件库 - PropertyItem widgetLib = new PropertyItem("widgetLib", "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem widgetLib = new PropertyItem("widgetLib", Inter.getLocText("FR-Designer_Widget_Library"), "com/fr/design/images/toolbarbtn/close.png"); propertyItemList.add(cellElement); propertyItemList.add(cellAttr); propertyItemList.add(floatElement); @@ -220,7 +221,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { class PropertyItem { // private UIButton button; private UIButton button; - private String name; + private String name; // 用于 card 切换 + private String title; // 用于显示 private JComponent propertyPanel; private JComponent contentPane; private FixedPopupPane popupPane; // 左侧固定弹出框 @@ -231,8 +233,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private boolean isPoppedOut = false; // 是否弹出 private Dimension fixedSize; - public PropertyItem(String name, String btnUrl) { + public PropertyItem(String name, String title, String btnUrl) { this.name = name; + this.title = title; initButton(btnUrl); initPropertyPanel(); } @@ -327,6 +330,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return name; } + public String getTitle() { + return title; + } + public JComponent getPropertyPanel() { return propertyPanel; } @@ -411,7 +418,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 弹出属性面板的工具条 private class PopupToolPane extends JPanel { private int model = UIConstants.MODEL_NORMAL; - private String title = "单元格元素"; + private String title; private JComponent contentPane; private PropertyItem propertyItem; private String buttonType; @@ -435,6 +442,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public PopupToolPane(PropertyItem propertyItem, String buttonType) { super(); this.propertyItem = propertyItem; + this.title = propertyItem.getTitle(); this.contentPane = propertyItem.getContentPane(); setLayout(new BorderLayout()); UILabel label = new UILabel(title); From a914c629617666cff46db37ea2162c990694f720 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 19:30:04 +0800 Subject: [PATCH 055/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E7=BA=A2?= =?UTF-8?q?=E8=89=B2=E6=A0=87=E5=87=BA=E5=8F=AF=E6=8B=96=E5=8A=A8=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/EastRegionContainerPane.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 73c1d9631a..3b23f293a2 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -423,6 +423,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private PropertyItem propertyItem; private String buttonType; private JDialog parentDialog; // 如果不在对话框中,值为null + private Color originColor; // 初始背景 private boolean isMovable = false; private Point mouseDownCompCoords; // 存储按下左键的位置,移动对话框时会用到 @@ -444,6 +445,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { this.propertyItem = propertyItem; this.title = propertyItem.getTitle(); this.contentPane = propertyItem.getContentPane(); + originColor = getBackground(); setLayout(new BorderLayout()); UILabel label = new UILabel(title); label.setForeground(new Color(69, 135, 255)); @@ -478,6 +480,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { if (e.getX() >= ARROW_RANGE_START) { setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); model = UIConstants.MODEL_PRESS; + } else if (isMovable) { + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + setBackground(Color.pink); } else { setCursor(Cursor.getDefaultCursor()); model = UIConstants.MODEL_NORMAL; @@ -516,6 +521,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void mouseExited(MouseEvent e) { setCursor(Cursor.getDefaultCursor()); + if (mouseDownCompCoords == null) { + setBackground(originColor); + } model = UIConstants.MODEL_NORMAL; repaint(); } @@ -530,6 +538,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void mouseReleased(MouseEvent e) { mouseDownCompCoords = null; + if (!getBounds().contains(e.getPoint())) { + setBackground(originColor); + } } @Override public void mousePressed(MouseEvent e) { From abba21658758d3e87d9f3d897e92e025e8ebee3d Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 19:36:46 +0800 Subject: [PATCH 056/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BA=A4?= =?UTF-8?q?=E6=8D=A2=E5=BC=B9=E5=87=BA=E5=B7=A5=E5=85=B7=E6=9D=A1=E7=9A=84?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/EastRegionContainerPane.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 3b23f293a2..983ddffa86 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -249,7 +249,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyPanel = new JPanel(); propertyPanel.setBackground(Color.pink); contentPane = generateContentPane(); - popupToolPane = new PopupToolPane(this, PopupToolPane.UP_BUTTON); + popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON); propertyPanel.setLayout(new BorderLayout()); propertyPanel.add(popupToolPane, BorderLayout.NORTH); propertyPanel.add(contentPane, BorderLayout.CENTER); @@ -466,9 +466,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return; } - if (buttonType.equals(UP_BUTTON)) { + if (buttonType.equals(DOWN_BUTTON)) { - } else if (buttonType.equals(DOWN_BUTTON)) { + } else if (buttonType.equals(UP_BUTTON)) { } else { throw new IllegalArgumentException("unknown button type: " + buttonType); @@ -554,9 +554,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 触发弹入、弹出 private void onPop() { - if (buttonType.equals(UP_BUTTON)) { + if (buttonType.equals(DOWN_BUTTON)) { propertyItem.popupDialog(); - } else if (buttonType.equals(DOWN_BUTTON)) { + } else if (buttonType.equals(UP_BUTTON)) { propertyItem.popToFrame(); } } @@ -578,7 +578,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { if (buttonType.equals(NO_BUTTON)) { return; } - if (buttonType.equals(UP_BUTTON)) { + if (buttonType.equals(DOWN_BUTTON)) { if (model == UIConstants.MODEL_NORMAL) { button = UIConstants.DRAG_LEFT_NORMAL; } else { @@ -608,7 +608,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { super(DesignerContext.getDesignerFrame()); container = getContentPane(); setUndecorated(true); - PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.DOWN_BUTTON); + PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON); popupToolPane.setParentDialog(this); contentPane = propertyItem.getContentPane(); container.add(popupToolPane, BorderLayout.NORTH); From 64474ba90568a22fd72ac43e6f1f83d031813f31 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 20:00:34 +0800 Subject: [PATCH 057/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E6=89=80?= =?UTF-8?q?=E6=9C=89tab=E5=BC=B9=E5=87=BA=E5=90=8E=EF=BC=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E2=80=9C=E6=97=A0=E5=8F=AF=E7=94=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B9=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/locale/designer.properties | 1 + .../design/locale/designer_en_US.properties | 1 + .../design/locale/designer_ja_JP.properties | 3 ++- .../design/locale/designer_ko_KR.properties | 3 ++- .../design/locale/designer_zh_CN.properties | 1 + .../design/locale/designer_zh_TW.properties | 1 + .../mainframe/EastRegionContainerPane.java | 20 +++++++++++++++++++ 7 files changed, 28 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 9365dec33f..cf38d99b53 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2009,3 +2009,4 @@ FR-Designer_Cell_Element=Cell Element FR-Designer_Cell_Attributes=Cell Attributes FR-Designer_Float_Element=Float Element FR-Designer_Widget_Library=Widget Library +FR-Designer_No_Settings_Available=No Settings Available! 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 de31129798..83ac59ba1c 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 @@ -2009,3 +2009,4 @@ FR-Designer_Cell_Element=Cell Element FR-Designer_Cell_Attributes=Cell Attributes FR-Designer_Float_Element=Float Element FR-Designer_Widget_Library=Widget Library +FR-Designer_No_Settings_Available=No Settings Available! 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 e17d249f55..3d037b05e2 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 @@ -1985,4 +1985,5 @@ FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9 FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20 FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027 FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20 -FR-Designer_Widget_Library= \ No newline at end of file +FR-Designer_Widget_Library= +FR-Designer_No_Settings_Available= \ No newline at end of file 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 dfa6a7d32e..a561e99a6d 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 @@ -1985,4 +1985,5 @@ FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9 FR-Designer_Cell_Element=\uC140\uC694\uC18C FR-Designer_Cell_Attributes=\uC140\uC18D\uC131 FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C -FR-Designer_Widget_Library= \ No newline at end of file +FR-Designer_Widget_Library= +FR-Designer_No_Settings_Available= \ No newline at end of file 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 8060abc14c..c487655cb8 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 @@ -2007,3 +2007,4 @@ FR-Designer_Cell_Element=\u5355\u5143\u683C\u5143\u7D20 FR-Designer_Cell_Attributes=\u5355\u5143\u683C\u5C5E\u6027 FR-Designer_Float_Element=\u60AC\u6D6E\u5143\u7D20 FR-Designer_Widget_Library=\u7EC4\u4EF6\u5E93 +FR-Designer_No_Settings_Available=\u65E0\u53EF\u7528\u914D\u7F6E\u9879\uFF01 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 6eea2a1fea..848b2f05ee 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 @@ -2008,3 +2008,4 @@ FR-Designer_Cell_Element=\u5132\u5B58\u683C\u5143\u7D20 FR-Designer_Cell_Attributes=\u5132\u5B58\u683C\u5C6C\u6027 FR-Designer_Float_Element=\u61F8\u6D6E\u5143\u7D20 FR-Designer_Widget_Library=\u7D44\u4EF6\u5EAB +FR-Designer_No_Settings_Available=\u7121\u53EF\u7528\u914D\u5BD8\u9805\uFF01 diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 983ddffa86..c787ed9599 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -79,6 +79,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyItemList.add(widgetLib); } + // "无可用配置项"面板 + private JPanel getDefaultPane() { + JPanel defaultPane = new JPanel(); + UILabel label = new UILabel(Inter.getLocText("FR-Designer_No_Settings_Available")); + defaultPane.setLayout(new BorderLayout()); + defaultPane.add(label, BorderLayout.CENTER); + return defaultPane; + } + private void initContentPane() { initRightPane(); initLeftPane(); @@ -91,8 +100,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { rightPane.setBackground(Color.green); rightPane.setLayout(propertyCard); for (PropertyItem item : propertyItemList) { + if (item.isPoppedOut()) { + continue; + } rightPane.add(item.getName(), item.getPropertyPanel()); } + rightPane.add(getDefaultPane()); replaceRightPane(rightPane); } @@ -102,6 +115,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { leftPane = new JPanel(); leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0)); for (PropertyItem item : propertyItemList) { + if (item.isPoppedOut()) { + continue; + } leftPane.add(item.getButton()); } @@ -259,6 +275,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { this.isPoppedOut = isPoppedOut; } + public boolean isPoppedOut() { + return isPoppedOut; + } + public JComponent generateContentPane() { JComponent contentPane = new JPanel(); JButton testBtn = new JButton(name); From 57954b2e8bc22fd412a938b6899a7dab603fd04e Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 18 Jul 2017 11:13:50 +0800 Subject: [PATCH 058/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>propertyIte?= =?UTF-8?q?mList=20=E6=94=B9=E4=B8=BA=20propertyItemMap=EF=BC=88=E6=9C=89?= =?UTF-8?q?=E5=BA=8Fmap=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 4 +- .../mainframe/EastRegionContainerPane.java | 104 ++++++++++++------ .../form/parameter/FormParaDesigner.java | 4 +- 3 files changed, 76 insertions(+), 36 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index a3df2ba3e8..7fb3132bc4 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -56,8 +56,8 @@ public class ElementCasePaneDelegate extends ElementCasePane { QuickEditorRegion.getInstance().populate(getCurrentEditor()); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if (editingTemplate != null && !editingTemplate.isUpMode()) { - EastRegionContainerPane.getInstance().replaceDownPane(CellElementPropertyPane.getInstance()); - EastRegionContainerPane.getInstance().replaceUpPane(QuickEditorRegion.getInstance()); + EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); + EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); } } diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index c787ed9599..131ed25d21 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -16,11 +16,12 @@ import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.*; import java.util.ArrayList; -import java.util.List; +import java.util.LinkedHashMap; +import java.util.Map; public class EastRegionContainerPane extends UIEastResizableContainer { private static EastRegionContainerPane THIS; - private List propertyItemList; + private Map propertyItemMap; private CardLayout propertyCard; private JPanel leftPane; private JPanel rightPane; @@ -29,6 +30,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH; private static final int POPUP_TOOLPANE_HEIGHT = 25; private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30; + private static final String KEY_CELL_ELEMENT = "cellElement"; + private static final String KEY_CELL_ATTR = "cellAttr"; + private static final String KEY_FLOAT_ELEMENT = "floatElement"; + private static final String KEY_WIDGET_SETTINGS = "widgetSettings"; + private static final String KEY_CONDITION_ATTR = "conditionAttr"; + private static final String KEY_HYPERLINK = "hyperlink"; + private static final String KEY_WIDGET_LIB = "widgetLib"; /** * 得到实例 @@ -54,29 +62,29 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } private void initPropertyItemList() { - propertyItemList = new ArrayList<>(); + propertyItemMap = new LinkedHashMap<>(); // 有序map // 单元格元素 - PropertyItem cellElement = new PropertyItem("cellElement", Inter.getLocText("FR-Designer_Cell_Element"), "/com/fr/design/images/buttonicon/add.png"); + PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"), "/com/fr/design/images/buttonicon/add.png"); // 单元格属性 - PropertyItem cellAttr = new PropertyItem("cellAttr", Inter.getLocText("FR-Designer_Cell_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); // 悬浮元素 - PropertyItem floatElement = new PropertyItem("floatElement", Inter.getLocText("FR-Designer_Float_Element"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"), "com/fr/design/images/toolbarbtn/close.png"); // 控件设置 - PropertyItem widgetSettings = new PropertyItem("widgetSettings", Inter.getLocText("FR-Designer-Widget_Settings"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"), "com/fr/design/images/toolbarbtn/close.png"); // 条件属性 - PropertyItem conditionAttr = new PropertyItem("conditionAttr", Inter.getLocText("FR-Designer_Condition_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); // 超级链接 - PropertyItem hyperlink = new PropertyItem("hyperlink", Inter.getLocText("FR-Designer_Hyperlink"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"), "com/fr/design/images/toolbarbtn/close.png"); // 组件库 - PropertyItem widgetLib = new PropertyItem("widgetLib", Inter.getLocText("FR-Designer_Widget_Library"), "com/fr/design/images/toolbarbtn/close.png"); - propertyItemList.add(cellElement); - propertyItemList.add(cellAttr); - propertyItemList.add(floatElement); - propertyItemList.add(widgetSettings); - propertyItemList.add(conditionAttr); - propertyItemList.add(hyperlink); - propertyItemList.add(widgetLib); + PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), "com/fr/design/images/toolbarbtn/close.png"); + propertyItemMap.put(KEY_CELL_ELEMENT, cellElement); + propertyItemMap.put(KEY_CELL_ATTR, cellAttr); + propertyItemMap.put(KEY_FLOAT_ELEMENT, floatElement); + propertyItemMap.put(KEY_WIDGET_SETTINGS, widgetSettings); + propertyItemMap.put(KEY_CONDITION_ATTR, conditionAttr); + propertyItemMap.put(KEY_HYPERLINK, hyperlink); + propertyItemMap.put(KEY_WIDGET_LIB, widgetLib); } // "无可用配置项"面板 @@ -99,7 +107,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyCard = new CardLayout(); rightPane.setBackground(Color.green); rightPane.setLayout(propertyCard); - for (PropertyItem item : propertyItemList) { + for (PropertyItem item : propertyItemMap.values()) { if (item.isPoppedOut()) { continue; } @@ -114,7 +122,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private void initLeftPane() { leftPane = new JPanel(); leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0)); - for (PropertyItem item : propertyItemList) { + for (PropertyItem item : propertyItemMap.values()) { if (item.isPoppedOut()) { continue; } @@ -135,7 +143,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void onResize() { - for (PropertyItem item : propertyItemList) { + for (PropertyItem item : propertyItemMap.values()) { item.onResize(); } } @@ -147,23 +155,55 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } public void replaceUpPane(JComponent pane) { - propertyItemList.get(0).replaceContentPane(pane); + replaceCellElementPane(pane); } public void replaceDownPane(JComponent pane) { - propertyItemList.get(1).replaceContentPane(pane); + replaceCellAttrPane(pane); } public JComponent getUpPane() { - return propertyItemList.get(0).getContentPane(); + return getCellElementPane(); } public JComponent getDownPane() { - return propertyItemList.get(1).getContentPane(); + return getCellAttrPane(); + } + + public void replaceCellElementPane(JComponent pane) { + propertyItemMap.get(KEY_CELL_ELEMENT).replaceContentPane(pane); + } + + public JComponent getCellElementPane() { + return propertyItemMap.get(KEY_CELL_ELEMENT).getContentPane(); + } + + public void replaceCellAttrPane(JComponent pane) { + propertyItemMap.get(KEY_CELL_ATTR).replaceContentPane(pane); + } + + public JComponent getCellAttrPane() { + return propertyItemMap.get(KEY_CELL_ATTR).getContentPane(); + } + + public void replaceWidgetSettingsPane(JComponent pane) { + propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceContentPane(pane); + } + + public JComponent getWidgetSettingsPane() { + return propertyItemMap.get(KEY_WIDGET_SETTINGS).getContentPane(); + } + + public void replaceWidgetLibPane(JComponent pane) { + propertyItemMap.get(KEY_WIDGET_LIB).replaceContentPane(pane); + } + + public JComponent getWidgetLibPane() { + return propertyItemMap.get(KEY_WIDGET_LIB).getContentPane(); } public void addParameterPane(JComponent paraPane) { - propertyItemList.get(2).replaceContentPane(paraPane); + propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(paraPane); } public void setParameterHeight(int height) { @@ -210,16 +250,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer { */ public void refreshRightPane() { - if (this.getRightPane() instanceof DockingView) { - ((DockingView) this.getRightPane()).refreshDockingView(); - } +// if (this.getRightPane() instanceof DockingView) { +// ((DockingView) this.getRightPane()).refreshDockingView(); +// } } public void refreshDownPane() { - JComponent pane = propertyItemList.get(1).getContentPane(); - if (pane instanceof DockingView) { - ((DockingView) pane).refreshDockingView(); - } +// JComponent pane = propertyItemList.get(1).getContentPane(); +// if (pane instanceof DockingView) { +// ((DockingView) pane).refreshDockingView(); +// } } private void refreshContainer() { diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index 589be7e83d..1327823bb5 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -109,12 +109,12 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP */ public void initBeforeUpEdit() { WidgetToolBarPane.getInstance(this); - EastRegionContainerPane.getInstance().replaceDownPane( + EastRegionContainerPane.getInstance().replaceWidgetLibPane( FormWidgetDetailPane.getInstance(this)); if (!BaseUtils.isAuthorityEditing()) { EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(this)); EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance(this).getPreferredSize().height); - EastRegionContainerPane.getInstance().replaceUpPane( + EastRegionContainerPane.getInstance().replaceWidgetSettingsPane( WidgetPropertyPane.getInstance(this)); } else { EastRegionContainerPane.getInstance().removeParameterPane(); From 7173e76d4c179039189babe90bf0716d5b737004 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 18 Jul 2017 14:11:45 +0800 Subject: [PATCH 059/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 18 ++-- .../com/fr/design/mainframe/JWorkBook.java | 39 ++++++++- .../mainframe/ReportComponentComposite.java | 28 +++++-- designer/src/com/fr/grid/Grid.java | 12 ++- designer/src/com/fr/grid/GridColumn.java | 13 ++- designer/src/com/fr/grid/GridColumnUI.java | 11 ++- designer/src/com/fr/grid/GridHeader.java | 4 +- .../src/com/fr/grid/GridMouseAdapter.java | 38 +++++---- designer/src/com/fr/grid/GridRow.java | 15 +++- designer/src/com/fr/grid/GridRowUI.java | 36 ++++---- designer/src/com/fr/grid/GridUI.java | 7 +- designer/src/com/fr/grid/GridUtils.java | 82 ++++++++++++++++++- .../fr/design/mainframe/DesignerFrame.java | 5 ++ .../com/fr/design/mainframe/JSliderPane.java | 59 +++++++++---- .../com/fr/design/mainframe/JTemplate.java | 4 + .../src/com/fr/design/mainframe/FormArea.java | 62 ++++++++++---- .../src/com/fr/design/mainframe/JForm.java | 10 +++ 17 files changed, 350 insertions(+), 93 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 52bbc63931..20fbeb8023 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -11,12 +11,9 @@ import java.awt.Rectangle; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.InputEvent; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; +import java.awt.event.*; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; import java.lang.reflect.Constructor; import java.util.Set; @@ -191,7 +188,7 @@ public abstract class ElementCasePane extends Tar /** * Constructor. */ - public ElementCasePane(T t) { + public ElementCasePane(T t) { super(t); // marks:能触发processEvent,不管是否给component增加listener。这里是使在reportPane中的任意位置滑动鼠标轮都能 // 下拉grid。 @@ -213,6 +210,7 @@ public abstract class ElementCasePane extends Tar protected void initComponents() { this.setLayout(new RGridLayout()); + //todo 直接修改分辨率 this.resolution = ScreenResolution.getScreenResolution(); this.initGridComponent(); @@ -231,7 +229,7 @@ public abstract class ElementCasePane extends Tar verScrollBar = new DynamicScrollBar(Adjustable.VERTICAL, this, this.resolution); horScrollBar = new DynamicScrollBar(Adjustable.HORIZONTAL, this, this.resolution); this.add(RGridLayout.VerticalBar, this.verScrollBar); - // this.add(RGridLayout.HorizontalBar, this.horScrollBar); +// this.add(RGridLayout.HorizontalBar, this.horScrollBar); // Init input/action map defaultly. initInputActionMap(); @@ -1049,7 +1047,7 @@ public abstract class ElementCasePane extends Tar ElementCase elementCase = this.getEditingElementCase(); boolean cancel = false; - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(this, evt.getX(), evt.getY()); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(this, evt.getX(), evt.getY(), this.resolution); ReportPageAttrProvider reportPageAttr = elementCase.getReportPageAttr(); ElementCase report = this.getEditingElementCase(); if (reportPageAttr != null) { @@ -1142,7 +1140,7 @@ public abstract class ElementCasePane extends Tar HeadColumnAction headcolumnAction = new HeadColumnAction(this); FootColumnAction footcolumnAction = new FootColumnAction(this); - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(this, evt.getX(), evt.getY()); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(this, evt.getX(), evt.getY(),this.resolution); ElementCase elementCase = this.getEditingElementCase(); boolean cancel = false; ReportPageAttrProvider reportPageAttr = elementCase.getReportPageAttr(); diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index fd4cd7b0da..4ac0c2ae19 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -1,9 +1,9 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; +import com.fr.base.DynamicUnitList; import com.fr.base.FRContext; import com.fr.base.Parameter; -import com.fr.base.parameter.ParameterUI; import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.AllowAuthorityEditAction; @@ -51,16 +51,17 @@ import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.general.ModuleContext; import com.fr.general.web.ParameterConsts; +import com.fr.grid.Grid; +import com.fr.grid.GridUtils; import com.fr.io.exporter.EmbeddedTableDataExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.impl.WorkBook; import com.fr.main.parameter.ReportParameterAttr; import com.fr.poly.PolyDesigner; import com.fr.privilege.finegrain.WorkSheetPrivilegeControl; -import com.fr.report.cellcase.CellCase; +import com.fr.report.ReportHelper; +import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.TemplateElementCase; -import com.fr.report.poly.PolyWorkSheet; -import com.fr.report.report.Report; import com.fr.report.worksheet.WorkSheet; import com.fr.stable.ArrayUtils; import com.fr.stable.StableUtils; @@ -86,6 +87,7 @@ public class JWorkBook extends JTemplate { private UIModeControlContainer centerPane; private ReportComponentComposite reportComposite; private ParameterDefinitePane parameterPane; + private int resolution; public JWorkBook() { super(new WorkBook(new WorkSheet()), "WorkBook"); @@ -159,6 +161,7 @@ public class JWorkBook extends JTemplate { } } + /** * 无条件取消格式刷 */ @@ -317,6 +320,34 @@ public class JWorkBook extends JTemplate { parameterPane.getParaDesigner().removeSelection(); } + /** + * 缩放条 + */ + @Override + public void setScale(int resolution) { + //更新resolution + this.resolution = resolution; + reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setResolution(resolution); + //更新Grid + Grid grid = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid(); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); + grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); + grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().updateUI(); + //更新Column和Row + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().setResolution(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().updateUI(); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().setResolution(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().updateUI(); + } + + @Override + public int getScale() { + return this.resolution; + } + public int getToolBarHeight() { return TOOLBARPANEDIMHEIGHT; } diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 533de694ae..0b47214a90 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -36,11 +36,12 @@ public class ReportComponentComposite extends JComponent { private JPanel hbarContainer; + private JPanel jSliderContainer; + /** * Constructor with workbook.. * - * @param workBook the current workbook. */ public ReportComponentComposite(JWorkBook jwb) { this.parent = jwb; @@ -52,7 +53,7 @@ public class ReportComponentComposite extends JComponent { this.add(CellElementRegion, BorderLayout.NORTH); this.add(createSouthControlPane(), BorderLayout.SOUTH); } - + protected void doBeforeChange(int oldIndex) { if (oldIndex >= 0) { templateStateList.set(oldIndex, centerCardPane.editingComponet.createEditingState()); @@ -153,13 +154,30 @@ public class ReportComponentComposite extends JComponent { } private JComponent createSouthControlPane() { +// hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); +// hbarContainer.add(createSouthControlPaneWithJSliderPane()); hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); hbarContainer.add(centerCardPane.editingComponet.getHorizontalScrollBar()); - JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, hbarContainer); +// JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, hbarContainer); + JPanel southPane = new JPanel(new BorderLayout()); + JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, JSliderPane.getInstance()); splitpane.setBorder(null); splitpane.setDividerSize(3); - splitpane.setResizeWeight(0.6); - return splitpane; + splitpane.setResizeWeight(1); + southPane.add(hbarContainer,BorderLayout.NORTH); + southPane.add(splitpane,BorderLayout.CENTER); + return southPane; + } + + private JComponent createSouthControlPaneWithJSliderPane() { + hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); + hbarContainer.add(centerCardPane.editingComponet.getHorizontalScrollBar()); + JSplitPane splitWithJSliderPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, hbarContainer, JSliderPane.getInstance()); + splitWithJSliderPane.setBorder(null); + splitWithJSliderPane.setDividerLocation(0.9); + splitWithJSliderPane.setDividerSize(3); + splitWithJSliderPane.setResizeWeight(1); + return splitWithJSliderPane; } public void setSelectedIndex(int selectedIndex) { diff --git a/designer/src/com/fr/grid/Grid.java b/designer/src/com/fr/grid/Grid.java index 178cd085ed..6bade0e2e4 100644 --- a/designer/src/com/fr/grid/Grid.java +++ b/designer/src/com/fr/grid/Grid.java @@ -114,6 +114,7 @@ public class Grid extends BaseGridComponent { private int resolution; // 判断SmartJTablePane是否显示,做为动态虚线标识符 private boolean notShowingTableSelectPane = true; + private GridMouseAdapter gridMouseAdapter; public Grid(int resolution) { this.resolution = resolution; @@ -121,7 +122,7 @@ public class Grid extends BaseGridComponent { enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); GridKeyAction.initGridInputActionMap(this); - GridMouseAdapter gridMouseAdapter = new GridMouseAdapter(this); + gridMouseAdapter = new GridMouseAdapter(this); this.addMouseListener(gridMouseAdapter); this.addMouseMotionListener(gridMouseAdapter); @@ -136,6 +137,10 @@ public class Grid extends BaseGridComponent { this.updateUI(); } + public void setResolution(int resolution) { + this.resolution = resolution; + } + /** * 应用界面设置 * @@ -149,6 +154,7 @@ public class Grid extends BaseGridComponent { setUI(localComponentUI); } + /** * 是否显示格子线 * @@ -173,6 +179,10 @@ public class Grid extends BaseGridComponent { this.getElementCasePane().repaint(); } + public GridMouseAdapter getGridMouseAdapter(){ + return this.gridMouseAdapter; + } + /** * Gets grid line color. * diff --git a/designer/src/com/fr/grid/GridColumn.java b/designer/src/com/fr/grid/GridColumn.java index e2366c9bca..eedf8bcaf2 100644 --- a/designer/src/com/fr/grid/GridColumn.java +++ b/designer/src/com/fr/grid/GridColumn.java @@ -6,9 +6,14 @@ package com.fr.grid; import java.awt.Dimension; import com.fr.base.GraphHelper; +import com.fr.base.ScreenResolution; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.fun.GridUIProcessor; import com.fr.design.mainframe.ElementCasePane; import com.fr.stable.StableUtils; +import javax.swing.plaf.ComponentUI; + /** * GridColumn used to paint and edit grid column. * @@ -17,6 +22,8 @@ import com.fr.stable.StableUtils; */ public class GridColumn extends GridHeader { + private int resolution = ScreenResolution.getScreenResolution(); + @Override protected void initByConstructor() { GridColumnMouseHandler gridColumnMouseHandler = new GridColumnMouseHandler(this); @@ -32,7 +39,11 @@ public class GridColumn extends GridHeader { @Override public void updateUI() { - this.setUI(new GridColumnUI()); + this.setUI(new GridColumnUI(resolution)); + } + + public void setResolution(int resolution) { + this.resolution = resolution; } /** diff --git a/designer/src/com/fr/grid/GridColumnUI.java b/designer/src/com/fr/grid/GridColumnUI.java index 52df976937..eb625eabeb 100644 --- a/designer/src/com/fr/grid/GridColumnUI.java +++ b/designer/src/com/fr/grid/GridColumnUI.java @@ -16,6 +16,8 @@ import com.fr.base.ScreenResolution; import com.fr.cache.list.IntList; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.GridScaleEdit; +import com.fr.design.mainframe.JSliderPane; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.grid.selection.Selection; import com.fr.privilege.finegrain.ColumnRowPrivilegeControl; @@ -29,7 +31,14 @@ import com.fr.report.elementcase.ElementCase; public class GridColumnUI extends ComponentUI { protected Color withoutDetailsBackground = Color.lightGray; - protected int resolution = ScreenResolution.getScreenResolution(); + private int resolution ; + + public GridColumnUI(int resolution){ + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } + this.resolution = resolution; + } @Override public void paint(Graphics g, JComponent c) { diff --git a/designer/src/com/fr/grid/GridHeader.java b/designer/src/com/fr/grid/GridHeader.java index 3b331d2706..754257e2f6 100644 --- a/designer/src/com/fr/grid/GridHeader.java +++ b/designer/src/com/fr/grid/GridHeader.java @@ -6,7 +6,7 @@ import java.awt.Color; public abstract class GridHeader extends BaseGridComponent { public final static int SIZE_ADJUST = 4; - + //属性 private Color separatorLineColor = new Color(172, 168, 153); //separator lines private Color selectedForeground = Color.black; @@ -22,7 +22,7 @@ public abstract class GridHeader extends BaseGridComponent { initByConstructor(); } - + protected abstract void initByConstructor(); protected abstract T getDisplay(int index) ; diff --git a/designer/src/com/fr/grid/GridMouseAdapter.java b/designer/src/com/fr/grid/GridMouseAdapter.java index 8a40533530..14256de55c 100644 --- a/designer/src/com/fr/grid/GridMouseAdapter.java +++ b/designer/src/com/fr/grid/GridMouseAdapter.java @@ -7,6 +7,8 @@ import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.GridScaleEdit; +import com.fr.design.mainframe.JSliderPane; import com.fr.design.present.CellWriteAttrPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.grid.selection.CellSelection; @@ -71,6 +73,8 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous private int ECBlockGap = 40; + private int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); + protected GridMouseAdapter(Grid grid) { this.grid = grid; } @@ -101,7 +105,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous // 用户没有按住Shift键时,tempOldSelectedCell是一直变化的。如果一直按住shift,是不变的 ElementCasePane ePane = grid.getElementCasePane(); if (!evt.isShiftDown() && ePane.getSelection() instanceof CellSelection) { - tempOldSelectedCell = GridUtils.getAdjustEventColumnRow(ePane, oldEvtX, oldEvtY); + tempOldSelectedCell = GridUtils.getAdjustEventColumnRow_withresolution(ePane, oldEvtX, oldEvtY,resolution); } } @@ -118,7 +122,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous int horizentalScrollValue = grid.getHorizontalValue(); int verticalScrollValue = grid.getVerticalValue(); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); FU evtX_fu = FU.valueOfPix(this.oldEvtX, resolution); FU evtY_fu = FU.valueOfPix(this.oldEvtY, resolution); @@ -142,7 +146,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous FloatElement selectedFloatElement = (FloatElement) tmpFloatElementCursor[0]; reportPane.setSelection(new FloatSelection(selectedFloatElement.getName())); } else { - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(reportPane, this.oldEvtX, this.oldEvtY); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, this.oldEvtX, this.oldEvtY, this.resolution); if (!reportPane.getSelection().containsColumnRow(selectedCellPoint)) { GridUtils.doSelectCell(reportPane, selectedCellPoint.getColumn(), selectedCellPoint.getRow()); } @@ -187,7 +191,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous // peter:选择GridSelection,支持Shift doOneClickSelection(this.oldEvtX, this.oldEvtY, isShiftDown, isControlDown); // 得到点击所在的column and row - ColumnRow columnRow = GridUtils.getEventColumnRow(reportPane, this.oldEvtX, this.oldEvtY); + ColumnRow columnRow = GridUtils.getEventColumnRow_withresolution(reportPane, this.oldEvtX, this.oldEvtY, this.resolution); TemplateCellElement cellElement = report.getTemplateCellElement(columnRow.getColumn(), columnRow.getRow()); if (clickCount >= 2 && !BaseUtils.isAuthorityEditing()) { grid.startEditing(); @@ -206,7 +210,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous */ private void showWidetWindow(TemplateCellElement cellElement, TemplateElementCase report) { - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); double fixed_pos_x = this.oldEvtX - columnWidthList.getRangeValue(grid.getHorizontalValue(), cellElement.getColumn()).toPixD(resolution); @@ -223,6 +227,10 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous && cell_width - fixed_pos_x < WIDGET_WIDTH && cell_height - fixed_pos_y < WIDGET_WIDTH; } + public void setResolution(int resolution) { + this.resolution = resolution; + } + /** * @param evt */ @@ -372,7 +380,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous doWithCellElementDragged(evtX, evtY, (CellSelection) selection); } else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION && !BaseUtils.isAuthorityEditing()) { // peter:获得调整过的Selected Column Row. - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(reportPane, evtX, evtY); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); if (selectedCellPoint.getColumn() != grid.getDragRectangle().x || selectedCellPoint.getRow() != grid.getDragRectangle().y) { grid.getDragRectangle().x = selectedCellPoint.getColumn(); grid.getDragRectangle().y = selectedCellPoint.getRow(); @@ -393,7 +401,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous private void doWithFloatElementDragged(int evtX, int evtY, FloatSelection fs) { ElementCase report = grid.getElementCasePane().getEditingElementCase(); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); String floatName = fs.getSelectedFloatName(); FloatElement floatElement = report.getFloatElement(floatName); int cursorType = grid.getCursor().getType(); @@ -453,7 +461,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous ElementCasePane reportPane = grid.getElementCasePane(); java.awt.Rectangle cellRectangle = cs.toRectangle(); - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(reportPane, evtX, evtY); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); if (cellRectangle.contains(selectedCellPoint.getColumn(), selectedCellPoint.getRow())) { grid.getDragRectangle().setBounds(cellRectangle); } else { @@ -507,7 +515,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous if (s instanceof FloatSelection) { return; } - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(reportPane, evtX, evtY); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); int selectedCellPointX = selectedCellPoint.getColumn(); int selectedCellPointY = selectedCellPoint.getRow(); CellSelection gridSelection = ((CellSelection) s).clone(); @@ -543,7 +551,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous return; } - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(reportPane, evtX, evtY); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); //拷贝,而不是直接强制使用以监听单元格选择变化 CellSelection gridSelection = ((CellSelection) s).clone(); gridSelection.setSelectedType(((CellSelection) s).getSelectedType()); @@ -606,7 +614,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous } else { grid.setCursor(UIConstants.CELL_DEFAULT_CURSOR); } - ColumnRow selectedCellColumnRow = GridUtils.getEventColumnRow(reportPane, evtX, evtY); + ColumnRow selectedCellColumnRow = GridUtils.getEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); TemplateCellElement curCellElement = report.getTemplateCellElement(selectedCellColumnRow.getColumn(), selectedCellColumnRow.getRow()); if (curCellElement != null) { @@ -630,7 +638,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous * @param report */ private void setCursorAndToolTips(TemplateCellElement curCellElement, TemplateElementCase report) { - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); // 计算相对Grid的显示位置. DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); @@ -674,7 +682,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); double leftColDistance = columnWidthList.getRangeValue(grid.getHorizontalValue(), cs.getColumn()).toPixD(resolution); double rightColDistance = columnWidthList.getRangeValue(grid.getHorizontalValue(), cs.getColumn() + cs.getColumnSpan()).toPixD(resolution); @@ -725,7 +733,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous } else if (isControlDown) { doControlSelectCell(evtX, evtY); } else { - ColumnRow selectedCellPoint = GridUtils.getEventColumnRow(reportPane, evtX, evtY); + ColumnRow selectedCellPoint = GridUtils.getEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); int type = reportPane.ensureColumnRowVisible(selectedCellPoint.getColumn(), selectedCellPoint.getRow()); if (type == ElementCasePane.NO_OVER) { GridUtils.doSelectCell(reportPane, selectedCellPoint.getColumn(), selectedCellPoint.getRow()); @@ -766,7 +774,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous this.oldEvtX = evtX; this.oldEvtY = evtY; FloatElement el = report.getFloatElement(floatName); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); int verticalValue = grid.getVerticalValue(); int horizentalValue = grid.getHorizontalValue(); DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); diff --git a/designer/src/com/fr/grid/GridRow.java b/designer/src/com/fr/grid/GridRow.java index 5301d5b588..c111c71884 100644 --- a/designer/src/com/fr/grid/GridRow.java +++ b/designer/src/com/fr/grid/GridRow.java @@ -6,8 +6,13 @@ package com.fr.grid; import java.awt.Dimension; import com.fr.base.GraphHelper; +import com.fr.base.ScreenResolution; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.fun.GridUIProcessor; import com.fr.design.mainframe.ElementCasePane; +import javax.swing.plaf.ComponentUI; + /** * GridRow used to paint and edit grid row. * @@ -15,6 +20,9 @@ import com.fr.design.mainframe.ElementCasePane; * @since 2012-3-22下午6:12:03 */ public class GridRow extends GridHeader { + + private int resolution = ScreenResolution.getScreenResolution(); + @Override protected void initByConstructor() { GridRowMouseHandler gridRowMouseHandler = new GridRowMouseHandler(this); @@ -30,9 +38,14 @@ public class GridRow extends GridHeader { @Override public void updateUI() { - this.setUI(new GridRowUI()); + this.setUI(new GridRowUI(resolution)); } + public void setResolution(int resolution) { + this.resolution = resolution; + } + + /** * Gets the preferred size. */ diff --git a/designer/src/com/fr/grid/GridRowUI.java b/designer/src/com/fr/grid/GridRowUI.java index 1bf3c38c43..07df407a76 100644 --- a/designer/src/com/fr/grid/GridRowUI.java +++ b/designer/src/com/fr/grid/GridRowUI.java @@ -15,6 +15,8 @@ import com.fr.base.ScreenResolution; import com.fr.cache.list.IntList; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.GridScaleEdit; +import com.fr.design.mainframe.JSliderPane; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.grid.selection.Selection; import com.fr.privilege.finegrain.ColumnRowPrivilegeControl; @@ -27,6 +29,14 @@ import com.fr.report.elementcase.ElementCase; */ public class GridRowUI extends ComponentUI { private Color detailsBackground = Color.lightGray; + private int resolution ; + + GridRowUI(int resolution){ + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } + this.resolution = resolution; + } @Override public void paint(Graphics g, JComponent c) { @@ -49,7 +59,6 @@ public class GridRowUI extends ComponentUI { // paint more rows(double extent), for dragging. int verticalEndValue = verticalValue + verticalExtent + 1; double horizontalLineHeight = size.getHeight(); - int resolution = ScreenResolution.getScreenResolution(); // use background to paint first. // denny: 用来标识已有数据 @@ -149,23 +158,20 @@ public class GridRowUI extends ComponentUI { float fmAscent = GraphHelper.getFontMetrics(gridRow.getFont()).getAscent(); double stringWidth = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getWidth(); double stringHeight = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getHeight(); - // AUGUST:如果高度太小了就不画了 - if (stringHeight <= tmpIncreaseHeight + 2) { - - if (isSelectedBounds) { - g2d.setColor(gridRow.getSelectedForeground()); + if (isSelectedBounds) { + g2d.setColor(gridRow.getSelectedForeground()); + } else { + // p:检查eanbled + if (gridRow.isEnabled()) { + g2d.setColor(gridRow.getForeground()); } else { - // p:检查eanbled - if (gridRow.isEnabled()) { - g2d.setColor(gridRow.getForeground()); - } else { - g2d.setPaint(UIManager.getColor("controlShadow")); - } + g2d.setPaint(UIManager.getColor("controlShadow")); } - - GraphHelper.drawString(g2d, paintText, (size.width - stringWidth) / 2, tmpHeight1 + (tmpIncreaseHeight - stringHeight) / 2 + GridHeader.SIZE_ADJUST / 2 + fmAscent - - 2); } + + GraphHelper.drawString(g2d, paintText, (size.width - stringWidth) / 2, tmpHeight1 + (tmpIncreaseHeight - stringHeight) / 2 + GridHeader.SIZE_ADJUST / 2 + fmAscent + - 2); + } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/GridUI.java b/designer/src/com/fr/grid/GridUI.java index 526f0f074b..93ca03f811 100644 --- a/designer/src/com/fr/grid/GridUI.java +++ b/designer/src/com/fr/grid/GridUI.java @@ -429,6 +429,7 @@ public class GridUI extends ComponentUI { this.calculateForcedPagingOfCellElement(reportPane, tmpCellElement, hideWidth, hideHeight); storeFatherLocation(selectedCellElement, tmpCellElement); // element bounds + // TODO: 2017/7/13 tmpRectangle : 72*19 this.caculateScrollVisibleBounds(this.tmpRectangle, tmpCellElement.getColumn(), tmpCellElement.getRow(), tmpCellElement.getColumnSpan(), tmpCellElement.getRowSpan()); @@ -455,8 +456,9 @@ public class GridUI extends ComponentUI { paintCellElementList.add(tmpCellElement); paintCellElementRectangleList.add(this.tmpRectangle.clone()); - int cellWidth = (int) this.tmpRectangle.getWidth(), cellHeight = (int) this.tmpRectangle - .getHeight(); + + int cellWidth = (int) this.tmpRectangle.getWidth(); + int cellHeight = (int) this.tmpRectangle.getHeight(); // denny_Grid: 画Grid中单元格的内容(包括单元格的背景Content + Background), 不包括边框 painter.paintBackground(g2d, report, tmpCellElement, cellWidth, cellHeight); @@ -1077,6 +1079,7 @@ public class GridUI extends ComponentUI { grid.ajustEditorComponentBounds(); // refresh size } + private void dealWithSizeBeforePaint(Grid grid, TemplateElementCase elementCase) { // 取出所有的行高和列宽的List this.rowHeightList = ReportHelper.getRowHeightList(elementCase); diff --git a/designer/src/com/fr/grid/GridUtils.java b/designer/src/com/fr/grid/GridUtils.java index e04c92e203..415f016384 100644 --- a/designer/src/com/fr/grid/GridUtils.java +++ b/designer/src/com/fr/grid/GridUtils.java @@ -6,6 +6,8 @@ import com.fr.design.cell.clipboard.CellElementsClip; import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.GridScaleEdit; +import com.fr.design.mainframe.JSliderPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.grid.selection.CellSelection; @@ -48,6 +50,7 @@ public class GridUtils { //peter:下面这几个量是在Drag列的时候用. public final static int DRAG_CELL_SIZE = 1; //peter:drag的时候改变格子的宽度. public final static int DRAG_SELECT_UNITS = 2; //peter:drag的时候,选中单元格. +// public static int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); /** * Is above float element.(the return may be null).
@@ -67,7 +70,8 @@ public class GridUtils { double[] floatArray = caculateFloatElementLocations(tmpFloatElement, ReportHelper.getColumnWidthList(report), ReportHelper.getRowHeightList(report), reportPane.getGrid().getVerticalValue(), reportPane.getGrid().getHorizontalValue()); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); + int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); //peter:悬浮元素的范围. Rectangle2D floatElementRect = new Rectangle2D.Double(floatArray[0], floatArray[1], tmpFloatElement.getWidth().toPixD(resolution), tmpFloatElement.getHeight().toPixD(resolution)); //peter:不是当前选中的悬浮元素,不支持六个改变大小的点. @@ -123,8 +127,8 @@ public class GridUtils { */ public static double[] caculateFloatElementLocations(FloatElement floatElement, DynamicUnitList columnWidthList, DynamicUnitList rowHeightList, int verticalValue, int horizentalValue) { - int resolution = ScreenResolution.getScreenResolution(); - +// int resolution = ScreenResolution.getScreenResolution(); + int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); double floatX = columnWidthList.getRangeValue(horizentalValue, 0).toPixD(resolution) + floatElement.getLeftDistance().toPixD(resolution); double floatY = rowHeightList.getRangeValue(verticalValue, 0).toPixD(resolution) + floatElement.getTopDistance().toPixD(resolution); @@ -166,7 +170,66 @@ public class GridUtils { private static int cc_selected_column_or_row(double mouseEvtPosition, int beginValue, int value, DynamicUnitList sizeList) { double tmpIntIndex = 0; int selectedCellIndex = 0; - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); + int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); + if (mouseEvtPosition < 0) { + selectedCellIndex = value; + for (; true; selectedCellIndex--) { + if (tmpIntIndex < mouseEvtPosition) { + break; + } + tmpIntIndex -= sizeList.get(selectedCellIndex).toPixD(resolution); + + } + } else { + boolean isInnerFrozen = false; + for (int i = beginValue; i < 0; i++) { + tmpIntIndex += sizeList.get(i).toPixD(resolution); + + if (tmpIntIndex > mouseEvtPosition) { + selectedCellIndex = i; + isInnerFrozen = true; + break; + } + } + + if (!isInnerFrozen) { + selectedCellIndex = value; + for (; true; selectedCellIndex++) { + tmpIntIndex += sizeList.get(selectedCellIndex).toPixD(resolution); + if (tmpIntIndex > mouseEvtPosition) { + break; + } + } + } + } + + return selectedCellIndex; + } + + public static ColumnRow getEventColumnRow_withresolution(ElementCasePane reportPane, double evtX, double evtY, int resolution) { + ElementCase report = reportPane.getEditingElementCase(); + + // Width and height list. + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); + + int verticalValue = reportPane.getGrid().getVerticalValue(); + int horizentalValue = reportPane.getGrid().getHorizontalValue(); + + // denny: get verticalBeginValue and horizontalBeginValue; + int verticalBeginValue = reportPane.getGrid().getVerticalBeginValue(); + int horizontalBeginValue = reportPane.getGrid().getHorizontalBeginValue(); + return ColumnRow.valueOf( + cc_selected_column_or_row_withresolution(evtX, horizontalBeginValue, horizentalValue, columnWidthList, resolution), + cc_selected_column_or_row_withresolution(evtY, verticalBeginValue, verticalValue, rowHeightList, resolution) + ); + } + + private static int cc_selected_column_or_row_withresolution(double mouseEvtPosition, int beginValue, int value, DynamicUnitList sizeList, int resolution) { + double tmpIntIndex = 0; + int selectedCellIndex = 0; +// int resolution = ScreenResolution.getScreenResolution(); if (mouseEvtPosition < 0) { selectedCellIndex = value; for (; true; selectedCellIndex--) { @@ -222,6 +285,16 @@ public class GridUtils { return ColumnRow.valueOf(col, row); } + public static ColumnRow getAdjustEventColumnRow_withresolution(ElementCasePane reportPane, double evtX, double evtY, int resolution) { + ColumnRow selectedCellPoint = GridUtils.getEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); + + int col = Math.max(selectedCellPoint.getColumn(), 0); + int row = Math.max(selectedCellPoint.getRow(), 0); + + + return ColumnRow.valueOf(col, row); + } + /** * 是否可将当前单元格变为可见的格子 */ @@ -395,4 +468,5 @@ public class GridUtils { } } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 91f9c12fb8..ae3b8711ba 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -255,6 +255,11 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta basePane.add(centerPane, BorderLayout.CENTER); laoyoutWestPane(); +// JPanel eastRegionPane = new JPanel(new BorderLayout()); +// eastRegionPane.add(EastRegionContainerPane.getInstance(), BorderLayout.CENTER); +// eastRegionPane.add(JSliderPane.getInstance(), BorderLayout.SOUTH); +// basePane.add(eastRegionPane, BorderLayout.EAST); + basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST); basePane.setBounds(0, 0, contentWidth, contentHeight); diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 40808db99c..e45d6a0a8d 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -1,23 +1,32 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; +import com.fr.base.ScreenResolution; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.MutilTempalteTabPane; +import com.fr.design.fun.GridUIProcessor; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.islider.UISlider; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.grid.DefaultGridUIProcessor; +import com.fr.grid.Grid; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.math.BigDecimal; +import java.util.Observable; /** * Created by MoMeak on 2017/7/13. @@ -25,6 +34,8 @@ import java.awt.event.ActionListener; public class JSliderPane extends JPanel { private final int KERNING = 2; + public int showValue = 100; + public double resolutionTimes = 1.0; private static JSliderPane THIS; private UITextField showVal; private UISlider slider; @@ -32,11 +43,11 @@ public class JSliderPane extends JPanel { private int sliderValue; private UIButton downButton; private UIButton upButton; - private int showValue; //拖动条处理和button、直接输入不一样 private boolean isButtonOrIsTxt = true; + public JSliderPane() { this.setLayout(new BorderLayout()); slider = new UISlider(0,100,50); @@ -45,7 +56,7 @@ public class JSliderPane extends JPanel { showVal = new UITextField(); showVal.setText("100%"); - + showVal.setPreferredSize(new Dimension(40,18)); showVal.getDocument().addDocumentListener(showValDocumentListener); downButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveDown.png")); @@ -55,15 +66,6 @@ public class JSliderPane extends JPanel { downButton.addActionListener(buttonActionListener); upButton.addActionListener(buttonActionListener); -// double f = TableLayout.FILL; -// double p = TableLayout.PREFERRED; -// Component[][] components = new Component[][]{ -// new Component[]{downButton, slider, upButton, showVal}, -// }; -// double[] rowSize = {p}; -// double[] columnSize = {p,p,p,p}; -// JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - JPanel panel = new JPanel(new FlowLayout(1,1,0)); panel.add(downButton); @@ -85,9 +87,10 @@ public class JSliderPane extends JPanel { } public static final JSliderPane getInstance() { - if (THIS == null) { - THIS = new JSliderPane(); - } +// if (THIS == null) { +// THIS = new JSliderPane(); +// } + THIS = new JSliderPane(); return THIS; } @@ -118,6 +121,7 @@ public class JSliderPane extends JPanel { public void insertUpdate(DocumentEvent e) { isButtonOrIsTxt = true; refreshSlider(); + refreshBody(); } @Override @@ -142,7 +146,28 @@ public class JSliderPane extends JPanel { } } - ActionListener buttonActionListener = new ActionListener() { + private void refreshBody(){ + this.resolutionTimes = divide(showValue,100,2); + int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); + + } + + public double getResolutionTimes(){ + return this.resolutionTimes; + } + + public int getshowValue(){ + return this.showValue; + } + + public static double divide(double v1, double v2,int scale) { + BigDecimal b1 = new BigDecimal(Double.toString(v1)); + BigDecimal b2 = new BigDecimal(Double.toString(v2)); + return b1.divide(b2,scale).doubleValue(); + } + + ActionListener buttonActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { showValue = Integer.parseInt(showVal.getText().substring(0, showVal.getText().indexOf("%"))); @@ -178,6 +203,10 @@ public class JSliderPane extends JPanel { } + public UITextField getShowVal(){ + return this.showVal; + } + public static void main(String[] args) { JFrame jf = new JFrame("test"); diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index a275d3d5df..e2aa2433bc 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -210,6 +210,10 @@ public abstract class JTemplate> ex */ public abstract void removeParameterPaneSelection(); + public abstract void setScale(int resolution); + + public abstract int getScale(); + protected abstract DesignModelAdapter createDesignModel(); /** diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index 51867ba6f1..dae7e7c38a 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -20,6 +20,8 @@ import javax.swing.JPanel; import javax.swing.border.LineBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; @@ -45,8 +47,8 @@ import com.fr.general.Inter; public class FormArea extends JComponent implements ScrollRulerComponent { - private static final double SLIDER_FLOAT = 120.0; - private static final double SLIDER_MIN = 60.0; + private static final double SLIDER_FLOAT = 400.0; + private static final double SLIDER_MIN = 10.0; public static final double DEFAULT_SLIDER = 100.0; private static final int ROTATIONS = 50; private FormDesigner designer; @@ -59,11 +61,12 @@ public class FormArea extends JComponent implements ScrollRulerComponent { //显示和设置表单界面大小的控件 private UINumberField widthPane; private UINumberField heightPane; - private UINumberSlidePane slidePane; + private JSliderPane slidePane; private boolean isValid = true; // 初始时滑块值为100,托动后的值设为START_VALUE; private double START_VALUE = DEFAULT_SLIDER; private double screenValue; + private JSliderPane sliderPane; public FormScrollBar getHorScrollBar() { return horScrollBar; @@ -114,8 +117,13 @@ public class FormArea extends JComponent implements ScrollRulerComponent { widthPane.setPreferredSize(new Dimension(60, 0)); heightPane = new UINumberField(); heightPane.setPreferredSize(new Dimension(60, 0)); - slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT); - slidePane.setPreferredSize(new Dimension(200,0)); + +// slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT); +// slidePane.setPreferredSize(new Dimension(260,20)); + slidePane = JSliderPane.getInstance(); + slidePane.setPreferredSize(new Dimension(300,20)); + + JPanel resizePane =TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ {tipsPane, new UILabel(), widthPane, new UILabel(Inter.getLocText("FR-Designer_Indent-Pixel")), new UILabel("x"), heightPane, new UILabel(Inter.getLocText("FR-Designer_Indent-Pixel")), new UILabel(), slidePane}}, @@ -124,8 +132,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent { setWidgetsConfig(); // 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小 slidePane.setEnabled(false); - slidePane.setVisible(false); -// initTransparent(); + slidePane.setVisible(true); + initTransparent(); initCalculateSize(); } @@ -143,16 +151,36 @@ public class FormArea extends JComponent implements ScrollRulerComponent { private void initTransparent() { initCalculateSize(); - slidePane.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - double value = ((UINumberSlidePane) e.getSource()).getValue(); - reCalculateRoot(value, true); - JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if(form != null){ - form.fireTargetModified(); - } - } - }); + slidePane.getShowVal().getDocument().addDocumentListener(new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { +// slidePane.getShowVal().getDocument() + double value = slidePane.getshowValue(); + reCalculateRoot(value, true); + JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if(form != null){ + form.fireTargetModified(); + } + } + + @Override + public void removeUpdate(DocumentEvent e) { + } + + @Override + public void changedUpdate(DocumentEvent e) { + } + }); +// slidePane.addChangeListener(new ChangeListener() { +// public void stateChanged(ChangeEvent e) { +// double value = ((UINumberSlidePane) e.getSource()).getValue(); +// reCalculateRoot(value, true); +// JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); +// if(form != null){ +// form.fireTargetModified(); +// } +// } +// }); } /** diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index ba491e3519..c8971264a7 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -240,6 +240,16 @@ public class JForm extends JTemplate implements BaseJForm { return; } + @Override + public void setScale(int resolution) { + + } + + @Override + public int getScale() { + return 0; + } + /** * 创建权限细粒度编辑面板 * From 3d04d3d75412c89d354c72ad38cdf669959c999c Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 18 Jul 2017 16:43:13 +0800 Subject: [PATCH 060/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BFtab=E9=A1=B9=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8F=98=E5=8C=96=EF=BC=88=E9=83=A8=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 2 +- .../mainframe/ElementCasePaneDelegate.java | 12 +- .../mainframe/EastRegionContainerPane.java | 158 +++++++++++++++--- .../form/parameter/FormParaDesigner.java | 1 + .../src/com/fr/design/mainframe/JForm.java | 21 +-- 5 files changed, 154 insertions(+), 40 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 52bbc63931..6865c49d00 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -504,7 +504,7 @@ public abstract class ElementCasePane extends Tar */ public void setSelection(Selection selection) { if (!ComparatorUtils.equals(this.selection, selection) || - !ComparatorUtils.equals(EastRegionContainerPane.getInstance().getDownPane(), CellElementPropertyPane.getInstance())) { + !ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) { this.selection = selection; fireSelectionChanged(); } diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 7fb3132bc4..4bb9c6832f 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.design.fun.MenuHandler; import com.fr.design.menu.KeySetUtils; import com.fr.general.Inter; +import com.fr.grid.selection.FloatSelection; import com.fr.page.ReportSettingsProvider; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.DesignState; @@ -56,8 +57,15 @@ public class ElementCasePaneDelegate extends ElementCasePane { QuickEditorRegion.getInstance().populate(getCurrentEditor()); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if (editingTemplate != null && !editingTemplate.isUpMode()) { - EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); - EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); + if (((ElementCasePaneDelegate)e.getSource()).getSelection() instanceof FloatSelection) { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT); +// EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); + EastRegionContainerPane.getInstance().replaceFloatElementPane(QuickEditorRegion.getInstance()); + } else { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); + EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); + EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); + } EastRegionContainerPane.getInstance().removeParameterPane(); } } diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 131ed25d21..c661580e4f 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -15,9 +15,7 @@ import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.*; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; +import java.util.*; public class EastRegionContainerPane extends UIEastResizableContainer { private static EastRegionContainerPane THIS; @@ -37,6 +35,25 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private static final String KEY_CONDITION_ATTR = "conditionAttr"; private static final String KEY_HYPERLINK = "hyperlink"; private static final String KEY_WIDGET_LIB = "widgetLib"; + private static final String DEFAULT_PANE = "defaultPane"; // "无可用配置项"面板 + + +// public static final String MODE_REPORT = "report"; // 报表模式 +// public static final String MODE_REPORT_PARA = "reportPara"; // 报表参数面板 +// public static final String MODE_FORM = "form"; // 表单模式 +// public static final String MODE_POLY = "poly"; // 聚合报表模式 + public enum PropertyMode { + REPORT, // 报表 + REPORT_PARA, // 报表参数面板 + REPORT_FLOAT, // 报表悬浮元素 + FORM, // 表单 + FORM_REPORT, // 表单报表块 + POLY, // 聚合报表 + POLY_REPORT, // 聚合报表-报表块 + POLY_CHART // 聚合报表-图表块 + } + private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板) + /** * 得到实例 @@ -56,28 +73,46 @@ public class EastRegionContainerPane extends UIEastResizableContainer { super(); // setVerticalDragEnabled(false); initPropertyItemList(); - initContentPane(); + switchMode(PropertyMode.REPORT); +// initContentPane(); // super(leftPane, rightPane); setContainerWidth(CONTAINER_WIDTH); } private void initPropertyItemList() { propertyItemMap = new LinkedHashMap<>(); // 有序map - // 单元格元素 - PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"), "/com/fr/design/images/buttonicon/add.png"); + PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"), + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 单元格属性 - PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"), + "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 悬浮元素 - PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"), + "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT}); // 控件设置 - PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"), + "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT}); // 条件属性 - PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"), + "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 超级链接 - PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"), + "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 组件库 - PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), "com/fr/design/images/toolbarbtn/close.png"); + PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), + "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.FORM}, + new PropertyMode[]{PropertyMode.FORM}); +// // 图表属性设置 +// PropertyItem chartSettings = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), +// "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.FORM}, +// new PropertyMode[]{PropertyMode.FORM}); propertyItemMap.put(KEY_CELL_ELEMENT, cellElement); propertyItemMap.put(KEY_CELL_ATTR, cellAttr); propertyItemMap.put(KEY_FLOAT_ELEMENT, floatElement); @@ -108,14 +143,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { rightPane.setBackground(Color.green); rightPane.setLayout(propertyCard); for (PropertyItem item : propertyItemMap.values()) { - if (item.isPoppedOut()) { + if (item.isPoppedOut() || !item.isVisible()) { continue; } rightPane.add(item.getName(), item.getPropertyPanel()); } - rightPane.add(getDefaultPane()); + rightPane.add(DEFAULT_PANE, getDefaultPane()); replaceRightPane(rightPane); + refreshRightPane(); } // 左侧按钮面板 @@ -123,7 +159,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { leftPane = new JPanel(); leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0)); for (PropertyItem item : propertyItemMap.values()) { - if (item.isPoppedOut()) { + if (item.isPoppedOut() || !item.isVisible()) { continue; } leftPane.add(item.getButton()); @@ -134,10 +170,30 @@ public class EastRegionContainerPane extends UIEastResizableContainer { replaceLeftPane(leftPane); } + public void switchMode(PropertyMode mode) { + if (currentMode != null && currentMode.equals(mode)) { + return; + } + currentMode = mode; + updateAllPropertyPane(); + } + + public void updateAllPropertyPane() { + updatePropertyItemMap(); + initContentPane(); + } + + private void updatePropertyItemMap() { + for (PropertyItem item : propertyItemMap.values()) { + item.updateStatus(); + } + } + // 弹出面板时,更新框架内容 private void removeItem(PropertyItem propertyItem) { leftPane.remove(propertyItem.getButton()); rightPane.remove(propertyItem.getPropertyPanel()); + refreshRightPane(); refreshContainer(); } @@ -186,6 +242,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return propertyItemMap.get(KEY_CELL_ATTR).getContentPane(); } + public void replaceFloatElementPane(JComponent pane) { + propertyItemMap.get(KEY_FLOAT_ELEMENT).replaceContentPane(pane); + } + + public JComponent getFloatElementPane() { + return propertyItemMap.get(KEY_FLOAT_ELEMENT).getContentPane(); + } + public void replaceWidgetSettingsPane(JComponent pane) { propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceContentPane(pane); } @@ -203,7 +267,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } public void addParameterPane(JComponent paraPane) { - propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(paraPane); +// propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(paraPane); } public void setParameterHeight(int height) { @@ -249,6 +313,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer { * 刷新右面板 */ public void refreshRightPane() { + boolean hasAvailableTab = false; + for (String name : propertyItemMap.keySet()) { + PropertyItem propertyItem = propertyItemMap.get(name); + if (propertyItem.isVisible() && !propertyItem.isPoppedOut() && propertyItem.isEnabled()) { + propertyCard.show(rightPane, name); // 显示第一个可用tab + hasAvailableTab = true; + break; + } + } + if (!hasAvailableTab) { + propertyCard.show(rightPane, DEFAULT_PANE); + } // if (this.getRightPane() instanceof DockingView) { // ((DockingView) this.getRightPane()).refreshDockingView(); @@ -275,7 +351,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { class PropertyItem { - // private UIButton button; private UIButton button; private String name; // 用于 card 切换 private String title; // 用于显示 @@ -284,21 +359,54 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private FixedPopupPane popupPane; // 左侧固定弹出框 private PopupToolPane popupToolPane; // 弹出工具条 private PopupDialog popupDialog; // 弹出框 - private int x, y; // 弹出框的坐标 - private int height; // 弹出框的高度 private boolean isPoppedOut = false; // 是否弹出 - private Dimension fixedSize; + private boolean isVisible = true; // 是否可见 + private boolean isEnabled = true; // 是否可用 + private Set visibleModes; + private Set enableModes; - public PropertyItem(String name, String title, String btnUrl) { + public PropertyItem(String name, String title, String btnUrl, PropertyMode[] visibleModes, PropertyMode[] enableModes) { this.name = name; this.title = title; initButton(btnUrl); initPropertyPanel(); +// this.visibleModes = new ArrayList(visibleModes); + initModes(visibleModes, enableModes); + } + + private void initModes(PropertyMode[] visibleModes, PropertyMode[] enableModes) { + this.enableModes = new HashSet<>(); + this.visibleModes = new HashSet<>(); + for (PropertyMode enableMode : enableModes) { + this.enableModes.add(enableMode); + } + for (PropertyMode visibleMode : visibleModes) { + this.visibleModes.add(visibleMode); + } + this.visibleModes.addAll(this.enableModes); // 可用必可见 + } + + public void updateStatus() { + setEnabled(enableModes.contains(currentMode)); + setVisible(visibleModes.contains(currentMode)); + } + + public boolean isVisible() { + return isVisible; + } + + public void setVisible(boolean isVisible) { + this.isVisible = isVisible; + } + + public boolean isEnabled() { + return isEnabled; } // 选项不可用 - public void setEnabled(boolean enabled) { - button.setEnabled(enabled); + public void setEnabled(boolean isEnabled) { + this.isEnabled = isEnabled; + button.setEnabled(isEnabled); } private void initPropertyPanel() { @@ -311,10 +419,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyPanel.add(contentPane, BorderLayout.CENTER); } - public void setIsPoppedOut(boolean isPoppedOut) { - this.isPoppedOut = isPoppedOut; - } - public boolean isPoppedOut() { return isPoppedOut; } diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index 1327823bb5..73ca39f2e7 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -109,6 +109,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP */ public void initBeforeUpEdit() { WidgetToolBarPane.getInstance(this); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); EastRegionContainerPane.getInstance().replaceWidgetLibPane( FormWidgetDetailPane.getInstance(this)); if (!BaseUtils.isAuthorityEditing()) { diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index ba491e3519..d5f1229a22 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -257,12 +257,12 @@ public class JForm extends JTemplate implements BaseJForm { return; } editingComponent = comp.createToolPane(this, formDesign); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); if (BaseUtils.isAuthorityEditing()) { - EastRegionContainerPane.getInstance().replaceUpPane( + EastRegionContainerPane.getInstance().replaceWidgetSettingsPane( ComparatorUtils.equals(editingComponent.getClass(), NoSupportAuthorityEdit.class) ? editingComponent : createAuthorityEditPane()); } else { - EastRegionContainerPane.getInstance().replaceUpPane(editingComponent); - + EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(editingComponent); } } @@ -617,17 +617,19 @@ public class JForm extends JTemplate implements BaseJForm { if (formDesign.isReportBlockEditing()) { if (elementCaseDesign != null) { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM_REPORT); EastRegionContainerPane.getInstance().removeParameterPane(); - EastRegionContainerPane.getInstance().replaceDownPane(elementCaseDesign.getEastDownPane()); - EastRegionContainerPane.getInstance().replaceUpPane(elementCaseDesign.getEastUpPane()); + EastRegionContainerPane.getInstance().replaceCellAttrPane(elementCaseDesign.getEastDownPane()); + EastRegionContainerPane.getInstance().replaceCellElementPane(elementCaseDesign.getEastUpPane()); return; } } - EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign)); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); + EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign)); EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(formDesign)); EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance(formDesign).getPreferredSize().height); - if (EastRegionContainerPane.getInstance().getDownPane() == null) { + if (EastRegionContainerPane.getInstance().getWidgetLibPane() == null) { new Thread() { public void run() { try { @@ -638,15 +640,14 @@ public class JForm extends JTemplate implements BaseJForm { JPanel pane = new JPanel(); pane.setLayout(new BorderLayout()); pane.add(FormWidgetDetailPane.getInstance(formDesign), BorderLayout.CENTER); - EastRegionContainerPane.getInstance().replaceDownPane(pane); + EastRegionContainerPane.getInstance().replaceWidgetLibPane(pane); } }.start(); } else { JPanel pane = new JPanel(); pane.setLayout(new BorderLayout()); pane.add(FormWidgetDetailPane.getInstance(formDesign), BorderLayout.CENTER); - EastRegionContainerPane.getInstance().replaceDownPane(pane); - + EastRegionContainerPane.getInstance().replaceWidgetLibPane(pane); } } From 49e4850a0018be0257ffa53f84a2bc9b5e38448e Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 18 Jul 2017 17:30:20 +0800 Subject: [PATCH 061/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BFtab=E9=A1=B9=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8F=98=E5=8C=96=EF=BC=88=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E9=83=A8=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 3 ++- designer/src/com/fr/poly/PolyDesigner.java | 9 ++++--- .../com/fr/poly/creator/ECBlockEditor.java | 2 +- .../mainframe/EastRegionContainerPane.java | 26 +++++++------------ 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index fd4cd7b0da..2708eea5f2 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -746,7 +746,8 @@ public class JWorkBook extends JTemplate { if (delegate4ToolbarMenuAdapter() instanceof PolyDesigner) { PolyDesigner polyDesigner = (PolyDesigner) delegate4ToolbarMenuAdapter(); if (polyDesigner.getSelectionType() == PolyDesigner.SelectionType.NONE || polyDesigner.getSelection() == null) { - EastRegionContainerPane.getInstance().replaceDownPane(new JPanel()); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY); +// EastRegionContainerPane.getInstance().replaceDownPane(new JPanel()); QuickEditorRegion.getInstance().populate(QuickEditor.DEFAULT_EDITOR); } else { EastRegionContainerPane.getInstance().replaceDownPane(CellElementPropertyPane.getInstance()); diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index 66cdcecb78..faa15a9463 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -842,11 +842,14 @@ public class PolyDesigner extends ReportComponent { } QuickEditorRegion.getInstance().populate(editComponent.getCurrentEditor()); CellElementPropertyPane.getInstance().populate(editComponent); - EastRegionContainerPane.getInstance().replaceDownPane(CellElementPropertyPane.getInstance()); + EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index c661580e4f..6e3de8e189 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -37,11 +37,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private static final String KEY_WIDGET_LIB = "widgetLib"; private static final String DEFAULT_PANE = "defaultPane"; // "无可用配置项"面板 - -// public static final String MODE_REPORT = "report"; // 报表模式 -// public static final String MODE_REPORT_PARA = "reportPara"; // 报表参数面板 -// public static final String MODE_FORM = "form"; // 表单模式 -// public static final String MODE_POLY = "poly"; // 聚合报表模式 public enum PropertyMode { REPORT, // 报表 REPORT_PARA, // 报表参数面板 @@ -83,36 +78,33 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyItemMap = new LinkedHashMap<>(); // 有序map // 单元格元素 PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"), - "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 单元格属性 PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"), - "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 悬浮元素 PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"), - "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT}); // 控件设置 PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"), - "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT}); + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART}); // 条件属性 PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"), - "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 超级链接 PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"), - "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY}, + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 组件库 PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), - "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.FORM}, + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.FORM}, new PropertyMode[]{PropertyMode.FORM}); -// // 图表属性设置 -// PropertyItem chartSettings = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), -// "com/fr/design/images/toolbarbtn/close.png", new PropertyMode[]{PropertyMode.FORM}, -// new PropertyMode[]{PropertyMode.FORM}); + propertyItemMap.put(KEY_CELL_ELEMENT, cellElement); propertyItemMap.put(KEY_CELL_ATTR, cellAttr); propertyItemMap.put(KEY_FLOAT_ELEMENT, floatElement); From 4525ae72c9dfdb75117b85e004abd36081c281ad Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 18 Jul 2017 21:14:49 +0800 Subject: [PATCH 062/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BFtab=E9=A1=B9=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8F=98=E5=8C=96=EF=BC=88=E6=9D=83=E9=99=90=E7=BC=96=E8=BE=91?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 5 +-- .../fr/design/mainframe/JPolyWorkBook.java | 5 +++ .../com/fr/design/mainframe/JWorkBook.java | 7 +++++ .../actions/AllowAuthorityEditAction.java | 2 +- .../com/fr/design/locale/designer.properties | 1 + .../design/locale/designer_en_US.properties | 1 + .../design/locale/designer_ja_JP.properties | 3 +- .../design/locale/designer_ko_KR.properties | 3 +- .../design/locale/designer_zh_CN.properties | 1 + .../design/locale/designer_zh_TW.properties | 1 + .../fr/design/mainframe/DesignerFrame.java | 5 +-- .../mainframe/EastRegionContainerPane.java | 31 ++++++++++++++++++- .../com/fr/design/mainframe/JTemplate.java | 3 ++ .../com/fr/design/roleAuthority/RoleTree.java | 2 +- .../src/com/fr/design/mainframe/JForm.java | 4 +++ 15 files changed, 63 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 4bb9c6832f..4336282091 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -48,8 +48,9 @@ public class ElementCasePaneDelegate extends ElementCasePane { if (BaseUtils.isAuthorityEditing()) { AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); authorityPropertyPane.populate(); - EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); - EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); + EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); + EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); return; } diff --git a/designer/src/com/fr/design/mainframe/JPolyWorkBook.java b/designer/src/com/fr/design/mainframe/JPolyWorkBook.java index aa5a727e8d..4f949f5df9 100644 --- a/designer/src/com/fr/design/mainframe/JPolyWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JPolyWorkBook.java @@ -38,4 +38,9 @@ public class JPolyWorkBook extends JWorkBook { public SheetNameTabPane createSheetNameTabPane(ReportComponentComposite reportCompositeX){ return new PolySheetNameTabPane(reportCompositeX); } + + @Override + public void refreshEastPropertiesPane() { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY); + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 2708eea5f2..819d3f1326 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -102,6 +102,13 @@ public class JWorkBook extends JTemplate { populateReportParameterAttr(); } + @Override + public void refreshEastPropertiesPane() { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); + EastRegionContainerPane.getInstance().replaceCellElementPane(getEastUpPane()); + EastRegionContainerPane.getInstance().replaceCellAttrPane(getEastDownPane()); + } + @Override protected UIModeControlContainer createCenterPane() { parameterPane = ModuleContext.isModuleStarted(Module.FORM_MODULE) ? new ParameterDefinitePane() : null; diff --git a/designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java b/designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java index 4a79a2d986..4d73692054 100644 --- a/designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java +++ b/designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java @@ -1 +1 @@ -package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.menu.KeySetUtils; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.*; /** * Author : daisy * Date: 13-8-30 * Time: 上午10:12 */ public class AllowAuthorityEditAction extends TemplateComponentAction { public AllowAuthorityEditAction(TargetComponent t) { super(t); this.setMenuKeySet(KeySetUtils.ALLOW_AUTHORITY_EDIT); this.setName(getMenuKeySet().getMenuName()); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/allow_authority_edit.png")); } /** * 撤销 */ public void prepare4Undo() { HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().iniAuthorityUndoState(); } /** * 执行动作 * * @return 是否执行成功 */ public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) { return false; } cleanAuthorityCondition(); //进入时是格式刷则取消格式刷 if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { tc.cancelFormat(); } BaseUtils.setAuthorityEditing(true); ReportAndFSManagePane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView(); WestRegionContainerPane.getInstance().replaceDownPane(ReportAndFSManagePane.getInstance()); DesignerContext.getDesignerFrame().setCloseMode(UIConstants.CLOSE_OF_AUTHORITY); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); EastRegionContainerPane.getInstance().replaceUpPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); //画虚线 return true; } /** * 进入权限编辑之前将权限编辑界面重置一下工具栏 */ private void cleanAuthorityCondition() { java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); for (int i = 0; i < opendedTemplate.size(); i++) { opendedTemplate.get(i).cleanAuthorityUndo(); } } } \ No newline at end of file +package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.menu.KeySetUtils; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.*; /** * Author : daisy * Date: 13-8-30 * Time: 上午10:12 */ public class AllowAuthorityEditAction extends TemplateComponentAction { public AllowAuthorityEditAction(TargetComponent t) { super(t); this.setMenuKeySet(KeySetUtils.ALLOW_AUTHORITY_EDIT); this.setName(getMenuKeySet().getMenuName()); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/allow_authority_edit.png")); } /** * 撤销 */ public void prepare4Undo() { HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().iniAuthorityUndoState(); } /** * 执行动作 * * @return 是否执行成功 */ public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) { return false; } cleanAuthorityCondition(); //进入时是格式刷则取消格式刷 if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { tc.cancelFormat(); } BaseUtils.setAuthorityEditing(true); ReportAndFSManagePane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView(); WestRegionContainerPane.getInstance().replaceDownPane(ReportAndFSManagePane.getInstance()); DesignerContext.getDesignerFrame().setCloseMode(UIConstants.CLOSE_OF_AUTHORITY); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); //画虚线 return true; } /** * 进入权限编辑之前将权限编辑界面重置一下工具栏 */ private void cleanAuthorityCondition() { java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); for (int i = 0; i < opendedTemplate.size(); i++) { opendedTemplate.get(i).cleanAuthorityUndo(); } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index cf38d99b53..0e51b4c21f 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2010,3 +2010,4 @@ FR-Designer_Cell_Attributes=Cell Attributes FR-Designer_Float_Element=Float Element FR-Designer_Widget_Library=Widget Library FR-Designer_No_Settings_Available=No Settings Available! +FR-Designer_Configured_Roles=Configured role 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 83ac59ba1c..296dcbe7af 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 @@ -2010,3 +2010,4 @@ FR-Designer_Cell_Attributes=Cell Attributes FR-Designer_Float_Element=Float Element FR-Designer_Widget_Library=Widget Library FR-Designer_No_Settings_Available=No Settings Available! +FR-Designer_Configured_Roles=Configured role 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 3d037b05e2..03514583a3 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 @@ -1986,4 +1986,5 @@ FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20 FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027 FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20 FR-Designer_Widget_Library= -FR-Designer_No_Settings_Available= \ No newline at end of file +FR-Designer_No_Settings_Available= +FR-Designer_Configured_Roles=\u69CB\u6210\u3055\u308C\u305F\u5F79\u5272 \ No newline at end of file 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 a561e99a6d..cafc02022c 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 @@ -1986,4 +1986,5 @@ FR-Designer_Cell_Element=\uC140\uC694\uC18C FR-Designer_Cell_Attributes=\uC140\uC18D\uC131 FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C FR-Designer_Widget_Library= -FR-Designer_No_Settings_Available= \ No newline at end of file +FR-Designer_No_Settings_Available= +FR-Designer_Configured_Roles=\uC5ED\uD560\uC774\uAD6C\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \ No newline at end of file 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 c487655cb8..1675df05e3 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 @@ -2008,3 +2008,4 @@ FR-Designer_Cell_Attributes=\u5355\u5143\u683C\u5C5E\u6027 FR-Designer_Float_Element=\u60AC\u6D6E\u5143\u7D20 FR-Designer_Widget_Library=\u7EC4\u4EF6\u5E93 FR-Designer_No_Settings_Available=\u65E0\u53EF\u7528\u914D\u7F6E\u9879\uFF01 +FR-Designer_Configured_Roles=\u5DF2\u914D\u7F6E\u89D2\u8272 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 848b2f05ee..269d4e2e47 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 @@ -2009,3 +2009,4 @@ FR-Designer_Cell_Attributes=\u5132\u5B58\u683C\u5C6C\u6027 FR-Designer_Float_Element=\u61F8\u6D6E\u5143\u7D20 FR-Designer_Widget_Library=\u7D44\u4EF6\u5EAB FR-Designer_No_Settings_Available=\u7121\u53EF\u7528\u914D\u5BD8\u9805\uFF01 +FR-Designer_Configured_Roles=\u5DF2\u914D\u7F6E\u89D2\u8272 diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 91f9c12fb8..19e71ec8e6 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -421,10 +421,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta BaseUtils.setAuthorityEditing(false); WestRegionContainerPane.getInstance().replaceDownPane( TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); - EastRegionContainerPane.getInstance().replaceUpPane( - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEastUpPane()); - EastRegionContainerPane.getInstance().replaceDownPane( - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEastDownPane()); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); DesignerContext.getDesignerFrame().resetToolkitByPlus( HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus()); needToAddAuhtorityPaint(); diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 6e3de8e189..9aaa4f6fb8 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -35,6 +35,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private static final String KEY_CONDITION_ATTR = "conditionAttr"; private static final String KEY_HYPERLINK = "hyperlink"; private static final String KEY_WIDGET_LIB = "widgetLib"; + private static final String KEY_AUTHORITY_EDITION = "authorityEdition"; + private static final String KEY_CONFIGURED_ROLES = "editedRoles"; private static final String DEFAULT_PANE = "defaultPane"; // "无可用配置项"面板 public enum PropertyMode { @@ -45,7 +47,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { FORM_REPORT, // 表单报表块 POLY, // 聚合报表 POLY_REPORT, // 聚合报表-报表块 - POLY_CHART // 聚合报表-图表块 + POLY_CHART, // 聚合报表-图表块 + AUTHORITY_EDITION // 权限编辑 } private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板) @@ -104,6 +107,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.FORM}, new PropertyMode[]{PropertyMode.FORM}); + // 权限编辑 + PropertyItem authorityEdition = new PropertyItem(KEY_AUTHORITY_EDITION, Inter.getLocText("FR-Designer_Permissions_Edition"), + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}, + new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}); + // 已配置角色 + PropertyItem configuredRoles = new PropertyItem(KEY_CONFIGURED_ROLES, Inter.getLocText("FR-Designer_Configured_Roles"), + "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}, + new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}); propertyItemMap.put(KEY_CELL_ELEMENT, cellElement); propertyItemMap.put(KEY_CELL_ATTR, cellAttr); @@ -112,6 +123,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyItemMap.put(KEY_CONDITION_ATTR, conditionAttr); propertyItemMap.put(KEY_HYPERLINK, hyperlink); propertyItemMap.put(KEY_WIDGET_LIB, widgetLib); + propertyItemMap.put(KEY_AUTHORITY_EDITION, authorityEdition); + propertyItemMap.put(KEY_CONFIGURED_ROLES, configuredRoles); } // "无可用配置项"面板 @@ -258,6 +271,22 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return propertyItemMap.get(KEY_WIDGET_LIB).getContentPane(); } + public void replaceAuthorityEditionPane(JComponent pane) { + propertyItemMap.get(KEY_AUTHORITY_EDITION).replaceContentPane(pane); + } + + public JComponent getAuthorityEditionPane() { + return propertyItemMap.get(KEY_AUTHORITY_EDITION).getContentPane(); + } + + public void replaceConfiguredRolesPane(JComponent pane) { + propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane); + } + + public JComponent getConfiguredRolesPane() { + return propertyItemMap.get(KEY_CONFIGURED_ROLES).getContentPane(); + } + public void addParameterPane(JComponent paraPane) { // propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(paraPane); } diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index a275d3d5df..e8a835baa7 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -109,6 +109,9 @@ public abstract class JTemplate> ex } } + // 刷新右侧属性面板 + public abstract void refreshEastPropertiesPane(); + // 为收集模版信息作准备 private void initForCollect() { template.initTemplateID(); // 为新模板设置 templateID 属性 diff --git a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java index 1af8c1caa0..ce6102fe31 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java +++ b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java @@ -1 +1 @@ -package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file +package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getAuthorityEditionPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getAuthorityEditionPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index d5f1229a22..85730fd4f1 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -88,6 +88,10 @@ public class JForm extends JTemplate implements BaseJForm { super(form, file); } + @Override + public void refreshEastPropertiesPane() { + } + public int getMenuState() { return DesignState.JFORM; From e08c971d3ffe587c9ee7f74c3d33271706cec511 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 18 Jul 2017 23:30:54 +0800 Subject: [PATCH 063/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/grid/GridColumnUI.java | 8 ++++---- .../src/com/fr/design/mainframe/JSliderPane.java | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/designer/src/com/fr/grid/GridColumnUI.java b/designer/src/com/fr/grid/GridColumnUI.java index eb625eabeb..292c38a0a3 100644 --- a/designer/src/com/fr/grid/GridColumnUI.java +++ b/designer/src/com/fr/grid/GridColumnUI.java @@ -163,11 +163,11 @@ public class GridColumnUI extends ComponentUI { } double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth(); - if (stringWidth > tmpIncreaseWidth) { - paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); - } else { +// if (stringWidth > tmpIncreaseWidth) { +// paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); +// } else { paintNormalContent(i, g2d, tmpWidth1, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); - } +// } } diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index e45d6a0a8d..b4c8792894 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -107,6 +107,7 @@ public class JSliderPane extends JPanel { public void run() { sliderValue = slider.getValue(); getTimes(sliderValue); + showValue = times; showVal.setText(times + "%"); } }); @@ -120,6 +121,7 @@ public class JSliderPane extends JPanel { @Override public void insertUpdate(DocumentEvent e) { isButtonOrIsTxt = true; + resolutionTimes = divide(showValue,100,2); refreshSlider(); refreshBody(); } @@ -147,9 +149,9 @@ public class JSliderPane extends JPanel { } private void refreshBody(){ - this.resolutionTimes = divide(showValue,100,2); - int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); + +// int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes); +// HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); } @@ -175,16 +177,20 @@ public class JSliderPane extends JPanel { if(e.getActionCommand().equals("less")){ int newDownVal = showValue - 10; if (newDownVal >= 10 ){ + showValue = newDownVal; showVal.setText(newDownVal + "%"); }else { + showValue = newDownVal; showVal.setText(10 + "%"); } } if(e.getActionCommand().equals("more")){ int newUpVal = showValue + 10; if (newUpVal <= 400 ){ + showValue = newUpVal; showVal.setText(newUpVal + "%"); }else { + showValue = newUpVal; showVal.setText(400 + "%"); } } From cb344ec64ae32d72b372f84c93a00927864e49d4 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 18 Jul 2017 23:31:53 +0800 Subject: [PATCH 064/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/src/com/fr/design/mainframe/FormArea.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index dae7e7c38a..51a18c6969 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -155,7 +155,9 @@ public class FormArea extends JComponent implements ScrollRulerComponent { @Override public void insertUpdate(DocumentEvent e) { // slidePane.getShowVal().getDocument() - double value = slidePane.getshowValue(); + double value = Integer.parseInt(slidePane.getShowVal().getText().substring(0, slidePane.getShowVal().getText().indexOf("%"))); + value = value>400 ? 400 : value; + value = value<10 ? 10 : value; reCalculateRoot(value, true); JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if(form != null){ From bc2ab1dbe94ab32e1580f7427cc5c955ad4c88f8 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 18 Jul 2017 21:23:45 +0800 Subject: [PATCH 065/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=8F=AF=E4=BC=B8=E7=BC=A9=E9=9D=A2=E6=9D=BF=E6=94=B9?= =?UTF-8?q?=E5=9B=9E=E5=8E=9F=E6=9C=89=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/icontainer/UIResizableContainer.java | 177 +++--------------- 1 file changed, 21 insertions(+), 156 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 0c8633fbd0..96eccfc595 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -5,6 +5,7 @@ import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.stable.Constants; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.stable.collections.utils.MathUtils; import javax.swing.*; import java.awt.*; @@ -18,9 +19,7 @@ public class UIResizableContainer extends JPanel { private int containerWidth = 240; private int preferredWidth = 240; private int toolPaneY = 300; - private int toolPaneHeightRight = 20; private int toolPaneHeight = 10; - private int clickToolPaneHeight = 40; private int bottomHeight = 30; private JComponent upPane; @@ -29,7 +28,7 @@ public class UIResizableContainer extends JPanel { private JComponent parameterPane = new JPanel(); private HorizotalToolPane horizontToolPane; - private VerticalToolPaneRight verticalToolPane; + private VerticalToolPane verticalToolPane; private int direction; private boolean hasParameterPane; @@ -46,7 +45,7 @@ public class UIResizableContainer extends JPanel { private boolean isDownPaneVisible = true ; private int paraHeight; - public UIResizableContainer(int direction) { + public UIResizableContainer(int direction) { this(new JPanel(), new JPanel(), direction); } @@ -80,12 +79,13 @@ public class UIResizableContainer extends JPanel { public UIResizableContainer(JComponent upPane, JComponent downPane, int direction) { setBackground(UIConstants.NORMAL_BACKGROUND); + this.upPane = upPane; this.direction = direction; this.downPane = downPane; this.horizontToolPane = new HorizotalToolPane(); - this.verticalToolPane = new VerticalToolPaneRight(); + this.verticalToolPane = new VerticalToolPane(); setLayout(containerLayout); add(upPane); @@ -94,23 +94,6 @@ public class UIResizableContainer extends JPanel { add(verticalToolPane); } - public static void main(String... args) { - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - - UIResizableContainer bb = new UIResizableContainer(1); - JPanel cc = new JPanel(); - cc.setBackground(Color.white); - - content.add(bb, BorderLayout.EAST); - content.add(cc, BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(500, 500); - jf.setVisible(true); - } - public UIResizableContainer(JComponent upPane, int direction) { setBackground(UIConstants.NORMAL_BACKGROUND); @@ -118,17 +101,17 @@ public class UIResizableContainer extends JPanel { this.direction = direction; this.horizontToolPane = new HorizotalToolPane(); - setLayout(containerLayout); add(upPane); add(horizontToolPane); + } public void setDownPane(JComponent downPane) { if (this.downPane != null){ return; } - this.verticalToolPane = new VerticalToolPaneRight(); + this.verticalToolPane = new VerticalToolPane(); this.downPane = downPane; add(downPane); add(verticalToolPane); @@ -249,11 +232,6 @@ public class UIResizableContainer extends JPanel { upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, getHeight() - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); } - }else { - parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());//10,0,230,462 - upPane.setBounds(0, toolPaneHeightRight, containerWidth, getHeight() - toolPaneHeightRight);//20,0,230,0 - verticalToolPane.setBounds(0, 0, containerWidth, toolPaneHeightRight);//0,0,10,462 - } } @@ -510,7 +488,6 @@ public class UIResizableContainer extends JPanel { public void paint(Graphics g) { Image button; if (direction == Constants.RIGHT) { -// g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { if (model == UIConstants.MODEL_NORMAL) { @@ -549,134 +526,22 @@ public class UIResizableContainer extends JPanel { } } - private class VerticalToolPaneRight extends JPanel { - private int model = UIConstants.MODEL_NORMAL; - - public VerticalToolPaneRight() { - super(); - addMouseMotionListener(new MouseMotionListener() { - - @Override - public void mouseMoved(MouseEvent e) { - if (e.getY() <= ARROW_RANGE_VERTICAL) { - setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - model = UIConstants.MODEL_PRESS; - } else if (isLeftRightDragEnabled) { - setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)); - } - repaint(); - } - - @Override - public void mouseDragged(MouseEvent e) { - if (!isLeftRightDragEnabled) { - return; - } - upPane.setVisible(true); - downPane.setVisible(true); - if (direction == Constants.RIGHT) { - containerWidth = e.getXOnScreen() - UIResizableContainer.this.getLocationOnScreen().x; - } else if (direction == Constants.LEFT) { - containerWidth = UIResizableContainer.this.getWidth() + (UIResizableContainer.this.getLocationOnScreen().x - e.getXOnScreen()); - } - - containerWidth = containerWidth > MAX_WIDTH ? MAX_WIDTH : containerWidth; - containerWidth = containerWidth < MIN_WIDTH ? MIN_WIDTH : containerWidth; - if (containerWidth < MIN_WIDTH) { - upPane.setVisible(false); - downPane.setVisible(false); - containerWidth = toolPaneHeight; - } - refreshContainer(); - if (BaseUtils.isAuthorityEditing()) { - DesignerContext.getDesignerFrame().doResize(); - } - - - } - }); - addMouseListener(new MouseAdapter() { - @Override - public void mouseEntered(MouseEvent e) { - if (!isLeftRightDragEnabled) { - return; - } - setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)); - } - - @Override - public void mouseExited(MouseEvent e) { - setCursor(Cursor.getDefaultCursor()); - model = UIConstants.MODEL_NORMAL; - repaint(); - } - - @Override - public void mouseClicked(MouseEvent e) { - if (e.getY() <= ARROW_RANGE_VERTICAL) { - if (containerWidth == clickToolPaneHeight) { - containerWidth = preferredWidth; - } else { - setPreferredWidth(containerWidth); - containerWidth = clickToolPaneHeight; - } - refreshContainer(); - if (BaseUtils.isAuthorityEditing()) { - DesignerContext.getDesignerFrame().doResize(); - } - } - } - }); - } - - @Override - public void paint(Graphics g) { - Image button; - if (direction == Constants.RIGHT) { - g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); - if (containerWidth == toolPaneHeight) { - if (model == UIConstants.MODEL_NORMAL) { - button = UIConstants.DRAG_RIGHT_NORMAL; - } else { - button = UIConstants.DRAG_RIGHT_PRESS; - } - } else { - if (model == UIConstants.MODEL_NORMAL) { - button = UIConstants.DRAG_LEFT_NORMAL; - } else { - button = UIConstants.DRAG_LEFT_PRESS; - } - } - g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); - if (isLeftRightDragEnabled) { - g.drawImage(UIConstants.DRAG_DOT_VERTICAL, 2, getHeight() / 2, 5, toolPaneHeight, null); - } - } else { - g.drawImage(UIConstants.DRAG_BAR, 0, 0, containerWidth, toolPaneHeightRight, null); -// g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); - if (containerWidth == clickToolPaneHeight) { - if (model == UIConstants.MODEL_NORMAL) { - button = UIConstants.DRAG_LEFT_NORMAL; - } else { - button = UIConstants.DRAG_LEFT_PRESS; - } - } else { - if (model == UIConstants.MODEL_NORMAL) { - button = UIConstants.DRAG_RIGHT_NORMAL; - } else { - button = UIConstants.DRAG_RIGHT_PRESS; - } - } -// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); - g.drawImage(button, 14, 7, 5, 5, null); - } - - } - } - /** * 主函数 * @param args 参数 */ - + public static void main(String... args) { + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + UIResizableContainer bb = new UIResizableContainer(Constants.RIGHT); + JPanel cc = new JPanel(); + cc.setBackground(Color.blue); + content.add(bb, BorderLayout.EAST); + content.add(cc, BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(500, 500); + jf.setVisible(true); + } } \ No newline at end of file From 9336b661737b03e3f7f358b7bd62fb286e6fa901 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 19 Jul 2017 11:17:05 +0800 Subject: [PATCH 066/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JSliderPane.java | 100 +++++++++++++++--- 1 file changed, 83 insertions(+), 17 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index b4c8792894..c2d1636434 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -1,30 +1,21 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; -import com.fr.base.ScreenResolution; -import com.fr.design.ExtraDesignClassManager; -import com.fr.design.file.HistoryTemplateListPane; -import com.fr.design.file.MutilTempalteTabPane; -import com.fr.design.fun.GridUIProcessor; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.islider.UISlider; import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.grid.DefaultGridUIProcessor; -import com.fr.grid.Grid; +import com.fr.general.Inter; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; -import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; +import java.awt.event.*; import java.math.BigDecimal; import java.util.Observable; @@ -45,7 +36,8 @@ public class JSliderPane extends JPanel { private UIButton upButton; //拖动条处理和button、直接输入不一样 private boolean isButtonOrIsTxt = true; - + private boolean isDialogOut = false; // 是否弹出 + private Dialog dialog; public JSliderPane() { @@ -58,6 +50,7 @@ public class JSliderPane extends JPanel { showVal.setText("100%"); showVal.setPreferredSize(new Dimension(40,18)); showVal.getDocument().addDocumentListener(showValDocumentListener); +// showVal.addMouseListener(showValMouseListener); downButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveDown.png")); upButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveUp.png")); @@ -72,7 +65,6 @@ public class JSliderPane extends JPanel { panel.add(slider); panel.add(upButton); panel.add(showVal); - // JPanel panel = new JPanel(null); // panel.add(downButton); // panel.add(slider); @@ -83,7 +75,7 @@ public class JSliderPane extends JPanel { // upButton.setBounds(176+KERNING*2,0,16,16); // showVal.setBounds(192+KERNING*3,0,40,16); this.add(panel,BorderLayout.NORTH); - this.setBounds(0,0,260,16); + this.setBounds(0,0,300,16); } public static final JSliderPane getInstance() { @@ -137,6 +129,33 @@ public class JSliderPane extends JPanel { } }; + MouseListener showValMouseListener = new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + popupDialog(); + } + + @Override + public void mousePressed(MouseEvent e) { + + } + + @Override + public void mouseReleased(MouseEvent e) { + + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } + }; + private void refreshSlider(){ showValue = Integer.parseInt(showVal.getText().substring(0, showVal.getText().indexOf("%"))); if (showValue >100){ @@ -213,6 +232,21 @@ public class JSliderPane extends JPanel { return this.showVal; } + private void popupDialog(){ + if (isDialogOut) { + dialog.setVisible(false); + isDialogOut = false; + return; + } + if (dialog == null) { + dialog = new Dialog(showVal); + isDialogOut = true; + } else { + dialog.setVisible(true); + isDialogOut = true; + } + } + public static void main(String[] args) { JFrame jf = new JFrame("test"); @@ -221,7 +255,7 @@ public class JSliderPane extends JPanel { content.setLayout(new BorderLayout()); content.add(JSliderPane.getInstance(),BorderLayout.CENTER); GUICoreUtils.centerWindow(jf); - jf.setSize(320, 80); + jf.setSize(400, 80); jf.setVisible(true); } @@ -287,5 +321,37 @@ class JSliderPaneUI extends BasicSliderUI { super.paintTrack(g); } } - +} +class Dialog extends JDialog { + private Container container; + private static final int RESIZE_RANGE = 4; + private Cursor originCursor; + private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR); + private Point mouseDownCompCoords; + private int minHeight; // 对话框最小高度 + private JComponent contentPane; + private UILabel upLabel; + + public Dialog(UITextField j) { + super(DesignerContext.getDesignerFrame()); + container = getContentPane(); + setUndecorated(true); + contentPane = new JPanel(new BorderLayout()); + upLabel = new UILabel(Inter.getLocText("Enlarge_Or_Reduce")); + upLabel.setOpaque(true); + upLabel.setPreferredSize(new Dimension(300,25)); + upLabel.setBackground(Color.LIGHT_GRAY); + contentPane.add(upLabel,BorderLayout.NORTH); +// contentPane.add(new JPanel()) + container.add(contentPane, BorderLayout.CENTER); + minHeight = container.getPreferredSize().height; + setSize(150, 250); +// validate(); + Point btnCoords = j.getLocationOnScreen(); + + this.setLocation(btnCoords.x -150+j.getWidth(), btnCoords.y -250); + +// initListener(); + this.setVisible(true); + } } From 1d06cbfe19240948ab754a31503460eba1e68aa9 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 19 Jul 2017 12:04:15 +0800 Subject: [PATCH 067/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>pmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 170 +++++++++--------- 1 file changed, 84 insertions(+), 86 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 9aaa4f6fb8..3c279f902b 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -8,14 +8,18 @@ import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; import com.fr.general.Inter; +import com.fr.stable.StringUtils; +import com.fr.third.fr.pdf.kernel.utils.CompareTool; import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.*; import java.util.*; +import java.util.List; public class EastRegionContainerPane extends UIEastResizableContainer { private static EastRegionContainerPane THIS; @@ -446,7 +450,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public JComponent generateContentPane() { JComponent contentPane = new JPanel(); - JButton testBtn = new JButton(name); + UIButton testBtn = new UIButton(name); testBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -616,11 +620,84 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private static final int MAX_X_SHIFT = 50; private static final int MAX_Y_SHIFT = 50; - private static final String NO_BUTTON = "NoButton"; private static final String UP_BUTTON = "UpButton"; private static final String DOWN_BUTTON = "DownButton"; + private MouseListener mouseListener = new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + setCursor(Cursor.getDefaultCursor()); + if (mouseDownCompCoords == null) { + setBackground(originColor); + } + model = UIConstants.MODEL_NORMAL; + repaint(); + } + @Override + public void mouseClicked(MouseEvent e) { + if (e.getX() >= ARROW_RANGE_START) { + onPop(); + } + } + @Override + public void mouseReleased(MouseEvent e) { + mouseDownCompCoords = null; + if (!getBounds().contains(e.getPoint())) { + setBackground(originColor); + } + } + @Override + public void mousePressed(MouseEvent e) { + if (e.getX() < ARROW_RANGE_START) { + mouseDownCompCoords = e.getPoint(); + } + } + }; + + private MouseMotionListener mouseMotionListener = new MouseMotionListener() { + @Override + public void mouseMoved(MouseEvent e) { + if (e.getX() >= ARROW_RANGE_START) { + setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + model = UIConstants.MODEL_PRESS; + } else if (isMovable) { + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + setBackground(Color.pink); + } else { + setCursor(Cursor.getDefaultCursor()); + model = UIConstants.MODEL_NORMAL; + } + repaint(); + } + @Override + public void mouseDragged(MouseEvent e) { + if (isMovable && mouseDownCompCoords != null) { + Point currCoords = e.getLocationOnScreen(); + int x = currCoords.x - mouseDownCompCoords.x; + int y = currCoords.y - mouseDownCompCoords.y; + //屏幕可用区域 + Rectangle screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); + + int minY = screen.y; + int maxX = Toolkit.getDefaultToolkit().getScreenSize().width - MAX_X_SHIFT; + int maxY = Toolkit.getDefaultToolkit().getScreenSize().height - MAX_Y_SHIFT; + if (x < MIN_X) { + x = MIN_X; + } else if (x > maxX) { + x = maxX; + } + if (y < minY) { + y = minY; + } else if (y > maxY) { + y = maxY; + } + // 移动到屏幕边缘时,需要校正位置 + parentDialog.setLocation(x, y); + } + } + }; + public PopupToolPane(PropertyItem propertyItem) { this(propertyItem, NO_BUTTON); } @@ -647,94 +724,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private void initToolButton(final String buttonType) { this.buttonType = buttonType; - if (buttonType.equals(NO_BUTTON)) { + if (StringUtils.isEmpty(buttonType) || buttonType.equals(NO_BUTTON)) { return; } - - if (buttonType.equals(DOWN_BUTTON)) { - - } else if (buttonType.equals(UP_BUTTON)) { - - } else { + // validate + if (!buttonType.equals(UP_BUTTON) || !buttonType.equals(DOWN_BUTTON)) { throw new IllegalArgumentException("unknown button type: " + buttonType); } - - addMouseMotionListener(new MouseMotionListener() { - @Override - public void mouseMoved(MouseEvent e) { - if (e.getX() >= ARROW_RANGE_START) { - setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - model = UIConstants.MODEL_PRESS; - } else if (isMovable) { - setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); - setBackground(Color.pink); - } else { - setCursor(Cursor.getDefaultCursor()); - model = UIConstants.MODEL_NORMAL; - } - repaint(); - } - - @Override - public void mouseDragged(MouseEvent e) { - if (isMovable && mouseDownCompCoords != null) { - Point currCoords = e.getLocationOnScreen(); - int x = currCoords.x - mouseDownCompCoords.x; - int y = currCoords.y - mouseDownCompCoords.y; - //屏幕可用区域 - Rectangle screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); - - int minY = screen.y; - int maxX = Toolkit.getDefaultToolkit().getScreenSize().width - MAX_X_SHIFT; - int maxY = Toolkit.getDefaultToolkit().getScreenSize().height - MAX_Y_SHIFT; - if (x < MIN_X) { - x = MIN_X; - } else if (x > maxX) { - x = maxX; - } - if (y < minY) { - y = minY; - } else if (y > maxY) { - y = maxY; - } - // 移动到屏幕边缘时,需要校正位置 - parentDialog.setLocation(x, y); - } - } - }); - addMouseListener(new MouseAdapter() { - @Override - public void mouseExited(MouseEvent e) { - setCursor(Cursor.getDefaultCursor()); - if (mouseDownCompCoords == null) { - setBackground(originColor); - } - model = UIConstants.MODEL_NORMAL; - repaint(); - } - - @Override - public void mouseClicked(MouseEvent e) { - if (e.getX() >= ARROW_RANGE_START) { - onPop(); - } - } - - @Override - public void mouseReleased(MouseEvent e) { - mouseDownCompCoords = null; - if (!getBounds().contains(e.getPoint())) { - setBackground(originColor); - } - } - @Override - public void mousePressed(MouseEvent e) { - if (e.getX() < ARROW_RANGE_START) { - mouseDownCompCoords = e.getPoint(); - } - } - - }); + addMouseMotionListener(mouseMotionListener); + addMouseListener(mouseListener); } // 触发弹入、弹出 From 5d4fc485b9efef841d8bb1856abdef65cfb0d88b Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 19 Jul 2017 14:32:57 +0800 Subject: [PATCH 068/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E4=B8=80=E5=A4=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/EastRegionContainerPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 3c279f902b..aac6850767 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -728,7 +728,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return; } // validate - if (!buttonType.equals(UP_BUTTON) || !buttonType.equals(DOWN_BUTTON)) { + if (!buttonType.equals(UP_BUTTON) && !buttonType.equals(DOWN_BUTTON)) { throw new IllegalArgumentException("unknown button type: " + buttonType); } addMouseMotionListener(mouseMotionListener); From 440edce28895408b58cbb52d0266976d36e5f696 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 19 Jul 2017 15:00:50 +0800 Subject: [PATCH 069/101] =?UTF-8?q?REPORT-1013=20=E7=94=A8log4j=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=97=A5=E5=BF=97.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../loghandler/DesignerLogAppendThread.java | 60 ------------------- .../loghandler/DesignerLogAppender.java | 42 +++++++++++++ .../loghandler/DesignerLogHandler.java | 37 ++++++++++-- .../com/fr/design/module/DesignModule.java | 5 -- designer_base/src/com/fr/env/RemoteEnv.java | 4 +- 5 files changed, 74 insertions(+), 74 deletions(-) delete mode 100644 designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java create mode 100644 designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java deleted file mode 100644 index 12d2816276..0000000000 --- a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppendThread.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.fr.design.mainframe.loghandler; - -import com.fr.general.LogRecordTime; -import com.fr.stable.StringUtils; -import org.apache.log4j.Appender; -import org.apache.log4j.Logger; -import org.apache.log4j.WriterAppender; - -import java.io.PipedReader; -import java.io.PipedWriter; -import java.io.Writer; -import java.util.Date; -import java.util.Scanner; -import java.util.logging.Level; -import java.util.logging.LogRecord; - -/** - * Created by Administrator on 2017/6/2/0002. - */ -public class DesignerLogAppendThread extends Thread{ - - PipedReader reader; - - public DesignerLogAppendThread() { - Logger root = Logger.getRootLogger(); - // 获取子记录器的输出源 - Appender appender = root.getAppender("design"); - // 定义一个未连接的输入流管道 - reader = new PipedReader(); - // 定义一个已连接的输出流管理,并连接到reader - Writer writer = null; - try { - writer = new PipedWriter(reader); - // 设置 appender 输出流 - ((WriterAppender) appender).setWriter(writer); - } catch (Throwable e) { - } - } - - public void run() { - // 不间断地扫描输入流 - Scanner scanner = new Scanner(reader); - - // 将扫描到的字符流打印在屏目 - while (scanner.hasNext()) { - try { - Thread.sleep(100); - String log = scanner.nextLine(); - if (StringUtils.isEmpty(log)) { - return; - } - - LogRecordTime logRecordTime = new LogRecordTime(new Date(),new LogRecord(Level.INFO, log)); - DesignerLogHandler.getInstance().printRemoteLog(logRecordTime); - } catch (Throwable e) { - - } - } - } -} diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java new file mode 100644 index 0000000000..ab63250cea --- /dev/null +++ b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java @@ -0,0 +1,42 @@ +package com.fr.design.mainframe.loghandler; + +import org.apache.log4j.AppenderSkeleton; +import org.apache.log4j.Level; +import org.apache.log4j.spi.LoggingEvent; + +import java.util.Date; + +/** + * Created by Administrator on 2017/7/18 0018. + */ +public class DesignerLogAppender extends AppenderSkeleton { + + public DesignerLogAppender() { + this.layout = new org.apache.log4j.PatternLayout("%d{HH\\:mm\\:ss} %t %p [%c] %m%n"); + } + + protected void append(LoggingEvent event) { + this.subAppend(event); + } + + public boolean requiresLayout() { + return true; + } + + public synchronized void close() { + if (this.closed) { + return; + } + this.closed = true; + + } + + public void subAppend(LoggingEvent event) { + synchronized (DesignerLogHandler.getInstance()) { + Level level = event.getLevel(); + String msg = this.layout.format(event); + DesignerLogHandler.getInstance().printRemoteLog(msg, level, new Date()); + } + } +} + diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java index ddf301fd28..a844fd3a2e 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java @@ -6,11 +6,10 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogLevel; -import com.fr.general.Inter; -import com.fr.general.LogRecordTime; +import com.fr.general.*; +import com.fr.stable.EnvChangedListener; import com.fr.stable.xml.LogRecordTimeProvider; +import org.apache.log4j.Level; import javax.swing.*; import javax.swing.text.*; @@ -31,6 +30,16 @@ public class DesignerLogHandler { private static final int ERRO_GAP_Y = -40; private static final int SERVER_GAP_Y = -20; + static { + GeneralContext.addEnvChangedListener(new EnvChangedListener() { + @Override + public void envChanged() { + // envchange后需要重新读取webinf里的log4j配置, 重新添加appender + FRLogger.getLogger().addLogAppender(new DesignerLogAppender()); + } + }); + } + public static DesignerLogHandler getInstance() { return HOLDER.singleton; } @@ -116,8 +125,8 @@ public class DesignerLogHandler { return caption; } - public void printRemoteLog(LogRecordTime logRecordTime) { - logHandlerArea.printStackTrace(logRecordTime); + public void printRemoteLog(String message, Level level, Date date) { + logHandlerArea.printStackTrace(message, level, date); } private class LogHandlerArea extends JPanel { @@ -201,6 +210,22 @@ public class DesignerLogHandler { } + public void printStackTrace(String message, Level level, Date date) { + int logLevelvalue = level.toInt(); + if (logLevelvalue == INFO_INT && showInfo.isSelected()) { + printMessage(message, logLevelvalue, date); + } else if (logLevelvalue == ERRO_INT && showError.isSelected()) { + printMessage(message, logLevelvalue, date); + } else if (logLevelvalue == SERVER_INT && showServer.isSelected()) { + printMessage(message, logLevelvalue, date); + } + + } + + private void printMessage(String message, int logLevelvalue, Date date) { + printMessage(message, logLevelvalue, date, null); + } + private void printMessage(String messange, int logLevelvalue, Date date, Throwable e) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); this.log(simpleDateFormat.format(date) + "\n", 0); diff --git a/designer_base/src/com/fr/design/module/DesignModule.java b/designer_base/src/com/fr/design/module/DesignModule.java index 1929452b99..6fb9b2ac56 100644 --- a/designer_base/src/com/fr/design/module/DesignModule.java +++ b/designer_base/src/com/fr/design/module/DesignModule.java @@ -12,7 +12,6 @@ import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.mainframe.App; import com.fr.design.mainframe.DesignerFrame; -import com.fr.design.mainframe.loghandler.DesignerLogAppendThread; import com.fr.general.Inter; import com.fr.general.ModuleContext; import com.fr.js.*; @@ -45,10 +44,6 @@ public abstract class DesignModule extends TopModule { ActionFactory.registerCellInsertActionClass(actionsForInsertCellElement()); ActionFactory.registerFloatInsertActionClass(actionsForInsertFloatElement()); DesignModuleFactory.registerCreators4Hyperlink(hyperlinkTypes()); - - // 将log4j日志输出到设计器日志面板的线程. - DesignerLogAppendThread logTread = new DesignerLogAppendThread(); - logTread.start(); } public boolean isStarted() { diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 4ef8d61e16..8fd63a18ec 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -17,7 +17,6 @@ import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrameFileDealerPane; -import com.fr.design.mainframe.loghandler.DesignerLogHandler; import com.fr.file.CacheManager; import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManagerProvider; @@ -1788,8 +1787,7 @@ public class RemoteEnv extends AbstractEnv { } LogRecordTime[] records = DavXMLUtils.readXMLLogRecords(input); for (LogRecordTime logRecordTime : records) { - DesignerLogHandler.getInstance().printRemoteLog(logRecordTime); - + //TODO } } From 6ad2ff3ac2ae701a95cb79ffbca0a3e77fe5a955 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 19 Jul 2017 15:48:20 +0800 Subject: [PATCH 070/101] =?UTF-8?q?=E8=BD=AC=E4=B9=89=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/loghandler/DesignerLogAppender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java index ab63250cea..0531748af2 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogAppender.java @@ -12,7 +12,7 @@ import java.util.Date; public class DesignerLogAppender extends AppenderSkeleton { public DesignerLogAppender() { - this.layout = new org.apache.log4j.PatternLayout("%d{HH\\:mm\\:ss} %t %p [%c] %m%n"); + this.layout = new org.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"); } protected void append(LoggingEvent event) { From db1f871b91aa8ead9fd045cd603ebfe0929468b3 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 19 Jul 2017 16:22:41 +0800 Subject: [PATCH 071/101] =?UTF-8?q?REPORT-2354=20=E4=BF=AE=E6=94=B9qq?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/LoginWebBridge.java | 1 + .../com/fr/design/extra/PluginWebBridge.java | 7 ++++ .../com/fr/design/extra/WebViewDlgHelper.java | 36 ++++++++++++------- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index 079a393e5d..549cb17632 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -327,6 +327,7 @@ public class LoginWebBridge { DesignerEnvManager.getEnvManager().setBBSName(username); DesignerEnvManager.getEnvManager().setBbsUid(uid); DesignerEnvManager.getEnvManager().setInShowBBsName(username); + BBSPluginLogin.getInstance().login(new BBSUserInfo(username, "")); } else if (status.equals(LOGIN_FAILED)) { //账号没有QQ授权 closeQQWindow(); diff --git a/designer_base/src/com/fr/design/extra/PluginWebBridge.java b/designer_base/src/com/fr/design/extra/PluginWebBridge.java index a2a30c7483..7f64bcec46 100644 --- a/designer_base/src/com/fr/design/extra/PluginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/PluginWebBridge.java @@ -509,6 +509,13 @@ public class PluginWebBridge { LoginWebBridge.getHelper().showQQ(); } + //通过QQ登录后通知登录 + public void ucsynLogin(long uid, String username){ + BBSUserInfo bbsUserInfo = new BBSUserInfo(username, ""); + BBSPluginLogin.getInstance().login(bbsUserInfo); + uiLabel.setText(username); + } + /** * 清除用户信息 */ diff --git a/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java b/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java index 3af2b5d439..84ecb10c38 100644 --- a/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java @@ -80,21 +80,29 @@ public class WebViewDlgHelper { public static void checkAndCopyMainFile(String indexPath, String mainJsPath){ File file = new File(indexPath); if (!file.exists()) { - try { - File mainJsFile = new File(mainJsPath); - int byteread = 0; - if (mainJsFile.exists()) { - InputStream inStream = new FileInputStream(mainJsPath); - FileOutputStream fs = new FileOutputStream(indexPath); - byte[] buffer = new byte[BYTES_NUM]; - while ((byteread = inStream.read(buffer)) != -1) { - fs.write(buffer, 0, byteread); - } - inStream.close(); + copyMainFile(indexPath, mainJsPath); + } + } + + /** + * 將script文件夹中的index.html文件复制到webreport下 + * + */ + public static void copyMainFile(String indexPath, String mainJsPath){ + try { + File mainJsFile = new File(mainJsPath); + int byteread = 0; + if (mainJsFile.exists()) { + InputStream inStream = new FileInputStream(mainJsPath); + FileOutputStream fs = new FileOutputStream(indexPath); + byte[] buffer = new byte[BYTES_NUM]; + while ((byteread = inStream.read(buffer)) != -1) { + fs.write(buffer, 0, byteread); } - } catch (Exception e) { - FRContext.getLogger().error(e.getMessage()); + inStream.close(); } + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage()); } } @@ -186,7 +194,9 @@ public class WebViewDlgHelper { try { if (get()) { + String relativePath = "/scripts/store/web/index.html"; IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome); + copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath)); // TODO: 2017/4/17 删除之前存放在安装目录下的script int rv = JOptionPane.showOptionDialog( null, From 7d9ff599d603af8aa4a33ccf212219256a1e4650 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 19 Jul 2017 18:41:26 +0800 Subject: [PATCH 072/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20PMD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/expand/ExpandFatherPane.java | 6 +- .../mainframe/ReportComponentComposite.java | 34 +- .../cell/settingpane/CellExpandAttrPane.java | 44 +- .../cell/settingpane/CellOtherSetPane.java | 2 +- .../cell/settingpane/CellPresentPane.java | 2 +- .../cell/settingpane/CellStylePane.java | 18 +- designer/src/com/fr/grid/GridRow.java | 3 +- .../com/fr/design/gui/style/BorderPane.java | 44 +- .../com/fr/design/gui/style/FRFontPane.java | 64 +- .../com/fr/design/gui/style/FormatPane.java | 15 - .../com/fr/design/locale/designer.properties | 22 + .../design/locale/designer_en_US.properties | 22 + .../design/locale/designer_ja_JP.properties | 24 +- .../design/locale/designer_ko_KR.properties | 23 +- .../design/locale/designer_zh_CN.properties | 22 + .../design/locale/designer_zh_TW.properties | 21 + .../com/fr/design/mainframe/JSliderPane.java | 280 ++-- .../src/com/fr/design/mainframe/FormArea.java | 1122 +++++++++-------- 18 files changed, 989 insertions(+), 779 deletions(-) diff --git a/designer/src/com/fr/design/expand/ExpandFatherPane.java b/designer/src/com/fr/design/expand/ExpandFatherPane.java index 88aeb44c31..ea863dd811 100644 --- a/designer/src/com/fr/design/expand/ExpandFatherPane.java +++ b/designer/src/com/fr/design/expand/ExpandFatherPane.java @@ -40,9 +40,9 @@ public abstract class ExpandFatherPane extends JPanel implements GlobalNameObser public ExpandFatherPane() { this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL)); comboBox = new UIComboBox(new String[]{ - Inter.getLocText("None"), - Inter.getLocText("Default"), - Inter.getLocText("Custom")}); + Inter.getLocText("FR-Designer_None"), + Inter.getLocText("FR-Designer_DEFAULT"), + Inter.getLocText("FR-Designer_Custom")}); final CardLayout cardLayout = new CardLayout(); customPane = new JPanel(cardLayout); customParentColumnRowPane = new ColumnRowPane() { diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 0b47214a90..b3ab87a282 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -6,10 +6,14 @@ import java.util.ArrayList; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JSplitPane; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import com.fr.base.FRContext; +import com.fr.base.ScreenResolution; import com.fr.design.designer.EditingState; import com.fr.design.event.TargetModifiedListener; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.icontainer.UIModeControlContainer; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; @@ -24,6 +28,9 @@ import com.fr.report.report.TemplateReport; * @since 2012-3-27下午12:12:05 */ public class ReportComponentComposite extends JComponent { + + private static final int MAX = 400; + private static final int MIN = 10; private JWorkBook parent; private UIModeControlContainer parentContainer = null; @@ -36,7 +43,7 @@ public class ReportComponentComposite extends JComponent { private JPanel hbarContainer; - private JPanel jSliderContainer; + private JSliderPane jSliderContainer; /** @@ -52,8 +59,28 @@ public class ReportComponentComposite extends JComponent { CellElementRegion = FRGUIPaneFactory.createBorderLayout_S_Pane(); this.add(CellElementRegion, BorderLayout.NORTH); this.add(createSouthControlPane(), BorderLayout.SOUTH); + jSliderContainer.getShowVal().getDocument().addDocumentListener(jSliderContainerListener); } + DocumentListener jSliderContainerListener = new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + double value = Integer.parseInt(jSliderContainer.getShowVal().getText().substring(0, jSliderContainer.getShowVal().getText().indexOf("%"))); + value = value>MAX ? MAX : value; + value = value= 0) { templateStateList.set(oldIndex, centerCardPane.editingComponet.createEditingState()); @@ -63,7 +90,7 @@ public class ReportComponentComposite extends JComponent { protected void doAfterChange(int newIndex) { WorkBook workbook = getEditingWorkBook(); if (workbook == null) { - FRContext.getLogger().error(Inter.getLocText("Read_failure") + "!"); + FRContext.getLogger().error(Inter.getLocText("FR-Designer_Read_failure") + "!"); //AUGUST:加个报错,不然测试总是SB的认为打不开一个坏的excel文件就是BUG,也不知道去检查下源文件。 return; } @@ -160,7 +187,8 @@ public class ReportComponentComposite extends JComponent { hbarContainer.add(centerCardPane.editingComponet.getHorizontalScrollBar()); // JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, hbarContainer); JPanel southPane = new JPanel(new BorderLayout()); - JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, JSliderPane.getInstance()); + jSliderContainer = JSliderPane.getInstance(); + JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, jSliderContainer); splitpane.setBorder(null); splitpane.setDividerSize(3); splitpane.setResizeWeight(1); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java index d6a5a9befb..128c014182 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java @@ -62,22 +62,22 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { public static void main(String[] args){ - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(new CellExpandAttrPane().layoutPane(), BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(290, 400); - jf.setVisible(true); +// JFrame jf = new JFrame("test"); +// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// JPanel content = (JPanel) jf.getContentPane(); +// content.setLayout(new BorderLayout()); +// content.add(new CellExpandAttrPane().layoutPane(), BorderLayout.CENTER); +// GUICoreUtils.centerWindow(jf); +// jf.setSize(290, 400); +// jf.setVisible(true); } private void initAllNames() { - expandDirectionButton.setGlobalName(Inter.getLocText("ExpandD-Expand_Direction")); - leftFatherPane.setGlobalName(Inter.getLocText("LeftParent")); - rightFatherPane.setGlobalName(Inter.getLocText("ExpandD-Up_Father_Cell")); - horizontalExpandableCheckBox.setGlobalName(Inter.getLocText("ExpandD-Expandable")); - verticalExpandableCheckBox.setGlobalName(Inter.getLocText("ExpandD-Expandable")); + expandDirectionButton.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expand_Direction")); + leftFatherPane.setGlobalName(Inter.getLocText("FR-Designer_LeftParent")); + rightFatherPane.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell")); + horizontalExpandableCheckBox.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expandable")); + verticalExpandableCheckBox.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expandable")); } private JPanel layoutPane() { @@ -111,9 +111,9 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ new Component[]{null,null}, - new Component[]{new UILabel(" "+Inter.getLocText("ExpandD-Expand_Direction")+" ", SwingConstants.LEFT), expandDirectionButton}, - new Component[]{new UILabel(" "+Inter.getLocText("LeftParent"), SwingConstants.LEFT), leftFatherPane}, - new Component[]{new UILabel(" "+Inter.getLocText("ExpandD-Up_Father_Cell"), SwingConstants.LEFT), rightFatherPane}, + new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_ExpandD_Expand_Direction")+" ", SwingConstants.LEFT), expandDirectionButton}, + new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_LeftParent"), SwingConstants.LEFT), leftFatherPane}, + new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell"), SwingConstants.LEFT), rightFatherPane}, }; double[] rowSize = {p, p, p, p, p, p}; double[] columnSize = {p, f}; @@ -128,7 +128,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { new Component[]{null,null}, new Component[]{horizontalExpandableCheckBox, null}, new Component[]{verticalExpandableCheckBox, null}, - new Component[]{new UILabel(" "+Inter.getLocText("ExpandD-Sort_After_Expand") + Inter.getLocText("FR-Action_Sort"), SwingConstants.RIGHT), sortAfterExpand}, + new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_ExpendSort"), SwingConstants.RIGHT), sortAfterExpand}, }; double[] rowSize = {p, p, p, p, p, p, p, p}; double[] columnSize = {p, f}; @@ -176,7 +176,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { @Override public String getIconPath() { // return "com/fr/design/images/expand/cellAttr.gif"; - return Inter.getLocText("Expand"); + return Inter.getLocText("FR-Designer_Expand"); } @@ -187,19 +187,19 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { cellExpandAttr = new CellExpandAttr(); cellElement.setCellExpandAttr(cellExpandAttr); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("ExpandD-Expand_Direction"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expand_Direction"))) { cellExpandAttr.setDirection(expandDirectionButton.getSelectedItem()); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("LeftParent"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_LeftParent"))) { this.leftFatherPane.update(cellExpandAttr); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("ExpandD-Up_Father_Cell"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell"))) { this.rightFatherPane.update(cellExpandAttr); } // extendable - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("ExpandD-Expandable"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) { if (horizontalExpandableCheckBox.isSelected()) { if (verticalExpandableCheckBox.isSelected()) { cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index c5d7af1b1c..ee4ecfa4dc 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -215,7 +215,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { @Override public String getIconPath() { // return "com/fr/design/images/m_format/cellstyle/otherset.png"; - return Inter.getLocText("Other"); + return Inter.getLocText("FR-Designer_Other"); } @Override diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java index d0f13c5d28..8d29ff1335 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java @@ -40,7 +40,7 @@ public class CellPresentPane extends AbstractCellAttrPane { @Override public String getIconPath() { // return "com/fr/design/images/data/source/dataDictionary.png"; - return Inter.getLocText("Present"); + return Inter.getLocText("FR-Designer_Present"); } @Override diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index 2d508c4f3c..ce03519315 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java @@ -42,14 +42,14 @@ public class CellStylePane extends AbstractCellAttrPane { } public static void main(String[] args){ - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(new CellStylePane().createContentPane(), BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(290, 400); - jf.setVisible(true); +// JFrame jf = new JFrame("test"); +// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// JPanel content = (JPanel) jf.getContentPane(); +// content.setLayout(new BorderLayout()); +// content.add(new CellStylePane().createContentPane(), BorderLayout.CENTER); +// GUICoreUtils.centerWindow(jf); +// jf.setSize(290, 400); +// jf.setVisible(true); } @Override @@ -120,7 +120,7 @@ public class CellStylePane extends AbstractCellAttrPane { @Override public String title4PopupWindow() { - return Inter.getLocText("Style"); + return Inter.getLocText(Inter.getLocText("FR-Designer_Style")); } public void setSelectedByIds(int level, String... id) { diff --git a/designer/src/com/fr/grid/GridRow.java b/designer/src/com/fr/grid/GridRow.java index c111c71884..4c42ce6306 100644 --- a/designer/src/com/fr/grid/GridRow.java +++ b/designer/src/com/fr/grid/GridRow.java @@ -21,6 +21,7 @@ import javax.swing.plaf.ComponentUI; */ public class GridRow extends GridHeader { + private static final int MAX = 5; private int resolution = ScreenResolution.getScreenResolution(); @Override @@ -65,7 +66,7 @@ public class GridRow extends GridHeader { * Calculates max char number. */ private int caculateMaxCharNumber(ElementCasePane reportPane) { - int maxCharNumber = 5; + int maxCharNumber = MAX; maxCharNumber = Math.max(maxCharNumber, ("" + (reportPane.getGrid().getVerticalValue() + reportPane.getGrid().getVerticalExtent())).length() + 1); return maxCharNumber; diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index d214198a8f..585bfe98bd 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -87,10 +87,10 @@ public class BorderPane extends AbstractBasicStylePane { new Component[]{null,null}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Color") + " ", SwingConstants.LEFT), currentLineColorPane}, new Component[]{null,null}, - new Component[]{new UILabel("外边框 ", SwingConstants.LEFT),outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"))}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_outBorder") +" ", SwingConstants.LEFT),outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"))}, new Component[]{null,externalPane}, new Component[]{null,null}, - new Component[]{new UILabel("内边框 ", SwingConstants.LEFT),innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_inBorder") +" ", SwingConstants.LEFT),innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))}, new Component[]{null,insidePane}, new Component[]{null,null} }; @@ -105,26 +105,30 @@ public class BorderPane extends AbstractBasicStylePane { backgroundPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Background"),280,20,backgroundPane); this.add(backgroundPanel,BorderLayout.CENTER); - outerToggleButton.addChangeListener(new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e) { - boolean value = outerToggleButton.isSelected(); - topToggleButton.setSelected(value); - bottomToggleButton.setSelected(value); - leftToggleButton.setSelected(value); - rightToggleButton.setSelected(value); - } - }); - innerToggleButton.addChangeListener(new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e) { - boolean value = innerToggleButton.isSelected(); - horizontalToggleButton.setSelected(value); - verticalToggleButton.setSelected(value); - } - }); + outerToggleButton.addChangeListener(outerToggleButtonChangeListener); + innerToggleButton.addChangeListener(innerToggleButtonChangeListener); } + ChangeListener outerToggleButtonChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + boolean value = outerToggleButton.isSelected(); + topToggleButton.setSelected(value); + bottomToggleButton.setSelected(value); + leftToggleButton.setSelected(value); + rightToggleButton.setSelected(value); + } + }; + + ChangeListener innerToggleButtonChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + boolean value = innerToggleButton.isSelected(); + horizontalToggleButton.setSelected(value); + verticalToggleButton.setSelected(value); + } + }; + private void initButtonsWithIcon(){ topToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png")); leftToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png")); diff --git a/designer_base/src/com/fr/design/gui/style/FRFontPane.java b/designer_base/src/com/fr/design/gui/style/FRFontPane.java index bfe86801f6..e7267d683e 100644 --- a/designer_base/src/com/fr/design/gui/style/FRFontPane.java +++ b/designer_base/src/com/fr/design/gui/style/FRFontPane.java @@ -42,7 +42,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse public static Integer[] FONT_SIZES = {new Integer(6), new Integer(8), new Integer(9), new Integer(10), new Integer(11), new Integer(12), new Integer(14), new Integer(16), new Integer(18), new Integer(20), new Integer(22), new Integer(24), new Integer(26), new Integer(28), new Integer(36), new Integer(48), new Integer(72)}; private static final Dimension BUTTON_SIZE = new Dimension(20, 18); - private final String[] fontSizeStyles = {Inter.getLocText("FRFont-plain"), Inter.getLocText("FRFont-bold"), Inter.getLocText("FRFont-italic"), Inter.getLocText("FRFont-bolditalic")}; + private final String[] fontSizeStyles = {Inter.getLocText("FR-Designer_FRFont_plain"), Inter.getLocText("FR-Designer_FRFont_bold"), Inter.getLocText("FR-Designer_FRFont_italic"), Inter.getLocText("FR-Designer_FRFont_bolditalic")}; private JPanel buttonPane; private JPanel isSuperOrSubPane; private UIComboBox fontNameComboBox; @@ -82,7 +82,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse @Override protected String title4PopupWindow() { - return Inter.getLocText("Sytle-FRFont"); + return Inter.getLocText("FR-Designer_Sytle-FRFont"); } /** @@ -130,34 +130,34 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse */ public FRFont update(FRFont frFont) { - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Family"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Name"))) { frFont = frFont.applyName((String) fontNameComboBox.getSelectedItem()); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Style"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Style"))) { frFont = frFont.applyStyle(fontSizeStyleComboBox.getSelectedIndex()); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Size"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer-FRFont_Size"))) { frFont = frFont.applySize(Float.parseFloat(fontSizeComboBox.getSelectedItem().toString())); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Foreground"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Foreground"))) { frFont = frFont.applyForeground(this.colorSelectPane.getColor()); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Underline"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Underline"))) { int line = underline.isSelected() ? this.underlineCombo.getSelectedLineStyle() : Constants.LINE_NONE; frFont = frFont.applyUnderline(line); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Line-Style"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer-FRFont_Line_Style"))) { frFont = frFont.applyUnderline(this.underlineCombo.getSelectedLineStyle()); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Strikethrough"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Strikethrough"))) { frFont = frFont.applyStrikethrough(isStrikethroughCheckBox.isSelected()); } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Shadow"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Shadow"))) { frFont = frFont.applyShadow(isShadowCheckBox.isSelected()); } @@ -175,7 +175,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private FRFont updateSubSuperscript(FRFont frFont) { boolean isSuper = frFont.isSuperscript(); boolean isSub = frFont.isSubscript(); - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Superscript"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Superscript"))) { //如果上标没有选中,点击则选中上标,并且下标一定是不选中状态 //如果上标选中,点击则取消选中上标,字体回复正常 if (superPane.isSelected() && !isSuper) { @@ -185,7 +185,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse frFont = frFont.applySuperscript(false); } } - if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FRFont-Subscript"))) { + if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_FRFont_Subscript"))) { if (subPane.isSelected() && !isSub) { frFont = frFont.applySubscript(true); frFont = frFont.applySuperscript(false); @@ -260,29 +260,29 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse } private void initAllNames() { - fontSizeStyleComboBox.setGlobalName(Inter.getLocText("FRFont-Style")); - fontNameComboBox.setGlobalName(Inter.getLocText("FRFont-Family")); - fontSizeComboBox.setGlobalName(Inter.getLocText("FRFont-Size")); - colorSelectPane.setGlobalName(Inter.getLocText("FRFont-Foreground")); - italic.setGlobalName(Inter.getLocText("FRFont-italic")); - bold.setGlobalName(Inter.getLocText("FRFont-bold")); - underline.setGlobalName(Inter.getLocText("FRFont-Underline")); - underlineCombo.setGlobalName(Inter.getLocText("Line-Style")); - isStrikethroughCheckBox.setGlobalName(Inter.getLocText("FRFont-Strikethrough")); - isShadowCheckBox.setGlobalName(Inter.getLocText("FRFont-Shadow")); - superPane.setGlobalName(Inter.getLocText("FRFont-Superscript")); - subPane.setGlobalName(Inter.getLocText("FRFont-Subscript")); + fontSizeStyleComboBox.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Style")); + fontNameComboBox.setGlobalName(Inter.getLocText("FR-Designer_Name")); + fontSizeComboBox.setGlobalName(Inter.getLocText("FR-Designer-FRFont_Size")); + colorSelectPane.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Foreground")); + italic.setGlobalName(Inter.getLocText("FR-Designer_FRFont_italic")); + bold.setGlobalName(Inter.getLocText("FR-Designer_FRFont_bold")); + underline.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Underline")); + underlineCombo.setGlobalName(Inter.getLocText("FR-Designer-FRFont_Line_Style")); + isStrikethroughCheckBox.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Strikethrough")); + isShadowCheckBox.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Shadow")); + superPane.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Superscript")); + subPane.setGlobalName(Inter.getLocText("FR-Designer_FRFont_Subscript")); } private void setToolTips() { - colorSelectPane.setToolTipText(Inter.getLocText("FRFont-Foreground")); - italic.setToolTipText(Inter.getLocText("FRFont-italic")); - bold.setToolTipText(Inter.getLocText("FRFont-bold")); - underline.setToolTipText(Inter.getLocText("FRFont-Underline")); - isStrikethroughCheckBox.setToolTipText(Inter.getLocText("FRFont-Strikethrough")); - isShadowCheckBox.setToolTipText(Inter.getLocText("FRFont-Shadow")); - superPane.setToolTipText(Inter.getLocText("FRFont-Superscript")); - subPane.setToolTipText(Inter.getLocText("FRFont-Subscript")); + colorSelectPane.setToolTipText(Inter.getLocText("FR-Designer_FRFont_Foreground")); + italic.setToolTipText(Inter.getLocText("FR-Designer_FRFont_italic")); + bold.setToolTipText(Inter.getLocText("FR-Designer_FRFont_bold")); + underline.setToolTipText(Inter.getLocText("FR-Designer_FRFont_Underline")); + isStrikethroughCheckBox.setToolTipText(Inter.getLocText("FR-Designer_FRFont_Strikethrough")); + isShadowCheckBox.setToolTipText(Inter.getLocText("FR-Designer_FRFont_Shadow")); + superPane.setToolTipText(Inter.getLocText("FR-Designer_FRFont_Superscript")); + subPane.setToolTipText(Inter.getLocText("FR-Designer_FRFont_Subscript")); } diff --git a/designer_base/src/com/fr/design/gui/style/FormatPane.java b/designer_base/src/com/fr/design/gui/style/FormatPane.java index 7dc5f108fe..4d81d0101e 100644 --- a/designer_base/src/com/fr/design/gui/style/FormatPane.java +++ b/designer_base/src/com/fr/design/gui/style/FormatPane.java @@ -81,9 +81,7 @@ public class FormatPane extends AbstractBasicStylePane{ protected void initComponents(Integer[] types) { this.setLayout(new BorderLayout(0, 4)); - iniSampleLable(); - contentPane = new JPanel(new BorderLayout(0, 4)) { @Override public Dimension getPreferredSize() { @@ -91,33 +89,24 @@ public class FormatPane extends AbstractBasicStylePane{ } }; typeComboBox = new UIComboBox(types); - UIComboBoxRenderer render = createComBoxRender(); typeComboBox.setRenderer(render); typeComboBox.addItemListener(itemListener); contentPane.add(sampleLabel, BorderLayout.NORTH); -// this.add(typeComboBox, BorderLayout.NORTH); centerPane = new JPanel(new CardLayout()); centerPane.add(new JPanel(), "hide"); centerPane.setPreferredSize(new Dimension(0, 0) ); centerPane.add(contentPane, "show"); - formatFontPane = new JPanel(new BorderLayout()); formatFontPane.add(centerPane, BorderLayout.NORTH); formatFontPane.add(new FRFontPane(), BorderLayout.CENTER); - -// this.add(formatFontPane, BorderLayout.CENTER); - // content pane. txtCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); contentPane.add(txtCenterPane, BorderLayout.CENTER); - textField = new UIComboBox(FormatField.getInstance().getFormatArray(getFormatContents())); textField.addItemListener(textFieldItemListener); textField.setEditable(true); txtCenterPane.add(textField, BorderLayout.NORTH); - frFontPane = new FRFontPane(); - double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ @@ -132,7 +121,6 @@ public class FormatPane extends AbstractBasicStylePane{ int[][] rowCount = {{1, 1},{1, 1}, {1, 1}, {1, 3}, {1, 1}}; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); this.add(panel,BorderLayout.CENTER); - } protected UIComboBoxRenderer createComBoxRender(){ @@ -323,12 +311,9 @@ public class FormatPane extends AbstractBasicStylePane{ cardLayout.show(centerPane, "hide"); } else { textField.removeAllItems(); - long begin = System.currentTimeMillis(); for (int i = 0; i < items.length; i++) { textField.addItem(items[i]); } - long end = System.currentTimeMillis(); - System.out.println(end-begin+"ms"); centerPane.setPreferredSize(new Dimension(270, 70) ); cardLayout.show(centerPane, "show"); } diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 0e51b4c21f..8cbd876a22 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2011,3 +2011,25 @@ FR-Designer_Float_Element=Float Element FR-Designer_Widget_Library=Widget Library FR-Designer_No_Settings_Available=No Settings Available! FR-Designer_Configured_Roles=Configured role +FR-Designer_Scale_EnlargeOrReduce=Scale +FR-Designer_Scale_selfAdaptButton=Fit the selected area exactly +FR-Designer_Scale_customButton=custom +FR-Designer_FRFont_Subscript=Subscript +FR-Designer_FRFont_Superscript=Superscript +FR-Designer_FRFont_Shadow=Shadow +FR-Designer_FRFont_Strikethrough=Strikethrough +FR-Designer_FRFont_Underline=Underline +FR-Designer_FRFont_bold=bold +FR-Designer_FRFont_italic=italic +FR-Designer_FRFont_Foreground=Foreground +FR-Designer_FRFont_Style=Style +FR-Designer_FRFont_plain=plain +FR-Designer_FRFont_bolditalic=bolditalic +FR-Designer_outBorder=outBorder +FR-Designer_inBorder=inBorder +FR-Designer_ExpandD_Up_Father_Cell=Up_Father_Cell +FR-Designer_ExpandD_Expand_Direction=Expand_Direction +FR-Designer_Expand=Expand +FR-Designer_ExpendSort=ExpendSort +FR-Designer_ExpandD_Expandable=Expandable +FR-Designer_Read_failure=Read_failure 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 296dcbe7af..9d5a8a9fe9 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 @@ -2011,3 +2011,25 @@ FR-Designer_Float_Element=Float Element FR-Designer_Widget_Library=Widget Library FR-Designer_No_Settings_Available=No Settings Available! FR-Designer_Configured_Roles=Configured role +FR-Designer_Scale_EnlargeOrReduce=Scale +FR-Designer_Scale_selfAdaptButton=Fit the selected area exactly +FR-Designer_Scale_customButton=custom +FR-Designer_FRFont_Subscript=Subscript +FR-Designer_FRFont_Superscript=\ +FR-Designer_FRFont_Shadow=Shadow +FR-Designer_FRFont_Strikethrough=Strikethrough +FR-Designer_FRFont_Underline=Underline +FR-Designer_FRFont_bold=bold +FR-Designer_FRFont_italic=italic +FR-Designer_FRFont_Foreground=Foreground +FR-Designer_FRFont_Style=Style +FR-Designer_FRFont_plain=plain +FR-Designer_FRFont_bolditalic=bolditalic +FR-Designer_outBorder=outBorder +FR-Designer_inBorder=inBorder +FR-Designer_ExpandD_Up_Father_Cell=Up_Father_Cell +FR-Designer_ExpandD_Expand_Direction=Expand_Direction +FR-Designer_Expand=Expand +FR-Designer_ExpendSort=ExpendSort +FR-Designer_ExpandD_Expandable=Expandable +FR-Designer_Read_failure=Read_failure 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 03514583a3..4caf82100f 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 @@ -1987,4 +1987,26 @@ FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027 FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20 FR-Designer_Widget_Library= FR-Designer_No_Settings_Available= -FR-Designer_Configured_Roles=\u69CB\u6210\u3055\u308C\u305F\u5F79\u5272 \ No newline at end of file +FR-Designer_Configured_Roles=\u69CB\u6210\u3055\u308C\u305F\u5F79\u5272 +FR-Designer_Scale_EnlargeOrReduce= +FR-Designer_Scale_selfAdaptButton=\ +FR-Designer_Scale_customButton=\ +FR-Designer_FRFont_Subscript=\ +FR-Designer_FRFont_Superscript=\ +FR-Designer_FRFont_Shadow=\ +FR-Designer_FRFont_Strikethrough=\ +FR-Designer_FRFont_Underline=\ +FR-Designer_FRFont_bold=\ +FR-Designer_FRFont_italic=\ +FR-Designer_FRFont_Foreground=\ +FR-Designer_FRFont_Style=\ +FR-Designer_FRFont_plain=\ +FR-Designer_FRFont_bolditalic=\ +FR-Designer_outBorder=\ +FR-Designer_inBorder=\ +FR-Designer_ExpandD_Up_Father_Cell=\ +FR-Designer_ExpandD_Expand_Direction=\ +FR-Designer_Expand=\ +FR-Designer_ExpendSort=\ +FR-Designer_ExpandD_Expandable=\ +FR-Designer_Read_failure=\ \ No newline at end of file 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 cafc02022c..6cd6849c70 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 @@ -1987,4 +1987,25 @@ FR-Designer_Cell_Attributes=\uC140\uC18D\uC131 FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C FR-Designer_Widget_Library= FR-Designer_No_Settings_Available= -FR-Designer_Configured_Roles=\uC5ED\uD560\uC774\uAD6C\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \ No newline at end of file +FR-Designer_Configured_Roles=\uC5ED\uD560\uC774\uAD6C\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +FR-Designer_Scale_EnlargeOrReduce= +FR-Designer_Scale_selfAdaptButton=\ +FR-Designer_FRFont_Subscript=\ +FR-Designer_FRFont_Superscript=\ +FR-Designer_FRFont_Shadow=\ +FR-Designer_FRFont_Strikethrough=\ +FR-Designer_FRFont_Underline=\ +FR-Designer_FRFont_bold=\ +FR-Designer_FRFont_italic=\ +FR-Designer_FRFont_Foreground=\ +FR-Designer_FRFont_Style=\ +FR-Designer_FRFont_plain=\ +FR-Designer_FRFont_bolditalic=\ +FR-Designer_outBorder=\ +FR-Designer_inBorder=\ +FR-Designer_ExpandD_Up_Father_Cell=\ +FR-Designer_ExpandD_Expand_Direction=\ +FR-Designer_Expand=\ +FR-Designer_ExpendSort=\ +FR-Designer_ExpandD_Expandable=\ +FR-Designer_Read_failure=\ \ No newline at end of file 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 1675df05e3..61912d31c9 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 @@ -2009,3 +2009,25 @@ FR-Designer_Float_Element=\u60AC\u6D6E\u5143\u7D20 FR-Designer_Widget_Library=\u7EC4\u4EF6\u5E93 FR-Designer_No_Settings_Available=\u65E0\u53EF\u7528\u914D\u7F6E\u9879\uFF01 FR-Designer_Configured_Roles=\u5DF2\u914D\u7F6E\u89D2\u8272 +FR-Designer_Scale_EnlargeOrReduce=\u7F29\u653E +FR-Designer_Scale_selfAdaptButton=\u6070\u597D\u5BB9\u7EB3\u9009\u5B9A\u533A\u57DF +FR-Designer_Scale_customButton=\u81EA\u5B9A\u4E49 +FR-Designer_FRFont_Subscript=\u4E0B\u6807 +FR-Designer_FRFont_Superscript=\u4E0A\u6807 +FR-Designer_FRFont_Shadow=\u9634\u5F71 +FR-Designer_FRFont_Strikethrough=\u5220\u9664\u7EBF +FR-Designer_FRFont_Underline=\u4E0B\u5212\u7EBF +FR-Designer_FRFont_bold=\u52A0\u7C97 +FR-Designer_FRFont_italic=\u659C\u4F53 +FR-Designer_FRFont_Foreground=\u989C\u8272 +FR-Designer_FRFont_Style=\u5B57\u5F62 +FR-Designer_FRFont_plain=\u5E38\u89C4 +FR-Designer_FRFont_bolditalic=\u52A0\u7C97\u503E\u659C +FR-Designer_outBorder=\u5916\u8FB9\u6846 +FR-Designer_inBorder=\u5185\u8FB9\u6846 +FR-Designer_ExpandD_Up_Father_Cell=\u4E0A\u7236\u683C +FR-Designer_ExpandD_Expand_Direction=\u6269\u5C55\u65B9\u5411 +FR-Designer_Expand=\u6269\u5C55 +FR-Designer_ExpendSort=\u6269\u5C55\u540E\u6392\u5E8F +FR-Designer_ExpandD_Expandable=\u53EF\u4F38\u5C55\u6027 +FR-Designer_Read_failure=\u8BFB\u53D6\u5931\u8D25\uFF0C\u53EF\u80FD\u6E90\u6587\u4EF6\u5DF2\u635F\u574F 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 269d4e2e47..6ed80f9d04 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 @@ -2010,3 +2010,24 @@ FR-Designer_Float_Element=\u61F8\u6D6E\u5143\u7D20 FR-Designer_Widget_Library=\u7D44\u4EF6\u5EAB FR-Designer_No_Settings_Available=\u7121\u53EF\u7528\u914D\u5BD8\u9805\uFF01 FR-Designer_Configured_Roles=\u5DF2\u914D\u7F6E\u89D2\u8272 +FR-Designer_Scale_selfAdaptButton=\ +FR-Designer_Scale_customButton=\ +FR-Designer_FRFont_Subscript=\ +FR-Designer_FRFont_Superscript=\ +FR-Designer_FRFont_Shadow=\ +FR-Designer_FRFont_Strikethrough=\ +FR-Designer_FRFont_Underline=\ +FR-Designer_FRFont_bold=\ +FR-Designer_FRFont_italic=\ +FR-Designer_FRFont_Foreground=\ +FR-Designer_FRFont_Style=\ +FR-Designer_FRFont_plain=\ +FR-Designer_FRFont_bolditalic=\ +FR-Designer_outBorder=\ +FR-Designer_inBorder=\ +FR-Designer_ExpandD_Up_Father_Cell=\ +FR-Designer_ExpandD_Expand_Direction=\ +FR-Designer_Expand=\ +FR-Designer_ExpendSort=\ +FR-Designer_ExpandD_Expandable=\ +FR-Designer_Read_failure=\ diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index c2d1636434..7125b53b10 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.islider.UISlider; import com.fr.design.gui.itextfield.UITextField; @@ -9,6 +10,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import javax.swing.*; +import javax.swing.border.MatteBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; @@ -17,14 +19,24 @@ import javax.swing.plaf.basic.BasicSliderUI; import java.awt.*; import java.awt.event.*; import java.math.BigDecimal; -import java.util.Observable; /** * Created by MoMeak on 2017/7/13. */ public class JSliderPane extends JPanel { - private final int KERNING = 2; + private static final double ONEPOINTEIGHT = 1.8; + private static final int SIX = 6; + private static final int TEN = 10; + private static final int ONEEIGHT = 18; + private static final int FOURTEN = 40; + private static final int HALFHUNDRED = 50; + private static final int HUNDRED = 100; + private static final int TWOHUNDRED = 200; + private static final int THREEHUNDRED = 300; + private static final int FOURHUNDRED = 400; + private static final int DIALOGWIDTH = 150; + private static final int DIALOGHEIGHT = 200; public int showValue = 100; public double resolutionTimes = 1.0; private static JSliderPane THIS; @@ -34,23 +46,30 @@ public class JSliderPane extends JPanel { private int sliderValue; private UIButton downButton; private UIButton upButton; + private UIButton showValButton; + private UIRadioButton twoHundredButton; + private UIRadioButton oneHundredButton; + private UIRadioButton SevenFiveButton; + private UIRadioButton fiveTenButton; + private UIRadioButton twoFiveButton; + private UIRadioButton selfAdaptButton; + private UIRadioButton customButton; //拖动条处理和button、直接输入不一样 private boolean isButtonOrIsTxt = true; - private boolean isDialogOut = false; // 是否弹出 - private Dialog dialog; + private PopupPane dialog; + private int upButtonX; public JSliderPane() { this.setLayout(new BorderLayout()); - slider = new UISlider(0,100,50); + slider = new UISlider(0,HUNDRED,HALFHUNDRED); slider.setUI(new JSliderPaneUI(slider)); slider.addChangeListener(listener); showVal = new UITextField(); showVal.setText("100%"); - showVal.setPreferredSize(new Dimension(40,18)); + showVal.setPreferredSize(new Dimension(FOURTEN,ONEEIGHT)); showVal.getDocument().addDocumentListener(showValDocumentListener); -// showVal.addMouseListener(showValMouseListener); downButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveDown.png")); upButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveUp.png")); @@ -61,21 +80,23 @@ public class JSliderPane extends JPanel { JPanel panel = new JPanel(new FlowLayout(1,1,0)); + showValButton = new UIButton(showVal.getText()); + showValButton.setBorderPainted(false); + showValButton.setPreferredSize(new Dimension(HALFHUNDRED,ONEEIGHT)); + + showValButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popupDialog(); + } + }); panel.add(downButton); panel.add(slider); panel.add(upButton); - panel.add(showVal); -// JPanel panel = new JPanel(null); -// panel.add(downButton); -// panel.add(slider); -// panel.add(upButton); -// panel.add(showVal); -// downButton.setBounds(0,0,16,16); -// slider.setBounds(16+KERNING,0,160,16); -// upButton.setBounds(176+KERNING*2,0,16,16); -// showVal.setBounds(192+KERNING*3,0,40,16); + panel.add(showValButton); this.add(panel,BorderLayout.NORTH); - this.setBounds(0,0,300,16); + this.setBounds(0,0,THREEHUNDRED,ONEEIGHT); + } public static final JSliderPane getInstance() { @@ -86,6 +107,24 @@ public class JSliderPane extends JPanel { return THIS; } + private void initUIRadioButton(){ + twoHundredButton = new UIRadioButton("200%"); + oneHundredButton = new UIRadioButton("100%"); + SevenFiveButton = new UIRadioButton("75%"); + fiveTenButton = new UIRadioButton("50%"); + twoFiveButton = new UIRadioButton("25%"); + selfAdaptButton = new UIRadioButton(Inter.getLocText("FR-Designer_Scale_selfAdaptButton")); + customButton = new UIRadioButton(Inter.getLocText("FR-Designer_Scale_customButton")); + + ButtonGroup bg=new ButtonGroup();// 初始化按钮组 + bg.add(twoHundredButton);// 加入按钮组 + bg.add(oneHundredButton); + bg.add(SevenFiveButton); + bg.add(fiveTenButton); + bg.add(twoFiveButton); + bg.add(selfAdaptButton); + bg.add(customButton); + } //定义一个监听器,用于监听所有滑动条 @@ -115,7 +154,7 @@ public class JSliderPane extends JPanel { isButtonOrIsTxt = true; resolutionTimes = divide(showValue,100,2); refreshSlider(); - refreshBody(); + refreshBottun(); } @Override @@ -129,49 +168,20 @@ public class JSliderPane extends JPanel { } }; - MouseListener showValMouseListener = new MouseListener() { - @Override - public void mouseClicked(MouseEvent e) { - popupDialog(); - } - - @Override - public void mousePressed(MouseEvent e) { - - } - - @Override - public void mouseReleased(MouseEvent e) { - - } - - @Override - public void mouseEntered(MouseEvent e) { - - } - - @Override - public void mouseExited(MouseEvent e) { - - } - }; - private void refreshSlider(){ showValue = Integer.parseInt(showVal.getText().substring(0, showVal.getText().indexOf("%"))); - if (showValue >100){ - slider.setValue((int)(showValue+200)/6); - }else if (showValue <100){ - slider.setValue((int)((showValue-10)/1.8)); - }else if (showValue == 100){ - slider.setValue(50); + if (showValue >HUNDRED){ + slider.setValue((int)(showValue+TWOHUNDRED)/SIX); + }else if (showValue = 10 ){ + int newDownVal = showValue - TEN; + if (newDownVal >= TEN ){ showValue = newDownVal; showVal.setText(newDownVal + "%"); }else { showValue = newDownVal; - showVal.setText(10 + "%"); + showVal.setText(TEN + "%"); } } if(e.getActionCommand().equals("more")){ - int newUpVal = showValue + 10; - if (newUpVal <= 400 ){ + int newUpVal = showValue + TEN; + if (newUpVal <= FOURHUNDRED ){ showValue = newUpVal; showVal.setText(newUpVal + "%"); }else { showValue = newUpVal; - showVal.setText(400 + "%"); + showVal.setText(FOURHUNDRED + "%"); } } isButtonOrIsTxt = true; } }; + + private void getTimes(int value){ - if (value == 50){ - times=100; - }else if (value < 50){ - times = (int) Math.round(1.8*value + 10); + if (value == HALFHUNDRED){ + times=HUNDRED; + }else if (value < HALFHUNDRED){ + times = (int) Math.round(ONEPOINTEIGHT*value + TEN); }else { - times = (int) (6*value - 200); + times = (int) (SIX*value - TWOHUNDRED); } } @@ -233,17 +245,20 @@ public class JSliderPane extends JPanel { } private void popupDialog(){ - if (isDialogOut) { - dialog.setVisible(false); - isDialogOut = false; - return; - } - if (dialog == null) { - dialog = new Dialog(showVal); - isDialogOut = true; - } else { - dialog.setVisible(true); - isDialogOut = true; + Point btnCoords = upButton.getLocationOnScreen(); + if (dialog == null){ + dialog = new PopupPane(upButton,showVal); + if (upButtonX == 0) { + upButtonX = btnCoords.x; + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +HALFHUNDRED, -DIALOGHEIGHT); + } + }else { + if (upButtonX == 0) { + upButtonX = btnCoords.x; + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +HALFHUNDRED, -DIALOGHEIGHT); + } else { + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +HALFHUNDRED, -DIALOGHEIGHT); + } } } @@ -263,6 +278,12 @@ public class JSliderPane extends JPanel { class JSliderPaneUI extends BasicSliderUI { + private static final int VERTICAL_WIDTH = 11; + private static final int VERTICAL_HEIGHT = 16; + private static final int FOUR = 4; + private static final int FIVE = 5; + private static final int SIX = 6; + public JSliderPaneUI(UISlider b) { super(b); } @@ -276,12 +297,12 @@ class JSliderPaneUI extends BasicSliderUI { Dimension size = new Dimension(); if ( slider.getOrientation() == JSlider.VERTICAL ) { - size.width = 11; - size.height = 16; + size.width = VERTICAL_WIDTH; + size.height = VERTICAL_HEIGHT; } else { - size.width = 11; - size.height = 16; + size.width = VERTICAL_WIDTH; + size.height = VERTICAL_HEIGHT; } return size; @@ -300,7 +321,7 @@ class JSliderPaneUI extends BasicSliderUI { g.setColor(slider.getBackground().darker()); } g.setColor(Color.darkGray); - g.fillRect(0, 1, w-6, h+1); + g.fillRect(0, 1, w-SIX, h+1); } /** */ @@ -315,43 +336,82 @@ class JSliderPaneUI extends BasicSliderUI { cy = (trackBounds.height / 2); cw = trackBounds.width; g.setColor(Color.lightGray); - g.drawLine(0, cy, cw+5, cy); - g.drawLine(5+cw/2, cy-4, 5+cw/2, cy+4); + g.drawLine(0, cy, cw+FIVE, cy); + g.drawLine(FIVE+cw/2, cy-FOUR, FIVE+cw/2, cy+FOUR); } else { super.paintTrack(g); } } + } class Dialog extends JDialog { - private Container container; - private static final int RESIZE_RANGE = 4; - private Cursor originCursor; - private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR); - private Point mouseDownCompCoords; - private int minHeight; // 对话框最小高度 +// private Container container; +// private static final int UPLABELHEIGHT = 25; +// private static final int HALFHUNDRED = 50; +// private static final int DIALOGWIDTH = 150; +// private static final int DIALOGHEIGHT = 200; +// private static final int UPLABELWIDTH = 300; +// private int minHeight; // 对话框最小高度 +// private JComponent contentPane; +// private JComponent centerPane; +// private UILabel upLabel; + +// public Dialog(UIButton b,UITextField j) { +// super(DesignerContext.getDesignerFrame()); +// container = getContentPane(); +// setUndecorated(true); +// contentPane = new JPanel(new BorderLayout()); +// centerPane = new JPanel(new BorderLayout()); +// upLabel = new UILabel(Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); +// upLabel.setOpaque(true); +// upLabel.setPreferredSize(new Dimension(UPLABELWIDTH,UPLABELHEIGHT)); +// upLabel.setBackground(Color.LIGHT_GRAY); +// upLabel.setBorder(BorderFactory.createLineBorder(Color.gray,1)); +// upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); +// centerPane.add(j,BorderLayout.NORTH); +// contentPane.add(upLabel,BorderLayout.NORTH); +// contentPane.add(centerPane,BorderLayout.CENTER); +//// contentPane.setBorder(BorderFactory.createLineBorder(Color.gray,1)); +// contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); +//// contentPane.add(new JPanel()) +// container.add(contentPane, BorderLayout.CENTER); +// minHeight = container.getPreferredSize().height; +// setSize(DIALOGWIDTH, DIALOGHEIGHT); +//// validate(); +// Point btnCoords = b.getLocationOnScreen(); +// +// this.setLocation(btnCoords.x - DIALOGWIDTH + b.getWidth() +HALFHUNDRED, btnCoords.y -DIALOGHEIGHT); +//// initListener(); +// +// this.setVisible(true); +// } +} +class PopupPane extends JPopupMenu { private JComponent contentPane; + private static final int UPLABELHEIGHT = 25; + private static final int HALFHUNDRED = 50; + private static final int DIALOGWIDTH = 150; + private static final int DIALOGHEIGHT = 200; + private static final int UPLABELWIDTH = 300; + private JComponent centerPane; private UILabel upLabel; - - public Dialog(UITextField j) { - super(DesignerContext.getDesignerFrame()); - container = getContentPane(); - setUndecorated(true); + PopupPane(UIButton b,UITextField j) { contentPane = new JPanel(new BorderLayout()); - upLabel = new UILabel(Inter.getLocText("Enlarge_Or_Reduce")); + centerPane = new JPanel(new BorderLayout()); + upLabel = new UILabel(Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); upLabel.setOpaque(true); - upLabel.setPreferredSize(new Dimension(300,25)); + upLabel.setPreferredSize(new Dimension(UPLABELWIDTH,UPLABELHEIGHT)); upLabel.setBackground(Color.LIGHT_GRAY); + upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); + centerPane.add(j,BorderLayout.NORTH); contentPane.add(upLabel,BorderLayout.NORTH); -// contentPane.add(new JPanel()) - container.add(contentPane, BorderLayout.CENTER); - minHeight = container.getPreferredSize().height; - setSize(150, 250); -// validate(); - Point btnCoords = j.getLocationOnScreen(); + contentPane.add(centerPane,BorderLayout.CENTER); +// contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); + this.add(contentPane, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(DIALOGWIDTH, DIALOGHEIGHT)); + this.setOpaque(false); + } - this.setLocation(btnCoords.x -150+j.getWidth(), btnCoords.y -250); -// initListener(); - this.setVisible(true); - } -} + +} \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index 51a18c6969..2a321cd32f 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -50,25 +50,27 @@ public class FormArea extends JComponent implements ScrollRulerComponent { private static final double SLIDER_FLOAT = 400.0; private static final double SLIDER_MIN = 10.0; public static final double DEFAULT_SLIDER = 100.0; - private static final int ROTATIONS = 50; - private FormDesigner designer; - private int horizontalValue = 0; - private int verticalValue = 0; - private int verticalMax = 0; - private int horicalMax = 0; - private FormScrollBar verScrollBar; + private static final int ROTATIONS = 50; + private static final int showValMax = 400; + private static final int showValMin = 10; + private FormDesigner designer; + private int horizontalValue = 0; + private int verticalValue = 0; + private int verticalMax = 0; + private int horicalMax = 0; + private FormScrollBar verScrollBar; private FormScrollBar horScrollBar; - //显示和设置表单界面大小的控件 - private UINumberField widthPane; - private UINumberField heightPane; - private JSliderPane slidePane; - private boolean isValid = true; - // 初始时滑块值为100,托动后的值设为START_VALUE; - private double START_VALUE = DEFAULT_SLIDER; - private double screenValue; + //显示和设置表单界面大小的控件 + private UINumberField widthPane; + private UINumberField heightPane; + private JSliderPane slidePane; + private boolean isValid = true; + // 初始时滑块值为100,托动后的值设为START_VALUE; + private double START_VALUE = DEFAULT_SLIDER; + private double screenValue; private JSliderPane sliderPane; - - public FormScrollBar getHorScrollBar() { + + public FormScrollBar getHorScrollBar() { return horScrollBar; } @@ -76,47 +78,47 @@ public class FormArea extends JComponent implements ScrollRulerComponent { this.horScrollBar = horScrollBar; } - public FormArea(FormDesigner designer) { - this(designer, true); - } - - public FormArea(FormDesigner designer, boolean useScrollBar) { - this.designer = designer; - this.designer.setParent(this); - isValid = useScrollBar; - verScrollBar = new FormScrollBar(Adjustable.VERTICAL, this); - horScrollBar = new FormScrollBar(Adjustable.HORIZONTAL, this); - if (useScrollBar) { - this.setLayout(new FormRulerLayout()); - designer.setBorder(new LineBorder(new Color(198,198,198))); - this.add(FormRulerLayout.CENTER, designer); - addFormSize(); - this.add(FormRulerLayout.VERTICAL, verScrollBar); - this.add(FormRulerLayout.HIRIZONTAL, horScrollBar); - enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK); - } else { - // 报表参数界面只要标尺和中心pane - this.setLayout(new RulerLayout()); - this.add(RulerLayout.CENTER, designer); - addFormRuler(); - } - this.setFocusTraversalKeysEnabled(false); - } - - /** - * 增加表单的页面大小控制界面,包括手动修改和滑块拖动 - */ - private void addFormSize() { - double f = TableLayout.FILL; + public FormArea(FormDesigner designer) { + this(designer, true); + } + + public FormArea(FormDesigner designer, boolean useScrollBar) { + this.designer = designer; + this.designer.setParent(this); + isValid = useScrollBar; + verScrollBar = new FormScrollBar(Adjustable.VERTICAL, this); + horScrollBar = new FormScrollBar(Adjustable.HORIZONTAL, this); + if (useScrollBar) { + this.setLayout(new FormRulerLayout()); + designer.setBorder(new LineBorder(new Color(198,198,198))); + this.add(FormRulerLayout.CENTER, designer); + addFormSize(); + this.add(FormRulerLayout.VERTICAL, verScrollBar); + this.add(FormRulerLayout.HIRIZONTAL, horScrollBar); + enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK); + } else { + // 报表参数界面只要标尺和中心pane + this.setLayout(new RulerLayout()); + this.add(RulerLayout.CENTER, designer); + addFormRuler(); + } + this.setFocusTraversalKeysEnabled(false); + } + + /** + * 增加表单的页面大小控制界面,包括手动修改和滑块拖动 + */ + private void addFormSize() { + double f = TableLayout.FILL; double p = TableLayout.PREFERRED; double[] rowSize = {f}; double[] columnSize = { p, f, p, p, p, p, p, f, p}; UILabel tipsPane = new UILabel("form"); tipsPane.setPreferredSize(new Dimension(200, 0)); - widthPane = new UINumberField(); - widthPane.setPreferredSize(new Dimension(60, 0)); - heightPane = new UINumberField(); - heightPane.setPreferredSize(new Dimension(60, 0)); + widthPane = new UINumberField(); + widthPane.setPreferredSize(new Dimension(60, 0)); + heightPane = new UINumberField(); + heightPane.setPreferredSize(new Dimension(60, 0)); // slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT); // slidePane.setPreferredSize(new Dimension(260,20)); @@ -124,40 +126,40 @@ public class FormArea extends JComponent implements ScrollRulerComponent { slidePane.setPreferredSize(new Dimension(300,20)); - JPanel resizePane =TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ - {tipsPane, new UILabel(), widthPane, new UILabel(Inter.getLocText("FR-Designer_Indent-Pixel")), new UILabel("x"), - heightPane, new UILabel(Inter.getLocText("FR-Designer_Indent-Pixel")), new UILabel(), slidePane}}, - rowSize, columnSize, 8); - this.add(FormRulerLayout.BOTTOM, resizePane); - setWidgetsConfig(); - // 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小 - slidePane.setEnabled(false); - slidePane.setVisible(true); - initTransparent(); - initCalculateSize(); - } - - private void setWidgetsConfig() { - widthPane.setHorizontalAlignment(widthPane.CENTER); - heightPane.setHorizontalAlignment(heightPane.CENTER); - widthPane.setMaxDecimalLength(0); - heightPane.setMaxDecimalLength(0); - //控件初始值就是根节点组件初始的宽和高 - widthPane.setValue(designer.getRootComponent().getWidth()); - heightPane.setValue(designer.getRootComponent().getHeight()); - addWidthPaneListener(); - addHeightPaneListener(); - } - - private void initTransparent() { - initCalculateSize(); + JPanel resizePane =TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ + {tipsPane, new UILabel(), widthPane, new UILabel(Inter.getLocText("FR-Designer_Indent-Pixel")), new UILabel("x"), + heightPane, new UILabel(Inter.getLocText("FR-Designer_Indent-Pixel")), new UILabel(), slidePane}}, + rowSize, columnSize, 8); + this.add(FormRulerLayout.BOTTOM, resizePane); + setWidgetsConfig(); + // 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小 + slidePane.setEnabled(false); + slidePane.setVisible(true); + initTransparent(); + initCalculateSize(); + } + + private void setWidgetsConfig() { + widthPane.setHorizontalAlignment(widthPane.CENTER); + heightPane.setHorizontalAlignment(heightPane.CENTER); + widthPane.setMaxDecimalLength(0); + heightPane.setMaxDecimalLength(0); + //控件初始值就是根节点组件初始的宽和高 + widthPane.setValue(designer.getRootComponent().getWidth()); + heightPane.setValue(designer.getRootComponent().getHeight()); + addWidthPaneListener(); + addHeightPaneListener(); + } + + private void initTransparent() { + initCalculateSize(); slidePane.getShowVal().getDocument().addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { // slidePane.getShowVal().getDocument() double value = Integer.parseInt(slidePane.getShowVal().getText().substring(0, slidePane.getShowVal().getText().indexOf("%"))); - value = value>400 ? 400 : value; - value = value<10 ? 10 : value; + value = value>showValMax ? showValMax : value; + value = value= designer.getRootComponent().getWidth(); - } - - /** - * 设置界面内的组件可见以及水平垂直滚动条的值 - * (除了根容器,拖入组件进来时如果大小超过当前界面大小,必须设置滚动条值,否则滚动条默认不显示) - * - * @param creator 控件 - */ - public void scrollPathToVisible(XCreator creator) { - creator.seleteRelatedComponent(creator); - - if (!ComponentUtils.isComponentVisible(creator) && !designer.isRoot(creator) && (creator.toData()).isVisible()) { - designer.makeVisible(creator); - } - - if (shouldSetScrollValue(creator)) { - return; - } - //获取在容器的绝对位置 - Rectangle rec = ComponentUtils.getRelativeBounds(creator); - int dWidth = getDesignerWidth(); - if (rec.width <= dWidth&&rec.x < getHorizontalValue()) { - //在边界内部且x位置小于水平滚动条的值 - horScrollBar.setValue(rec.x); - } else if (rec.x + rec.width > dWidth + horizontalValue) { - //超出边界宽度 - horScrollBar.setValue(rec.x + rec.width - dWidth); - } - int dHeight = getDesignerHeight(); - if (rec.height < dHeight && rec.y < getVerticalValue()) { - //在边界内部且y位置小于竖直滚动条的值 - verScrollBar.setValue(rec.y); - } else if (rec.y + rec.height > dHeight + verticalValue) { - //超出边界高度 - verScrollBar.setValue(rec.y + rec.height - dHeight); - } - } - - - /** - * 容器布局 - */ - public void doLayout() { - layout(); - if (isValid) { - XLayoutContainer root = designer.getRootComponent(); - setScrollBarProperties(root.getWidth()-designer.getWidth(), horScrollBar); - //计算滚动条值的时候应该算上参数面板的高度 - setScrollBarProperties(designer.getParaHeight() + root.getHeight()-designer.getHeight(), verScrollBar); - } - } - - /** - * 设置滚动条的属性 - */ - private void setScrollBarProperties(int value, FormScrollBar bar) { - if (value == 0 && isScrollNotVisible(bar)) { - return; - } - if (value <= 0) { - // 界面有滚动条时,手动缩小容器宽度到界面内,重置滚动条值和max - setScrollBarMax(0, bar); - bar.setMaximum(0); - bar.setValue(0); - bar.setEnabled(false); - } else { - //参数面板拖拽过程中value一直为当前value - int oldValue = verticalValue; - setScrollBarMax(value, bar); - bar.setEnabled(true); - bar.setMaximum(value); - bar.setValue(value); - bar.setValue(oldValue); - } - } - - private boolean isScrollNotVisible(FormScrollBar bar) { - if (bar.getOrientation() == Adjustable.VERTICAL ) { - return verticalMax == 0; - } else { - return horicalMax == 0; - } - } - - private void setScrollBarMax( int max, FormScrollBar bar) { - if (bar.getOrientation() == Adjustable.VERTICAL ) { - verticalMax = max; - } else { - horicalMax = max; - } - } - - /** - *返回designer的最小高度 - * - * @return int - */ - public int getMinHeight() { - return designer.getDesignerMode().getMinDesignHeight(); - } - - /** - *返回designer的最小宽度 - * - * @return int - */ - public int getMinWidth() { - return designer.getDesignerMode().getMinDesignWidth(); - } - - /** - * getRulerLengthUnit - * - * @return short - */ - public short getRulerLengthUnit() { - return -1; - } - - /** - * 返回水平滚动条的value - * - * @return int - */ - public int getHorizontalValue() { - return horizontalValue; - } - - /** - * 设置水平滚动条的value - * - * @param newValue - */ - public void setHorizontalValue(int newValue) { - this.horizontalValue = newValue; - } - - /** - * 返回竖直滚动条的value - * - * @return - */ - public int getVerticalValue() { - return verticalValue; - } - - /** - * 竖直滚动条赋值 - * - * @param newValue - */ - public void setVerticalValue(int newValue) { - this.verticalValue = newValue; - } - - /** - * 返回当前designer的高度 - * - * @return height - */ - public int getDesignerHeight() { - return designer.getHeight(); - } - - /** - * 返回当前designer的宽度 - * - * @return - */ - public int getDesignerWidth() { - return designer.getWidth(); - } - - /** - * 返回宽度控件的value - * - * @return 宽度 - */ - public double getWidthPaneValue() { - return widthPane.getValue(); - } - - /** - * 设置宽度值 - * @param value 值 - */ - public void setWidthPaneValue(int value) { - widthPane.setValue(value); - } - - /** - * 设置高度值 - * @param value 值 - */ - public void setHeightPaneValue(int value) { - heightPane.setValue(value); - } - - /** - * 返回高度控件的value - * - * @return 高度 - */ - public double getHeightPaneValue() { - return heightPane.getValue(); - } - - /** - * 返回界面大小的百分比值 - * - * @return 百分比值 - */ - public double getSlideValue() { + + } + + /** + * 增加刻度条 + */ + public void addFormRuler() { + BaseRuler vRuler = new VerticalRuler(this); + BaseRuler hRuler = new HorizontalRuler(this); + this.add(RulerLayout.VRULER, vRuler); + this.add(RulerLayout.HRULER, hRuler); + } + + /** + * 鼠标滚轮事件 + * 由于表单设计界面要求: 容器大小大于界面时,滚动条才可以拖动,所以不支持滚动无限往下滚 + */ + @Override + protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent evt) { + int id = evt.getID(); + switch (id) { + case MouseEvent.MOUSE_WHEEL: { + int rotations = evt.getWheelRotation(); + int value = this.verScrollBar.getValue() + rotations * ROTATIONS ; + value = Math.min(value, verticalMax); + value = Math.max(0, value); + doLayout(); //加dolayout是因为每次滚动都要重置 Max的大小 + this.verScrollBar.setValue(value); + break; + } + } + } + + /** + * 返回表单容器的中心designer + * getFormEditor. + */ + public FormDesigner getFormEditor() { + return designer; + } + + private boolean shouldSetScrollValue(XCreator creator) { + return !isValid || designer.isRoot(creator) || getDesignerWidth() >= designer.getRootComponent().getWidth(); + } + + /** + * 设置界面内的组件可见以及水平垂直滚动条的值 + * (除了根容器,拖入组件进来时如果大小超过当前界面大小,必须设置滚动条值,否则滚动条默认不显示) + * + * @param creator 控件 + */ + public void scrollPathToVisible(XCreator creator) { + creator.seleteRelatedComponent(creator); + + if (!ComponentUtils.isComponentVisible(creator) && !designer.isRoot(creator) && (creator.toData()).isVisible()) { + designer.makeVisible(creator); + } + + if (shouldSetScrollValue(creator)) { + return; + } + //获取在容器的绝对位置 + Rectangle rec = ComponentUtils.getRelativeBounds(creator); + int dWidth = getDesignerWidth(); + if (rec.width <= dWidth&&rec.x < getHorizontalValue()) { + //在边界内部且x位置小于水平滚动条的值 + horScrollBar.setValue(rec.x); + } else if (rec.x + rec.width > dWidth + horizontalValue) { + //超出边界宽度 + horScrollBar.setValue(rec.x + rec.width - dWidth); + } + int dHeight = getDesignerHeight(); + if (rec.height < dHeight && rec.y < getVerticalValue()) { + //在边界内部且y位置小于竖直滚动条的值 + verScrollBar.setValue(rec.y); + } else if (rec.y + rec.height > dHeight + verticalValue) { + //超出边界高度 + verScrollBar.setValue(rec.y + rec.height - dHeight); + } + } + + + /** + * 容器布局 + */ + public void doLayout() { + layout(); + if (isValid) { + XLayoutContainer root = designer.getRootComponent(); + setScrollBarProperties(root.getWidth()-designer.getWidth(), horScrollBar); + //计算滚动条值的时候应该算上参数面板的高度 + setScrollBarProperties(designer.getParaHeight() + root.getHeight()-designer.getHeight(), verScrollBar); + } + } + + /** + * 设置滚动条的属性 + */ + private void setScrollBarProperties(int value, FormScrollBar bar) { + if (value == 0 && isScrollNotVisible(bar)) { + return; + } + if (value <= 0) { + // 界面有滚动条时,手动缩小容器宽度到界面内,重置滚动条值和max + setScrollBarMax(0, bar); + bar.setMaximum(0); + bar.setValue(0); + bar.setEnabled(false); + } else { + //参数面板拖拽过程中value一直为当前value + int oldValue = verticalValue; + setScrollBarMax(value, bar); + bar.setEnabled(true); + bar.setMaximum(value); + bar.setValue(value); + bar.setValue(oldValue); + } + } + + private boolean isScrollNotVisible(FormScrollBar bar) { + if (bar.getOrientation() == Adjustable.VERTICAL ) { + return verticalMax == 0; + } else { + return horicalMax == 0; + } + } + + private void setScrollBarMax( int max, FormScrollBar bar) { + if (bar.getOrientation() == Adjustable.VERTICAL ) { + verticalMax = max; + } else { + horicalMax = max; + } + } + + /** + *返回designer的最小高度 + * + * @return int + */ + public int getMinHeight() { + return designer.getDesignerMode().getMinDesignHeight(); + } + + /** + *返回designer的最小宽度 + * + * @return int + */ + public int getMinWidth() { + return designer.getDesignerMode().getMinDesignWidth(); + } + + /** + * getRulerLengthUnit + * + * @return short + */ + public short getRulerLengthUnit() { + return -1; + } + + /** + * 返回水平滚动条的value + * + * @return int + */ + public int getHorizontalValue() { + return horizontalValue; + } + + /** + * 设置水平滚动条的value + * + * @param newValue + */ + public void setHorizontalValue(int newValue) { + this.horizontalValue = newValue; + } + + /** + * 返回竖直滚动条的value + * + * @return + */ + public int getVerticalValue() { + return verticalValue; + } + + /** + * 竖直滚动条赋值 + * + * @param newValue + */ + public void setVerticalValue(int newValue) { + this.verticalValue = newValue; + } + + /** + * 返回当前designer的高度 + * + * @return height + */ + public int getDesignerHeight() { + return designer.getHeight(); + } + + /** + * 返回当前designer的宽度 + * + * @return + */ + public int getDesignerWidth() { + return designer.getWidth(); + } + + /** + * 返回宽度控件的value + * + * @return 宽度 + */ + public double getWidthPaneValue() { + return widthPane.getValue(); + } + + /** + * 设置宽度值 + * @param value 值 + */ + public void setWidthPaneValue(int value) { + widthPane.setValue(value); + } + + /** + * 设置高度值 + * @param value 值 + */ + public void setHeightPaneValue(int value) { + heightPane.setValue(value); + } + + /** + * 返回高度控件的value + * + * @return 高度 + */ + public double getHeightPaneValue() { + return heightPane.getValue(); + } + + /** + * 返回界面大小的百分比值 + * + * @return 百分比值 + */ + public double getSlideValue() { // return slidePane.updateBean(); - //7.1.1不加缩放滑块 - return this.screenValue; - } - - /** - * 返回界面区域大小 - * - * @return Dimension - */ - public Dimension getAreaSize() { - return new Dimension(horScrollBar.getMaximum(), verScrollBar.getMaximum()); - } - - /** - * setAreaSize - * - * @param totalSize - * @param horizontalValue - * @param verticalValue - */ - public void setAreaSize(Dimension totalSize, int horizontalValue, int verticalValue, double width, double height, double slide) { - this.verticalMax = (int) totalSize.getHeight(); - this.horicalMax = (int) totalSize.getHeight(); - // 撤销时会refreshRoot,导致layout大小变为默认大小 - // 按照之前设置的宽高和百分比重置下容器size - if (width != widthPane.getValue()) { - widthPane.setValue(width); - reCalculateWidth((int) width); - } - if (height != heightPane.getValue()) { - heightPane.setValue(height); - reCalculateHeight((int) height); - } - if (designer.getRootComponent().acceptType(XWFitLayout.class) && slide == DEFAULT_SLIDER) { - XWFitLayout layout = (XWFitLayout) designer.getRootComponent(); - // 撤销时先refreshRoot了,此处去掉内边距再增加间隔 - layout.moveContainerMargin(); - layout.addCompInterval(layout.getAcualInterval()); - } else if (designer.getRootComponent().acceptType(XWFitLayout.class)){ - START_VALUE = DEFAULT_SLIDER; - reCalculateRoot(slide, true); + //7.1.1不加缩放滑块 + return this.screenValue; + } + + /** + * 返回界面区域大小 + * + * @return Dimension + */ + public Dimension getAreaSize() { + return new Dimension(horScrollBar.getMaximum(), verScrollBar.getMaximum()); + } + + /** + * setAreaSize + * + * @param totalSize + * @param horizontalValue + * @param verticalValue + */ + public void setAreaSize(Dimension totalSize, int horizontalValue, int verticalValue, double width, double height, double slide) { + this.verticalMax = (int) totalSize.getHeight(); + this.horicalMax = (int) totalSize.getHeight(); + // 撤销时会refreshRoot,导致layout大小变为默认大小 + // 按照之前设置的宽高和百分比重置下容器size + if (width != widthPane.getValue()) { + widthPane.setValue(width); + reCalculateWidth((int) width); + } + if (height != heightPane.getValue()) { + heightPane.setValue(height); + reCalculateHeight((int) height); + } + if (designer.getRootComponent().acceptType(XWFitLayout.class) && slide == DEFAULT_SLIDER) { + XWFitLayout layout = (XWFitLayout) designer.getRootComponent(); + // 撤销时先refreshRoot了,此处去掉内边距再增加间隔 + layout.moveContainerMargin(); + layout.addCompInterval(layout.getAcualInterval()); + } else if (designer.getRootComponent().acceptType(XWFitLayout.class)){ + START_VALUE = DEFAULT_SLIDER; + reCalculateRoot(slide, true); // slidePane.populateBean(slide); - } - } - - /** - * 计算滚动条的值和max - * @param oldmax 之前最大值 - * @param max 当前最大值 - * @param newValue 当前value - * @param oldValue 之前value - * @param visi designer的大小 - * @param orientation 滚动条方向 - * @return 计算后的值和max - */ - @Override - public Point calculateScroll(int oldmax, int max, int newValue, int oldValue, int visi, int orientation) { - int scrollMax = orientation==1 ? verticalMax : horicalMax; - //防止滚动条到达低端还可以继续点击移动(滚动条最大范围不变时,newValue要在范围之内) - if ( oldmax == scrollMax+visi && newValue>scrollMax ) { - return new Point(oldValue, oldmax); - } + } + } + + /** + * 计算滚动条的值和max + * @param oldmax 之前最大值 + * @param max 当前最大值 + * @param newValue 当前value + * @param oldValue 之前value + * @param visi designer的大小 + * @param orientation 滚动条方向 + * @return 计算后的值和max + */ + @Override + public Point calculateScroll(int oldmax, int max, int newValue, int oldValue, int visi, int orientation) { + int scrollMax = orientation==1 ? verticalMax : horicalMax; + //防止滚动条到达低端还可以继续点击移动(滚动条最大范围不变时,newValue要在范围之内) + if ( oldmax == scrollMax+visi && newValue>scrollMax ) { + return new Point(oldValue, oldmax); + } return new Point(newValue, max); } private class FormRulerLayout extends RulerLayout{ - private int DESIGNERWIDTH = 960; - private int DESIGNERHEIGHT =540; - private int TOPGAP = 8; - - public FormRulerLayout(){ - super(); - } - - /** - * 表单用的layout,当前不需要标尺 - */ - public void layoutContainer(Container target) { - synchronized (target.getTreeLock()) { - Insets insets = target.getInsets(); - int top = insets.top; - int left = insets.left; - int bottom = target.getHeight() - insets.bottom; - int right = target.getWidth() - insets.right; - Dimension resize = resizePane.getPreferredSize(); - Dimension hbarPreferredSize = null; - Dimension vbarPreferredSize = null; - - resizePane.setBounds(left, bottom - resize.height, right, resize.height); - if(horScrollBar != null) { - hbarPreferredSize = horScrollBar.getPreferredSize(); - vbarPreferredSize = verScrollBar.getPreferredSize(); - horScrollBar.setBounds(left , bottom - hbarPreferredSize.height-resize.height, right - BARSIZE, hbarPreferredSize.height); - verScrollBar.setBounds(right - vbarPreferredSize.width, top, vbarPreferredSize.width, bottom - BARSIZE-resize.height); - } - FormDesigner dg = ((FormDesigner) designer); - XLayoutContainer root = dg.getRootComponent(); - if (root.acceptType(XWFitLayout.class)) { - DESIGNERWIDTH = root.getWidth(); - DESIGNERHEIGHT = dg.hasWAbsoluteLayout() ? root.getHeight()+dg.getParaHeight() : root.getHeight(); - } - Rectangle rec = new Rectangle(left+(right - DESIGNERWIDTH)/2, TOPGAP, right, bottom); - //是否为表单 - if (isValid ){ - int maxHeight = bottom - hbarPreferredSize.height - resize.height -TOPGAP*2; - int maxWidth = right - vbarPreferredSize.width; - DESIGNERWIDTH = DESIGNERWIDTH> maxWidth ? maxWidth : DESIGNERWIDTH; - DESIGNERHEIGHT = DESIGNERHEIGHT > maxHeight ? maxHeight : DESIGNERHEIGHT; - int designerLeft = left+(verScrollBar.getX() - DESIGNERWIDTH)/2; - rec = new Rectangle(designerLeft, TOPGAP, DESIGNERWIDTH, DESIGNERHEIGHT); - } - // designer是整个表单设计界面中的面板部分,目前只放自适应布局和参数界面。 - designer.setBounds(rec); - } - } - - } + private int DESIGNERWIDTH = 960; + private int DESIGNERHEIGHT =540; + private int TOPGAP = 8; + + public FormRulerLayout(){ + super(); + } + + /** + * 表单用的layout,当前不需要标尺 + */ + public void layoutContainer(Container target) { + synchronized (target.getTreeLock()) { + Insets insets = target.getInsets(); + int top = insets.top; + int left = insets.left; + int bottom = target.getHeight() - insets.bottom; + int right = target.getWidth() - insets.right; + Dimension resize = resizePane.getPreferredSize(); + Dimension hbarPreferredSize = null; + Dimension vbarPreferredSize = null; + + resizePane.setBounds(left, bottom - resize.height, right, resize.height); + if(horScrollBar != null) { + hbarPreferredSize = horScrollBar.getPreferredSize(); + vbarPreferredSize = verScrollBar.getPreferredSize(); + horScrollBar.setBounds(left , bottom - hbarPreferredSize.height-resize.height, right - BARSIZE, hbarPreferredSize.height); + verScrollBar.setBounds(right - vbarPreferredSize.width, top, vbarPreferredSize.width, bottom - BARSIZE-resize.height); + } + FormDesigner dg = ((FormDesigner) designer); + XLayoutContainer root = dg.getRootComponent(); + if (root.acceptType(XWFitLayout.class)) { + DESIGNERWIDTH = root.getWidth(); + DESIGNERHEIGHT = dg.hasWAbsoluteLayout() ? root.getHeight()+dg.getParaHeight() : root.getHeight(); + } + Rectangle rec = new Rectangle(left+(right - DESIGNERWIDTH)/2, TOPGAP, right, bottom); + //是否为表单 + if (isValid ){ + int maxHeight = bottom - hbarPreferredSize.height - resize.height -TOPGAP*2; + int maxWidth = right - vbarPreferredSize.width; + DESIGNERWIDTH = DESIGNERWIDTH> maxWidth ? maxWidth : DESIGNERWIDTH; + DESIGNERHEIGHT = DESIGNERHEIGHT > maxHeight ? maxHeight : DESIGNERHEIGHT; + int designerLeft = left+(verScrollBar.getX() - DESIGNERWIDTH)/2; + rec = new Rectangle(designerLeft, TOPGAP, DESIGNERWIDTH, DESIGNERHEIGHT); + } + // designer是整个表单设计界面中的面板部分,目前只放自适应布局和参数界面。 + designer.setBounds(rec); + } + } + + } } \ No newline at end of file From 20c4524cab35dce2761a565d3006d96d2951d40c Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 19 Jul 2017 18:47:53 +0800 Subject: [PATCH 073/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20PMD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/ReportComponentComposite.java | 3 ++- designer_form/src/com/fr/design/mainframe/FormArea.java | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index b3ab87a282..d51db17709 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -30,6 +30,7 @@ import com.fr.report.report.TemplateReport; public class ReportComponentComposite extends JComponent { private static final int MAX = 400; + private static final int HUND = 100; private static final int MIN = 10; private JWorkBook parent; private UIModeControlContainer parentContainer = null; @@ -68,7 +69,7 @@ public class ReportComponentComposite extends JComponent { double value = Integer.parseInt(jSliderContainer.getShowVal().getText().substring(0, jSliderContainer.getShowVal().getText().indexOf("%"))); value = value>MAX ? MAX : value; value = valueshowValMax ? showValMax : value; - value = valueSHOWVALMAX ? SHOWVALMAX : value; + value = value Date: Wed, 19 Jul 2017 19:16:32 +0800 Subject: [PATCH 074/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=8F=AF=E4=BC=B8=E7=BC=A9=E9=9D=A2=E6=9D=BF=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/icontainer/UIResizableContainer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 96eccfc595..afb23ec702 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -37,9 +37,9 @@ public class UIResizableContainer extends JPanel { private static final int MIN_WIDTH = 165; private static final int ARROW_MARGIN = 15; - private static final int ARROW_MARGIN_VERTICAL = 20; + private static final int ARROW_MARGIN_VERTICAL = 7; private static final int ARROW_RANGE = 35; - private static final int ARROW_RANGE_VERTICAL = 40; + private static final int ARROW_RANGE_VERTICAL = 25; private boolean isLeftRightDragEnabled = true; private boolean isDownPaneVisible = true ; @@ -502,7 +502,7 @@ public class UIResizableContainer extends JPanel { button = UIConstants.DRAG_LEFT_PRESS; } } - g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); + g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, 5, null); } else { g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { From 3d36b16d05632ff8ff3a7bbec904acd9fb67e517 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 20 Jul 2017 09:27:29 +0800 Subject: [PATCH 075/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20PMD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/grid/GridColumnUI.java | 2 -- designer/src/com/fr/grid/GridMouseAdapter.java | 1 - designer/src/com/fr/grid/GridRowUI.java | 2 -- designer/src/com/fr/grid/GridUtils.java | 1 - 4 files changed, 6 deletions(-) diff --git a/designer/src/com/fr/grid/GridColumnUI.java b/designer/src/com/fr/grid/GridColumnUI.java index 292c38a0a3..36a011a931 100644 --- a/designer/src/com/fr/grid/GridColumnUI.java +++ b/designer/src/com/fr/grid/GridColumnUI.java @@ -16,8 +16,6 @@ import com.fr.base.ScreenResolution; import com.fr.cache.list.IntList; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.GridScaleEdit; -import com.fr.design.mainframe.JSliderPane; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.grid.selection.Selection; import com.fr.privilege.finegrain.ColumnRowPrivilegeControl; diff --git a/designer/src/com/fr/grid/GridMouseAdapter.java b/designer/src/com/fr/grid/GridMouseAdapter.java index 14256de55c..27e93b8660 100644 --- a/designer/src/com/fr/grid/GridMouseAdapter.java +++ b/designer/src/com/fr/grid/GridMouseAdapter.java @@ -7,7 +7,6 @@ import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.GridScaleEdit; import com.fr.design.mainframe.JSliderPane; import com.fr.design.present.CellWriteAttrPane; import com.fr.design.utils.gui.GUICoreUtils; diff --git a/designer/src/com/fr/grid/GridRowUI.java b/designer/src/com/fr/grid/GridRowUI.java index 07df407a76..b03dbb414b 100644 --- a/designer/src/com/fr/grid/GridRowUI.java +++ b/designer/src/com/fr/grid/GridRowUI.java @@ -15,8 +15,6 @@ import com.fr.base.ScreenResolution; import com.fr.cache.list.IntList; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.GridScaleEdit; -import com.fr.design.mainframe.JSliderPane; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.grid.selection.Selection; import com.fr.privilege.finegrain.ColumnRowPrivilegeControl; diff --git a/designer/src/com/fr/grid/GridUtils.java b/designer/src/com/fr/grid/GridUtils.java index 415f016384..d197ec907d 100644 --- a/designer/src/com/fr/grid/GridUtils.java +++ b/designer/src/com/fr/grid/GridUtils.java @@ -6,7 +6,6 @@ import com.fr.design.cell.clipboard.CellElementsClip; import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.GridScaleEdit; import com.fr.design.mainframe.JSliderPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; From ae8b09b77668bec49cc9331114e98dbfad8f9215 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 20 Jul 2017 10:16:32 +0800 Subject: [PATCH 076/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/mainframe/JSliderPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 7125b53b10..18ab15a0bc 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -29,6 +29,7 @@ public class JSliderPane extends JPanel { private static final int SIX = 6; private static final int TEN = 10; private static final int ONEEIGHT = 18; + private static final int TWOFIVE = 25; private static final int FOURTEN = 40; private static final int HALFHUNDRED = 50; private static final int HUNDRED = 100; @@ -82,7 +83,7 @@ public class JSliderPane extends JPanel { showValButton = new UIButton(showVal.getText()); showValButton.setBorderPainted(false); - showValButton.setPreferredSize(new Dimension(HALFHUNDRED,ONEEIGHT)); + showValButton.setPreferredSize(new Dimension(HALFHUNDRED,TWOFIVE)); showValButton.addActionListener(new ActionListener() { @Override From 540b0f6e887c0dba3046e42686a31e39bd213f12 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 20 Jul 2017 16:47:37 +0800 Subject: [PATCH 077/101] pmd --- .../fr/design/mainframe/loghandler/LogHandlerBar.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index 4fbef485d8..b239d09542 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -192,11 +192,16 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { Insets insets = target.getInsets(); int top = insets.top; int right = target.getWidth() - insets.right; - clear.setBounds(right - 130, top + 4, clear.getPreferredSize().width, clear.getPreferredSize().height); - selectedall.setBounds(right - 100, top + 4, selectedall.getPreferredSize().width, selectedall.getPreferredSize().height); - set.setBounds(right - 70, top + 4, set.getPreferredSize().width, set.getPreferredSize().height); + clear.setBounds(right - CLEAR_OFFSET, top + TOP_OFFSET, clear.getPreferredSize().width, clear.getPreferredSize().height); + selectedall.setBounds(right - SELECT_OFFSET, top + TOP_OFFSET, selectedall.getPreferredSize().width, selectedall.getPreferredSize().height); + set.setBounds(right - SET_OFFSET, top + TOP_OFFSET, set.getPreferredSize().width, set.getPreferredSize().height); } + + private static final int CLEAR_OFFSET = 130; + private static final int TOP_OFFSET = 4; + private static final int SELECT_OFFSET = 100; + private static final int SET_OFFSET = 70; } } \ No newline at end of file From 382011697d666d544efdc1b6be4d746ae5d4086e Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 20 Jul 2017 16:51:10 +0800 Subject: [PATCH 078/101] pmd --- .../com/fr/design/mainframe/loghandler/LogHandlerBar.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index b239d09542..17ba42261b 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -86,15 +86,17 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { timerPaint(); } + private static final int UNKNOWN_COUNT = 5; + public synchronized void timerPaint() { isWithSerious = true; timer = new Timer(500, null); ActionListener taskAction = new ActionListener() { public void actionPerformed(ActionEvent e) { - if (i < 5) { + if (i < UNKNOWN_COUNT) { isWithSerious = i % 2 == 0 ? true : false; repaint(); - } else if (i == 5) { + } else if (i == UNKNOWN_COUNT) { if (timer == null) return; timer.stop(); From e67cc424e493a26d604a221cd1d434f3310e85c5 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 20 Jul 2017 16:55:08 +0800 Subject: [PATCH 079/101] pmd --- .../fr/design/mainframe/loghandler/LogHandlerBar.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index 17ba42261b..e366d8b174 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -40,17 +40,17 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { clear.setMargin(null); clear.setOpaque(false); clear.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - clear.setToolTipText(Inter.getLocText("Clear_All")); + clear.setToolTipText(Inter.getLocText("FR-Designer_Clear_All")); selectedall = new UIButton(BaseUtils.readIcon("com/fr/design/images/log/selectedall.png")); selectedall.setMargin(null); selectedall.setOpaque(false); selectedall.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - selectedall.setToolTipText(Inter.getLocText("Select_All")); + selectedall.setToolTipText(Inter.getLocText("FR-Designer_Select_All")); set = new UIButton(BaseUtils.readIcon("com/fr/design/images/log/setting.png")); set.setMargin(null); set.setOpaque(false); set.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - set.setToolTipText(Inter.getLocText("Set")); + set.setToolTipText(Inter.getLocText("FR-Designer_Set")); this.add(clear); this.add(selectedall); @@ -94,11 +94,12 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { ActionListener taskAction = new ActionListener() { public void actionPerformed(ActionEvent e) { if (i < UNKNOWN_COUNT) { - isWithSerious = i % 2 == 0 ? true : false; + isWithSerious = (i & 1) == 0 ? true : false; repaint(); } else if (i == UNKNOWN_COUNT) { - if (timer == null) + if (timer == null) { return; + } timer.stop(); timer = null; i = 0; From 83459633ba325ef32d7b165cbf59a5bcfbf40a8e Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 20 Jul 2017 17:46:57 +0800 Subject: [PATCH 080/101] =?UTF-8?q?=E7=9C=8B=E5=88=B0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=AF=A1=E5=BC=82=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/loghandler/LogHandlerBar.java | 42 +++++-------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index e366d8b174..f0caeb6e42 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -3,13 +3,14 @@ package com.fr.design.mainframe.loghandler; import com.fr.base.BaseUtils; import com.fr.design.gui.ibutton.UIButton; import com.fr.general.Inter; +import com.fr.stable.script.Atom; import javax.swing.*; import java.awt.*; -import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; +import java.util.concurrent.atomic.AtomicBoolean; public class LogHandlerBar extends JPanel implements ItemSelectable { @@ -25,8 +26,6 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { private int SERVERNUM = 0; private boolean isWithSerious; - private int i; - private Timer timer; public LogHandlerBar() { this(null); @@ -86,35 +85,14 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { timerPaint(); } - private static final int UNKNOWN_COUNT = 5; - - public synchronized void timerPaint() { - isWithSerious = true; - timer = new Timer(500, null); - ActionListener taskAction = new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (i < UNKNOWN_COUNT) { - isWithSerious = (i & 1) == 0 ? true : false; - repaint(); - } else if (i == UNKNOWN_COUNT) { - if (timer == null) { - return; - } - timer.stop(); - timer = null; - i = 0; - isWithSerious = true; - return; - } - i++; - } - }; - if (timer != null) { - timer.addActionListener(taskAction); - } - // taskAction里还有可能置空timer. - if (timer != null) { - timer.start(); + + private AtomicBoolean painting = new AtomicBoolean(false); + + public void timerPaint() { + if(!painting.get()) { + painting.set(true); + repaint(); + painting.set(false); } } From ffe8977ddd97ab8864cde9e52d90e8febadc87a5 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 21 Jul 2017 09:44:39 +0800 Subject: [PATCH 081/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=A4=96=E6=A1=86=E6=9E=B6=E5=B7=A5=E5=85=B7=E6=9D=A1?= =?UTF-8?q?UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/icontainer/UIEastResizableContainer.java | 7 ++++--- .../com/fr/design/mainframe/EastRegionContainerPane.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java index 3a24e39027..85e11d8d7b 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -159,11 +159,12 @@ public class UIEastResizableContainer extends JPanel { return; } - topToolPane.setBounds(0, 0, containerWidth, topToolPaneHeight);//0,0,10,462 +// topToolPane.setBounds(0, 0, containerWidth, topToolPaneHeight);//0,0,10,462 + topToolPane.setBounds(0, 0, leftPaneWidth, topToolPaneHeight);//0,0,10,462 leftPane.setBounds(0, topToolPaneHeight, leftPaneWidth, getHeight() - topToolPaneHeight); // parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());//10,0,230,462 - rightPane.setBounds(leftPaneWidth, topToolPaneHeight, containerWidth-leftPaneWidth, getHeight() - topToolPaneHeight);//20,0,230,0 + rightPane.setBounds(leftPaneWidth, 0, containerWidth-leftPaneWidth, getHeight());//20,0,230,0 } @Override @@ -303,7 +304,7 @@ public class UIEastResizableContainer extends JPanel { } } // g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); - g.drawImage(button, 20, 7, 5, 5, null); + g.drawImage(button, 18, 7, 5, 5, null); } } diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index aac6850767..bdd03b3c57 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -175,7 +175,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } // leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS)); - leftPane.setBackground(Color.yellow); + leftPane.setBackground(new Color(210, 210, 210)); replaceLeftPane(leftPane); } From 6ad1e6adcf49779d83589cbd7f94e08183136714 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Fri, 21 Jul 2017 11:13:44 +0800 Subject: [PATCH 082/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/cell/bar/DynamicScrollBar.java | 6 + .../fr/design/mainframe/ElementCasePane.java | 2 - .../com/fr/design/mainframe/JWorkBook.java | 66 +++-- .../fr/design/mainframe/ReportComponent.java | 4 + .../mainframe/ReportComponentCardPane.java | 2 +- .../mainframe/ReportComponentComposite.java | 26 +- .../com/fr/design/present/BarCodePane.java | 11 + .../grid/AbstractGridHeaderMouseHandler.java | 35 +-- designer/src/com/fr/grid/Grid.java | 4 + designer/src/com/fr/grid/GridColumn.java | 20 +- .../com/fr/grid/GridColumnMouseHandler.java | 9 +- designer/src/com/fr/grid/GridHeader.java | 12 + designer/src/com/fr/grid/GridRow.java | 14 +- .../com/fr/design/mainframe/JSliderPane.java | 229 ++++++++++-------- .../com/fr/design/mainframe/JTemplate.java | 2 + .../src/com/fr/design/mainframe/FormArea.java | 36 +-- .../src/com/fr/design/mainframe/JForm.java | 5 + 17 files changed, 302 insertions(+), 181 deletions(-) diff --git a/designer/src/com/fr/design/cell/bar/DynamicScrollBar.java b/designer/src/com/fr/design/cell/bar/DynamicScrollBar.java index bf61f7a5e7..11f8e51b0d 100644 --- a/designer/src/com/fr/design/cell/bar/DynamicScrollBar.java +++ b/designer/src/com/fr/design/cell/bar/DynamicScrollBar.java @@ -59,6 +59,10 @@ public class DynamicScrollBar extends JScrollBar { }); } + public void setDpi(int dpi){ + this.dpi = dpi; + } + public ElementCasePane getReportPane() { return reportPane; } @@ -112,6 +116,8 @@ public class DynamicScrollBar extends JScrollBar { } } + + private abstract class DynamicScrollBarHelper extends BarHelper { protected abstract DynamicUnitList getSizeList(); diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index d55fcd4472..17dfa8442d 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -12,8 +12,6 @@ import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.event.*; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import java.lang.reflect.Constructor; import java.util.Set; diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 5978a506fd..0a75350676 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -1,9 +1,6 @@ package com.fr.design.mainframe; -import com.fr.base.BaseUtils; -import com.fr.base.DynamicUnitList; -import com.fr.base.FRContext; -import com.fr.base.Parameter; +import com.fr.base.*; import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.AllowAuthorityEditAction; @@ -14,6 +11,7 @@ import com.fr.design.actions.report.ReportExportAttrAction; import com.fr.design.actions.report.ReportMobileAttrAction; import com.fr.design.actions.report.ReportParameterAction; import com.fr.design.actions.report.ReportWebAttrAction; +import com.fr.design.cell.bar.DynamicScrollBar; import com.fr.design.constants.UIConstants; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.designer.TargetComponent; @@ -70,6 +68,7 @@ import com.fr.stable.module.Module; import com.fr.stable.project.ProjectConstants; import javax.swing.*; +import javax.swing.Icon; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileOutputStream; @@ -334,20 +333,51 @@ public class JWorkBook extends JTemplate { public void setScale(int resolution) { //更新resolution this.resolution = resolution; - reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setResolution(resolution); - //更新Grid - Grid grid = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid(); - DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); - DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); - grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); - grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().updateUI(); - //更新Column和Row - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().updateUI(); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().updateUI(); + if (reportComposite.centerCardPane.editingComponet.elementCasePane != null){ + reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setResolution(resolution); + //更新Grid + Grid grid = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid(); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); + grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); + grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().updateUI(); + //更新Column和Row + ((DynamicScrollBar)reportComposite.centerCardPane.editingComponet.elementCasePane.getVerticalScrollBar()).setDpi(resolution); + ((DynamicScrollBar)reportComposite.centerCardPane.editingComponet.elementCasePane.getHorizontalScrollBar()).setDpi(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().setResolution(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().updateUI(); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().setResolution(resolution); + reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().updateUI(); + } + if (reportComposite.centerCardPane.polyDezi != null){ + reportComposite.centerCardPane.polyDezi.setResolution(resolution); + reportComposite.centerCardPane.polyDezi.updateUI(); + } +// reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setVerticalValue(10); + + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); + } + @Override + public int selfAdaptUpdate(){ + ElementCasePane reportPane = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getElementCasePane(); + int column = reportPane.getSelection().getSelectedColumns()[0]; + double columnLength = reportPane.getSelection().getSelectedColumns().length; + double columnExtent = reportPane.getGrid().getHorizontalExtent(); + int row = reportPane.getSelection().getSelectedRows()[0]; + double rowLength = reportPane.getSelection().getSelectedRows().length; + double rowExtent = reportPane.getGrid().getVerticalExtent(); + if (columnLength == 0||rowLength == 0){ + return resolution; + } + double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); + if (reportPane.isHorizontalScrollBarVisible()) { + reportPane.getVerticalScrollBar().setValue(row); + reportPane.getHorizontalScrollBar().setValue(column); + } + + return (int) (time * reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getResolution()); } @Override diff --git a/designer/src/com/fr/design/mainframe/ReportComponent.java b/designer/src/com/fr/design/mainframe/ReportComponent.java index 6ca2685454..42342f24e7 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponent.java +++ b/designer/src/com/fr/design/mainframe/ReportComponent.java @@ -27,9 +27,13 @@ import com.fr.design.selection.Selectedable; */ public abstract class ReportComponent extends TargetComponent implements Selectedable { protected E elementCasePane; +// protected P polyElementCasePane; public E getEditingElementCasePane() { return elementCasePane; } +// public P getEditingPolyElementCasePane() { +// return polyElementCasePane; +// } public ReportComponent(T t) { super(t); } diff --git a/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java b/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java index 54c7f7657f..cc45cf5e90 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java @@ -25,7 +25,7 @@ public class ReportComponentCardPane extends JComponent implements TargetModifie private CardLayout cl; private WorkSheetDesigner sheetDezi; - private PolyDesigner polyDezi; + protected PolyDesigner polyDezi; public ReportComponentCardPane() { this.setLayout(cl = new CardLayout()); diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index d51db17709..36418924b8 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -1,11 +1,15 @@ package com.fr.design.mainframe; import java.awt.BorderLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.util.ArrayList; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JSplitPane; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -15,6 +19,7 @@ import com.fr.design.designer.EditingState; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.icontainer.UIModeControlContainer; +import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; import com.fr.grid.Grid; @@ -60,25 +65,28 @@ public class ReportComponentComposite extends JComponent { CellElementRegion = FRGUIPaneFactory.createBorderLayout_S_Pane(); this.add(CellElementRegion, BorderLayout.NORTH); this.add(createSouthControlPane(), BorderLayout.SOUTH); - jSliderContainer.getShowVal().getDocument().addDocumentListener(jSliderContainerListener); + jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener); + jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener); } - DocumentListener jSliderContainerListener = new DocumentListener() { + ChangeListener showValSpinnerChangeListener = new ChangeListener() { @Override - public void insertUpdate(DocumentEvent e) { - double value = Integer.parseInt(jSliderContainer.getShowVal().getText().substring(0, jSliderContainer.getShowVal().getText().indexOf("%"))); + public void stateChanged(ChangeEvent e) { + double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); value = value>MAX ? MAX : value; value = value { addlistener(); } + public static void main(String[] args){ + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel)jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new BarCodePane(),BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(270, 400); + jf.setVisible(true); + } + private void initComponents() { barCodePreviewPane = new BarCodePreviewPane(); this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(1, 1, 100, 0.1)); diff --git a/designer/src/com/fr/grid/AbstractGridHeaderMouseHandler.java b/designer/src/com/fr/grid/AbstractGridHeaderMouseHandler.java index 42f7417b54..b68ddd197a 100644 --- a/designer/src/com/fr/grid/AbstractGridHeaderMouseHandler.java +++ b/designer/src/com/fr/grid/AbstractGridHeaderMouseHandler.java @@ -41,7 +41,6 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { protected static final int SEPARATOR_GAP = 5; private GridHeader gHeader; - private int dragType = GridUtils.DRAG_NONE; //james 是否为选定多行的drag private boolean isMultiSelectDragPermited = false; @@ -53,10 +52,16 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { private int dragIndex = 0; private JToolTip tip = null; private JWindow tipWindow = null; + protected int resolution = ScreenResolution.getScreenResolution(); public AbstractGridHeaderMouseHandler(GridHeader gHeader) { this.gHeader = gHeader; - } + if (gHeader instanceof GridColumn){ + this.resolution = ((GridColumn)gHeader).getResolution(); + }else { + this.resolution = ((GridRow)gHeader).getResolution(); + } + } public void setStartMultiSelectIndex(int index) { this.startMultiSelectIndex = index; @@ -98,7 +103,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { @Override public boolean run(MouseEvent evt, int index, double tmpSize1, double tmpSize2, int tmpIncreaseSize, int oldEndValueSize, ElementCase report, DynamicUnitList sizeList) { - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); // richer:这边这么做的原因是调整了行高列宽后需要通知聚合块改变边界 Method method = null; try { @@ -142,7 +147,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { private ScrollAction PRESS_ACTION = new ScrollAction() { @Override public boolean run(MouseEvent evt, int index, double tmpSize1, double tmpSize2, int tmpIncreaseSize, int oldEndValueSize, ElementCase report, DynamicUnitList sizeList) { - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); if (isOnSeparatorLineIncludeZero(evt, tmpSize2, tmpIncreaseSize) || isOnNormalSeparatorLine(evt, tmpSize2)) { dragType = GridUtils.DRAG_CELL_SIZE; @@ -177,7 +182,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { double tmpIncreaseSize = 0; double oldEndValueSize = 0; - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); for (int index = beginValue; index < endValue; index++) { // denny: // beginValue @@ -215,7 +220,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { ePane.getGrid().stopEditing();// james 停止当前的所有编辑 // peter:选中格子位置. - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(ePane, evt.getX(), evt.getY()); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(ePane, evt.getX(), evt.getY(),resolution); iterateScrollBar(ePane, evt, PRESS_ACTION); @@ -255,7 +260,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { * @param evtY */ private void doShiftSelectHeader(ElementCasePane ePane, double evtX, double evtY) { - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(ePane, evtX, evtY); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(ePane, evtX, evtY, resolution); int selectedCellPointX = selectedCellPoint.getColumn();// column. int selectedCellPointY = selectedCellPoint.getRow();// row. CellSelection cs = ((CellSelection) ePane.getSelection()).clone(); @@ -294,7 +299,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { private String createToolTipString(double doubleValue, double totalDoubleValue) { int unitType = DesignerEnvManager.getEnvManager().getReportLengthUnit(); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); FU ulen = FU.valueOfPix((int) doubleValue, resolution); FU tulen = FU.valueOfPix((int) totalDoubleValue, resolution); String unit; @@ -317,11 +322,11 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { unit = Inter.getLocText("Unit_MM"); } StringBuilder sb = new StringBuilder(); - sb.append(Utils.convertNumberStringToString(new Float(len))) - .append('/').append(Utils.convertNumberStringToString(new Float(tlen))) + sb.append(String.format("%.2f", new Double(len))) + .append('/').append(String.format("%.2f", new Double(tlen))) .append(unit).append('(') - .append(Utils.doubleToString(doubleValue)).append('/') - .append(Utils.doubleToString(totalDoubleValue)) + .append((int)(doubleValue)).append('/') + .append((int)(totalDoubleValue)) .append(Inter.getLocText("px")) .append(')'); return sb.toString(); @@ -401,7 +406,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { if (!this.isMultiSelectDragPermited) { return; } - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow(ePane, evt.getX(), evt.getY()); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(ePane, evt.getX(), evt.getY(), resolution); endMultiSelectIndex = getColumnOrRowByGridHeader(selectedCellPoint); resetGridSelectionByDrag(cs, ePane, startMultiSelectIndex, endMultiSelectIndex); cs.setSelectedType(doChooseFrom()); @@ -421,7 +426,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { iterateScrollBar(ePane, evt, DRAG_ACTION); DynamicUnitList sizeList = getSizeList(report); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); this.setToolTipText2(this.createToolTipString(sizeList.get(dragIndex).toPixD(resolution), sizeList.getRangeValue(0, dragIndex + 1).toPixD(resolution))); } @@ -472,7 +477,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter { double tmpSize1 = 0; double tmpSize2; double tmpIncreaseSize = 0; - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); for (int i = beginValue; i < endValue; i++) { if (i == 0) { diff --git a/designer/src/com/fr/grid/Grid.java b/designer/src/com/fr/grid/Grid.java index 6bade0e2e4..01a2bb1d84 100644 --- a/designer/src/com/fr/grid/Grid.java +++ b/designer/src/com/fr/grid/Grid.java @@ -141,6 +141,10 @@ public class Grid extends BaseGridComponent { this.resolution = resolution; } + public int getResolution() { + return this.resolution; + } + /** * 应用界面设置 * diff --git a/designer/src/com/fr/grid/GridColumn.java b/designer/src/com/fr/grid/GridColumn.java index eedf8bcaf2..165a5727a9 100644 --- a/designer/src/com/fr/grid/GridColumn.java +++ b/designer/src/com/fr/grid/GridColumn.java @@ -10,6 +10,7 @@ import com.fr.base.ScreenResolution; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.GridUIProcessor; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.JSliderPane; import com.fr.stable.StableUtils; import javax.swing.plaf.ComponentUI; @@ -22,11 +23,15 @@ import javax.swing.plaf.ComponentUI; */ public class GridColumn extends GridHeader { - private int resolution = ScreenResolution.getScreenResolution(); + public int resolution = ScreenResolution.getScreenResolution(); + + private GridColumnMouseHandler gridColumnMouseHandler; @Override protected void initByConstructor() { - GridColumnMouseHandler gridColumnMouseHandler = new GridColumnMouseHandler(this); + resolution = ScreenResolution.getScreenResolution(); + this.setResolution(resolution); + gridColumnMouseHandler = new GridColumnMouseHandler(this); this.addMouseListener(gridColumnMouseHandler); this.addMouseMotionListener(gridColumnMouseHandler); this.updateUI(); @@ -39,6 +44,12 @@ public class GridColumn extends GridHeader { @Override public void updateUI() { + this.removeMouseListener(gridColumnMouseHandler); + this.removeMouseMotionListener(gridColumnMouseHandler); + gridColumnMouseHandler = new GridColumnMouseHandler(this); + this.addMouseListener(gridColumnMouseHandler); + this.addMouseMotionListener(gridColumnMouseHandler); +// gridColumnMouseHandler.setResolution(resolution); this.setUI(new GridColumnUI(resolution)); } @@ -46,6 +57,11 @@ public class GridColumn extends GridHeader { this.resolution = resolution; } + @Override + public int getResolution() { + return this.resolution; + } + /** * Gets the preferred size. */ diff --git a/designer/src/com/fr/grid/GridColumnMouseHandler.java b/designer/src/com/fr/grid/GridColumnMouseHandler.java index b7864bf051..2d93d01d29 100644 --- a/designer/src/com/fr/grid/GridColumnMouseHandler.java +++ b/designer/src/com/fr/grid/GridColumnMouseHandler.java @@ -9,6 +9,7 @@ import java.awt.event.MouseEvent; import javax.swing.SwingUtilities; import com.fr.base.DynamicUnitList; +import com.fr.base.ScreenResolution; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.mainframe.ElementCasePane; import com.fr.grid.selection.CellSelection; @@ -22,8 +23,15 @@ import com.fr.stable.ColumnRow; */ public class GridColumnMouseHandler extends AbstractGridHeaderMouseHandler { + private int resolution; + public GridColumnMouseHandler(GridColumn gridColumn) { super(gridColumn); + this.resolution = gridColumn.resolution; + } + + public void setResolution(int resolution){ + this.resolution = resolution; } @Override @@ -86,7 +94,6 @@ public class GridColumnMouseHandler extends AbstractGridHeaderMouseHandler { /** * Checks whether is on zero separator line. * - * @param evtX event x */ @Override protected boolean isOnSeparatorLineIncludeZero(MouseEvent evt, double tmpWidth2, double tmpIncreaseWidth) { diff --git a/designer/src/com/fr/grid/GridHeader.java b/designer/src/com/fr/grid/GridHeader.java index 754257e2f6..b0dca649da 100644 --- a/designer/src/com/fr/grid/GridHeader.java +++ b/designer/src/com/fr/grid/GridHeader.java @@ -1,5 +1,7 @@ package com.fr.grid; +import com.fr.base.ScreenResolution; + import java.awt.Color; @@ -12,6 +14,8 @@ public abstract class GridHeader extends BaseGridComponent { private Color selectedForeground = Color.black; private Color selectedBackground = new Color(253, 216, 153); + protected int resolution; + public GridHeader() { //清除所有的Key Action. this.getInputMap().clear(); @@ -23,6 +27,14 @@ public abstract class GridHeader extends BaseGridComponent { initByConstructor(); } + public void setResolution(int resolution){ + this.resolution = resolution; + } + + public int getResolution(){ + return this.resolution; + } + protected abstract void initByConstructor(); protected abstract T getDisplay(int index) ; diff --git a/designer/src/com/fr/grid/GridRow.java b/designer/src/com/fr/grid/GridRow.java index 4c42ce6306..28a97e1709 100644 --- a/designer/src/com/fr/grid/GridRow.java +++ b/designer/src/com/fr/grid/GridRow.java @@ -23,10 +23,13 @@ public class GridRow extends GridHeader { private static final int MAX = 5; private int resolution = ScreenResolution.getScreenResolution(); + private GridRowMouseHandler gridRowMouseHandler; @Override protected void initByConstructor() { - GridRowMouseHandler gridRowMouseHandler = new GridRowMouseHandler(this); + resolution = ScreenResolution.getScreenResolution(); + this.setResolution(resolution); + gridRowMouseHandler = new GridRowMouseHandler(this); this.addMouseListener(gridRowMouseHandler); this.addMouseMotionListener(gridRowMouseHandler); this.updateUI(); @@ -39,6 +42,11 @@ public class GridRow extends GridHeader { @Override public void updateUI() { + this.removeMouseListener(gridRowMouseHandler); + this.removeMouseMotionListener(gridRowMouseHandler); + gridRowMouseHandler = new GridRowMouseHandler(this); + this.addMouseListener(gridRowMouseHandler); + this.addMouseMotionListener(gridRowMouseHandler); this.setUI(new GridRowUI(resolution)); } @@ -46,6 +54,10 @@ public class GridRow extends GridHeader { this.resolution = resolution; } + public int getResolution() { + return this.resolution; + } + /** * Gets the preferred size. diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 18ab15a0bc..c4cdf377f4 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -1,11 +1,15 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.islider.UISlider; +import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; @@ -13,8 +17,6 @@ import javax.swing.*; import javax.swing.border.MatteBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.*; import java.awt.event.*; @@ -29,6 +31,9 @@ public class JSliderPane extends JPanel { private static final int SIX = 6; private static final int TEN = 10; private static final int ONEEIGHT = 18; + private static final int FONTSIZE = 14; + private static final int SPINNERWIDTH= 45; + private static final int SPINNERHEIGHT = 20; private static final int TWOFIVE = 25; private static final int FOURTEN = 40; private static final int HALFHUNDRED = 50; @@ -37,11 +42,14 @@ public class JSliderPane extends JPanel { private static final int THREEHUNDRED = 300; private static final int FOURHUNDRED = 400; private static final int DIALOGWIDTH = 150; - private static final int DIALOGHEIGHT = 200; + private static final int DIALOGHEIGHT = 240; + private static final int SHOWVALBUTTONWIDTH = 70; + private static final int SHOWVALBUTTONHEIGHTH = 25; public int showValue = 100; public double resolutionTimes = 1.0; private static JSliderPane THIS; private UITextField showVal; + private JSpinner showValSpinner; private UISlider slider; private int times; private int sliderValue; @@ -59,6 +67,7 @@ public class JSliderPane extends JPanel { private boolean isButtonOrIsTxt = true; private PopupPane dialog; private int upButtonX; + private JPanel dialogContentPanel; public JSliderPane() { @@ -67,11 +76,18 @@ public class JSliderPane extends JPanel { slider.setUI(new JSliderPaneUI(slider)); slider.addChangeListener(listener); - showVal = new UITextField(); - showVal.setText("100%"); - showVal.setPreferredSize(new Dimension(FOURTEN,ONEEIGHT)); - showVal.getDocument().addDocumentListener(showValDocumentListener); - + showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOURHUNDRED, 1)); + showValSpinner.setEnabled(true); + showValSpinner.addChangeListener(showValSpinnerChangeListener); + showValSpinner.setPreferredSize(new Dimension(SPINNERWIDTH, SPINNERHEIGHT)); + //MoMeak:控制只能输入10-400,但是用起来感觉不舒服,先注释掉吧 +// JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0"); +// showValSpinner.setEditor(editor); +// JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField(); +// textField.setEditable(true); +// DefaultFormatterFactory factory = (DefaultFormatterFactory) textField .getFormatterFactory(); +// NumberFormatter formatter = (NumberFormatter) factory.getDefaultFormatter(); +// formatter.setAllowsInvalid(false); downButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveDown.png")); upButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveUp.png")); downButton.setActionCommand("less"); @@ -79,25 +95,20 @@ public class JSliderPane extends JPanel { downButton.addActionListener(buttonActionListener); upButton.addActionListener(buttonActionListener); - JPanel panel = new JPanel(new FlowLayout(1,1,0)); - - showValButton = new UIButton(showVal.getText()); + showValButton = new UIButton(showValSpinner.getValue()+"%"); showValButton.setBorderPainted(false); - showValButton.setPreferredSize(new Dimension(HALFHUNDRED,TWOFIVE)); + showValButton.setPreferredSize(new Dimension(SHOWVALBUTTONWIDTH,SHOWVALBUTTONHEIGHTH)); + showValButton.addActionListener(showValButtonActionListener); - showValButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - popupDialog(); - } - }); + initUIRadioButton(); + initPane(); + JPanel panel = new JPanel(new FlowLayout(1,1,0)); panel.add(downButton); panel.add(slider); panel.add(upButton); panel.add(showValButton); this.add(panel,BorderLayout.NORTH); this.setBounds(0,0,THREEHUNDRED,ONEEIGHT); - } public static final JSliderPane getInstance() { @@ -116,6 +127,13 @@ public class JSliderPane extends JPanel { twoFiveButton = new UIRadioButton("25%"); selfAdaptButton = new UIRadioButton(Inter.getLocText("FR-Designer_Scale_selfAdaptButton")); customButton = new UIRadioButton(Inter.getLocText("FR-Designer_Scale_customButton")); + twoHundredButton.addItemListener(radioButtonItemListener); + oneHundredButton.addItemListener(radioButtonItemListener); + SevenFiveButton.addItemListener(radioButtonItemListener); + fiveTenButton.addItemListener(radioButtonItemListener); + twoFiveButton.addItemListener(radioButtonItemListener); + //TODO +// selfAdaptButton.addItemListener(); ButtonGroup bg=new ButtonGroup();// 初始化按钮组 bg.add(twoHundredButton);// 加入按钮组 @@ -125,8 +143,53 @@ public class JSliderPane extends JPanel { bg.add(twoFiveButton); bg.add(selfAdaptButton); bg.add(customButton); + customButton.setSelected(true); + } + + private void initPane(){ + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, f }; + double[] rowSize = { p,p,p,p,p,p,p}; + Component[][] components = new Component[][]{ + new Component[]{twoHundredButton,null}, + new Component[]{oneHundredButton,null}, + new Component[]{SevenFiveButton,null}, + new Component[]{fiveTenButton,null}, + new Component[]{twoFiveButton,null}, + new Component[]{selfAdaptButton,null}, + new Component[]{customButton,createSpinnerPanel()} + }; + dialogContentPanel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + } + + private JPanel createSpinnerPanel(){ + JPanel spinnerPanel = new JPanel(new FlowLayout()); + spinnerPanel.add(showValSpinner); + UILabel percent = new UILabel("%"); + percent.setFont(new Font("Dialog", Font.PLAIN, FONTSIZE)); + spinnerPanel.add(percent); + return spinnerPanel; } + ActionListener showValButtonActionListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popupDialog(); + } + }; + + ChangeListener showValSpinnerChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + int val = (int) ((UIBasicSpinner)e.getSource()).getValue(); + isButtonOrIsTxt = true; + resolutionTimes = divide(showValue,100,2); + refreshSlider(val); + refreshBottun(val); + } + }; + //定义一个监听器,用于监听所有滑动条 ChangeListener listener = new ChangeListener() @@ -134,13 +197,13 @@ public class JSliderPane extends JPanel { public void stateChanged( ChangeEvent event) { //取出滑动条的值,并在文本中显示出来 if (!isButtonOrIsTxt){ - JSlider source = (JSlider) event.getSource(); + customButton.setSelected(true); EventQueue.invokeLater(new Runnable() { public void run() { sliderValue = slider.getValue(); getTimes(sliderValue); showValue = times; - showVal.setText(times + "%"); + showValSpinner.setValue(times); } }); }else { @@ -149,28 +212,18 @@ public class JSliderPane extends JPanel { } }; - DocumentListener showValDocumentListener = new DocumentListener() { + ItemListener radioButtonItemListener = new ItemListener() { @Override - public void insertUpdate(DocumentEvent e) { - isButtonOrIsTxt = true; - resolutionTimes = divide(showValue,100,2); - refreshSlider(); - refreshBottun(); - } - - @Override - public void removeUpdate(DocumentEvent e) { -// refreshSlider(); - } - - @Override - public void changedUpdate(DocumentEvent e) { -// refreshSlider(); + public void itemStateChanged(ItemEvent e) { + JRadioButton temp=(JRadioButton)e.getSource(); + if(temp.isSelected()){ + showValSpinner.setValue(Integer.valueOf(temp.getText().substring(0, temp.getText().indexOf("%")))); + } } }; - private void refreshSlider(){ - showValue = Integer.parseInt(showVal.getText().substring(0, showVal.getText().indexOf("%"))); + private void refreshSlider(int val){ + showValue = val; if (showValue >HUNDRED){ slider.setValue((int)(showValue+TWOHUNDRED)/SIX); }else if (showValue = TEN ){ showValue = newDownVal; - showVal.setText(newDownVal + "%"); + showValSpinner.setValue(newDownVal); }else { showValue = newDownVal; - showVal.setText(TEN + "%"); + showValSpinner.setValue(TEN); } } if(e.getActionCommand().equals("more")){ int newUpVal = showValue + TEN; if (newUpVal <= FOURHUNDRED ){ showValue = newUpVal; - showVal.setText(newUpVal + "%"); + showValSpinner.setValue(newUpVal); }else { showValue = newUpVal; - showVal.setText(FOURHUNDRED + "%"); + showValSpinner.setValue(FOURHUNDRED); } } isButtonOrIsTxt = true; + customButton.setSelected(true); } }; @@ -241,38 +295,42 @@ public class JSliderPane extends JPanel { } - public UITextField getShowVal(){ - return this.showVal; + public JSpinner getShowVal(){ + return this.showValSpinner; + } + + public UIRadioButton getSelfAdaptButton(){ + return this.selfAdaptButton; } private void popupDialog(){ Point btnCoords = upButton.getLocationOnScreen(); if (dialog == null){ - dialog = new PopupPane(upButton,showVal); + dialog = new PopupPane(upButton,dialogContentPanel); if (upButtonX == 0) { upButtonX = btnCoords.x; - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +HALFHUNDRED, -DIALOGHEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() + SHOWVALBUTTONWIDTH , -DIALOGHEIGHT); } }else { if (upButtonX == 0) { upButtonX = btnCoords.x; - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +HALFHUNDRED, -DIALOGHEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +SHOWVALBUTTONWIDTH, -DIALOGHEIGHT); } else { - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +HALFHUNDRED, -DIALOGHEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +SHOWVALBUTTONWIDTH, -DIALOGHEIGHT); } } } public static void main(String[] args) { - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel)jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(JSliderPane.getInstance(),BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(400, 80); - jf.setVisible(true); +// JFrame jf = new JFrame("test"); +// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// JPanel content = (JPanel)jf.getContentPane(); +// content.setLayout(new BorderLayout()); +// content.add(JSliderPane.getInstance(),BorderLayout.CENTER); +// GUICoreUtils.centerWindow(jf); +// jf.setSize(400, 80); +// jf.setVisible(true); } } @@ -345,66 +403,25 @@ class JSliderPaneUI extends BasicSliderUI { } } -class Dialog extends JDialog { -// private Container container; -// private static final int UPLABELHEIGHT = 25; -// private static final int HALFHUNDRED = 50; -// private static final int DIALOGWIDTH = 150; -// private static final int DIALOGHEIGHT = 200; -// private static final int UPLABELWIDTH = 300; -// private int minHeight; // 对话框最小高度 -// private JComponent contentPane; -// private JComponent centerPane; -// private UILabel upLabel; - -// public Dialog(UIButton b,UITextField j) { -// super(DesignerContext.getDesignerFrame()); -// container = getContentPane(); -// setUndecorated(true); -// contentPane = new JPanel(new BorderLayout()); -// centerPane = new JPanel(new BorderLayout()); -// upLabel = new UILabel(Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); -// upLabel.setOpaque(true); -// upLabel.setPreferredSize(new Dimension(UPLABELWIDTH,UPLABELHEIGHT)); -// upLabel.setBackground(Color.LIGHT_GRAY); -// upLabel.setBorder(BorderFactory.createLineBorder(Color.gray,1)); -// upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); -// centerPane.add(j,BorderLayout.NORTH); -// contentPane.add(upLabel,BorderLayout.NORTH); -// contentPane.add(centerPane,BorderLayout.CENTER); -//// contentPane.setBorder(BorderFactory.createLineBorder(Color.gray,1)); -// contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); -//// contentPane.add(new JPanel()) -// container.add(contentPane, BorderLayout.CENTER); -// minHeight = container.getPreferredSize().height; -// setSize(DIALOGWIDTH, DIALOGHEIGHT); -//// validate(); -// Point btnCoords = b.getLocationOnScreen(); -// -// this.setLocation(btnCoords.x - DIALOGWIDTH + b.getWidth() +HALFHUNDRED, btnCoords.y -DIALOGHEIGHT); -//// initListener(); -// -// this.setVisible(true); -// } -} + class PopupPane extends JPopupMenu { private JComponent contentPane; private static final int UPLABELHEIGHT = 25; private static final int HALFHUNDRED = 50; private static final int DIALOGWIDTH = 150; - private static final int DIALOGHEIGHT = 200; + private static final int DIALOGHEIGHT = 240; private static final int UPLABELWIDTH = 300; private JComponent centerPane; private UILabel upLabel; - PopupPane(UIButton b,UITextField j) { + PopupPane(UIButton b,JPanel dialogContentPanel) { contentPane = new JPanel(new BorderLayout()); centerPane = new JPanel(new BorderLayout()); - upLabel = new UILabel(Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); + upLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); upLabel.setOpaque(true); upLabel.setPreferredSize(new Dimension(UPLABELWIDTH,UPLABELHEIGHT)); upLabel.setBackground(Color.LIGHT_GRAY); upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); - centerPane.add(j,BorderLayout.NORTH); + centerPane.add(dialogContentPanel,BorderLayout.NORTH); contentPane.add(upLabel,BorderLayout.NORTH); contentPane.add(centerPane,BorderLayout.CENTER); // contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index a5023be824..309fac533d 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -217,6 +217,8 @@ public abstract class JTemplate> ex public abstract int getScale(); + public abstract int selfAdaptUpdate(); + protected abstract DesignModelAdapter createDesignModel(); /** diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index 0d0e05f045..b7853183e1 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -31,6 +31,7 @@ import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.frpane.UINumberSlidePane; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -153,11 +154,13 @@ public class FormArea extends JComponent implements ScrollRulerComponent { private void initTransparent() { initCalculateSize(); - slidePane.getShowVal().getDocument().addDocumentListener(new DocumentListener() { - @Override - public void insertUpdate(DocumentEvent e) { -// slidePane.getShowVal().getDocument() - double value = Integer.parseInt(slidePane.getShowVal().getText().substring(0, slidePane.getShowVal().getText().indexOf("%"))); + slidePane.getShowVal().addChangeListener(showValSpinnerChangeListener); + } + + ChangeListener showValSpinnerChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); value = value>SHOWVALMAX ? SHOWVALMAX : value; value = value implements BaseJForm { return 0; } + @Override + public int selfAdaptUpdate() { + return 0; + } + /** * 创建权限细粒度编辑面板 * From 07c5057047bbbaf766d03aa2c3d2914557131eb7 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 21 Jul 2017 14:06:42 +0800 Subject: [PATCH 083/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=B0=86?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5=E9=9D=A2=E6=9D=BF=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8D=95=E4=BE=8B=EF=BC=8C=E6=8F=92=E5=85=A5=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 3 + .../com/fr/design/mainframe/JWorkBook.java | 6 ++ .../mainframe/ReportHyperlinkGroupPane.java | 55 +++++++++++++++++++ .../design/gui/frpane/HyperlinkGroupPane.java | 3 +- .../mainframe/EastRegionContainerPane.java | 8 +++ .../com/fr/design/mainframe/JTemplate.java | 4 +- .../gui/xpane/FormHyperlinkGroupPane.java | 16 +++++- .../src/com/fr/design/mainframe/JForm.java | 2 +- 8 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 4336282091..f515643be2 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -58,6 +58,8 @@ public class ElementCasePaneDelegate extends ElementCasePane { QuickEditorRegion.getInstance().populate(getCurrentEditor()); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if (editingTemplate != null && !editingTemplate.isUpMode()) { + // 模板初始化完成后,才能初始化超级链接面板 + ReportHyperlinkGroupPane.getInstance().populate(ElementCasePaneDelegate.this); if (((ElementCasePaneDelegate)e.getSource()).getSelection() instanceof FloatSelection) { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT); // EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); @@ -66,6 +68,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); + EastRegionContainerPane.getInstance().replaceHyperlinkPane(ReportHyperlinkGroupPane.getInstance()); } EastRegionContainerPane.getInstance().removeParameterPane(); } diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 5978a506fd..11ceb595d5 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -23,6 +23,7 @@ import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.fun.PreviewProvider; +import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIModeControlContainer; import com.fr.design.gui.imenu.UIMenuItem; @@ -755,6 +756,11 @@ public class JWorkBook extends JTemplate { return true; } + @Override + public HyperlinkGroupPane getHyperLinkPane() { + return ReportHyperlinkGroupPane.getInstance(); + } + public void setAuthorityMode(boolean isUpMode) { centerPane.setAuthorityMode(isUpMode); } diff --git a/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java new file mode 100644 index 0000000000..64c397da1b --- /dev/null +++ b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java @@ -0,0 +1,55 @@ +package com.fr.design.mainframe; + +import com.fr.design.gui.frpane.HyperlinkGroupPane; +import com.fr.grid.selection.CellSelection; +import com.fr.grid.selection.FloatSelection; +import com.fr.grid.selection.Selection; +import com.fr.js.NameJavaScriptGroup; +import com.fr.report.cell.CellElement; +import com.fr.report.cell.FloatElement; +import com.fr.report.elementcase.TemplateElementCase; + +/** + * Created by plough on 2017/7/21. + */ +public class ReportHyperlinkGroupPane extends HyperlinkGroupPane { + private static ReportHyperlinkGroupPane singleton; + + private ReportHyperlinkGroupPane() { + super(); + } + + public synchronized static ReportHyperlinkGroupPane getInstance() { + if (singleton == null) { + singleton = new ReportHyperlinkGroupPane(); + } + return singleton; + } + + public void populate(ElementCasePane reportPane) { +// TemplateElementCase elementCase = ePane.getEditingElementCase(); +// if (elementCase == null) { +// return; +// } +// ePane.getSelection().populatePropertyPane(ePane); + final TemplateElementCase report = reportPane.getEditingElementCase(); + NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report); + populate(nameHyperlinks); + } + + private NameJavaScriptGroup getNameJSGroup(ElementCasePane reportPane, final TemplateElementCase report) { + NameJavaScriptGroup nameHyperlinks = null; + final Selection sel = reportPane.getSelection(); + if (sel instanceof FloatSelection) { + FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)sel).getSelectedFloatName()); + nameHyperlinks = selectedFloatElement.getNameHyperlinkGroup(); + } else { + CellElement editCellElement = report.getCellElement(((CellSelection)sel).getColumn(), ((CellSelection)sel).getRow()); + if (editCellElement != null) { + nameHyperlinks = editCellElement.getNameHyperlinkGroup(); + } + } + + return nameHyperlinks; + } +} diff --git a/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java b/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java index 3408bf371d..d0a824074a 100644 --- a/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java @@ -23,8 +23,7 @@ import java.util.Set; * @author kunsnat E-mail:kunsnat@gmail.com * @version 创建时间:2013-6-25 上午11:17:57 */ -public class HyperlinkGroupPane extends JListControlPane { - +public abstract class HyperlinkGroupPane extends JListControlPane { /** * 生成添加按钮的NameableCreator * diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index bdd03b3c57..5970c60ead 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -267,6 +267,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return propertyItemMap.get(KEY_WIDGET_SETTINGS).getContentPane(); } + public void replaceHyperlinkPane(JComponent pane) { + propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(pane); + } + + public JComponent getHyperlinkPane() { + return propertyItemMap.get(KEY_HYPERLINK).getContentPane(); + } + public void replaceWidgetLibPane(JComponent pane) { propertyItemMap.get(KEY_WIDGET_LIB).replaceContentPane(pane); } diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index a5023be824..72778113b1 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -867,9 +867,7 @@ public abstract class JTemplate> ex * 返回当前支持的超链界面pane * @return 超链连接界面 */ - public HyperlinkGroupPane getHyperLinkPane() { - return new HyperlinkGroupPane(); - } + public abstract HyperlinkGroupPane getHyperLinkPane(); /** * 是否是图表 diff --git a/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java b/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java index 773446f5af..61b0c7aa96 100644 --- a/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java +++ b/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java @@ -8,8 +8,20 @@ import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.js.EmailJavaScript; -public class FormHyperlinkGroupPane extends HyperlinkGroupPane{ - +public class FormHyperlinkGroupPane extends HyperlinkGroupPane{ + private static FormHyperlinkGroupPane singleton; + + private FormHyperlinkGroupPane() { + super(); + } + + public synchronized static FormHyperlinkGroupPane getInstance() { + if (singleton == null) { + singleton = new FormHyperlinkGroupPane(); + } + return singleton; + } + /** * 生成添加按钮的NameableCreator * 由于表单报表块的单元格超链和单元格条件属性超链中的emailPane都要用表单的emailPane,这里调整下 diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 234dad22fa..7de4557cfb 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -124,7 +124,7 @@ public class JForm extends JTemplate implements BaseJForm { * @return 超链连接界面 */ public HyperlinkGroupPane getHyperLinkPane() { - return new FormHyperlinkGroupPane(); + return FormHyperlinkGroupPane.getInstance(); } //表单返回 FORM_TAB or ELEMENTCASE_TAB From 92206ac3d8cf324de854aeff507c97b972e98a62 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 21 Jul 2017 14:13:44 +0800 Subject: [PATCH 084/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=85=83=E7=B4=A0=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5?= =?UTF-8?q?tab=E6=94=B9=E4=B8=BA=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/ElementCasePaneDelegate.java | 2 +- .../src/com/fr/design/mainframe/EastRegionContainerPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index f515643be2..5253999ac8 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -68,8 +68,8 @@ public class ElementCasePaneDelegate extends ElementCasePane { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); - EastRegionContainerPane.getInstance().replaceHyperlinkPane(ReportHyperlinkGroupPane.getInstance()); } + EastRegionContainerPane.getInstance().replaceHyperlinkPane(ReportHyperlinkGroupPane.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); } } diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 5970c60ead..a0a3b8828d 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -106,7 +106,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 超级链接 PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"), "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); // 组件库 PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), "/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.FORM}, From 4929f8efad92520801d79bc2583ef1dc1e1e9df2 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 21 Jul 2017 16:50:17 +0800 Subject: [PATCH 085/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E6=96=B0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=9D=A2=E6=9D=BF=E9=9B=8F=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIControlPane.java | 232 +++++ .../gui/controlpane/UIListControlPane.java | 945 ++++++++++++++++++ .../UINameableListCellRenderer.java | 146 +++ .../design/gui/frpane/HyperlinkGroupPane.java | 3 +- 4 files changed, 1325 insertions(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java create mode 100644 designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java create mode 100644 designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java new file mode 100644 index 0000000000..f67512d92f --- /dev/null +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -0,0 +1,232 @@ +package com.fr.design.gui.controlpane; + +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itoolbar.UIToolbar; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.Nameable; + +import javax.swing.*; +import java.awt.*; + +/** + * Created by plough on 2017/7/21. + */ +public abstract class UIControlPane extends BasicPane implements UnrepeatedNameHelper { + protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30 + protected JPanel controlUpdatePane; + + private ShortCut4JControlPane[] shorts; + private NameableCreator[] creators; + private ToolBarDef toolbarDef; + + private UIToolbar toolBar; + // peter:这是整体的一个cardLayout Pane + protected CardLayout cardLayout; + + protected JPanel cardPane; + + public UIControlPane() { + this.initComponentPane(); + } + + /** + * 生成添加按钮的NameableCreator + * + * @return 按钮的NameableCreator + */ + public abstract NameableCreator[] createNameableCreators(); + + public ShortCut4JControlPane[] getShorts() { + return shorts; + } + + public void setShorts(ShortCut4JControlPane[] shorts) { + this.shorts = shorts; + } + + public void setCreators(NameableCreator[] creators) { + this.creators = creators; + } + + public ToolBarDef getToolbarDef() { + return toolbarDef; + } + + public void setToolbarDef(ToolBarDef toolbarDef) { + this.toolbarDef = toolbarDef; + } + + public UIToolbar getToolBar() { + return toolBar; + } + + public void setToolBar(UIToolbar toolBar) { + this.toolBar = toolBar; + } + + public CardLayout getCardLayout() { + return cardLayout; + } + + public void setCardLayout(CardLayout cardLayout) { + this.cardLayout = cardLayout; + } + + public JPanel getCardPane() { + return cardPane; + } + + public void setCardPane(JPanel cardPane) { + this.cardPane = cardPane; + } + + protected void initComponentPane() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.creators = this.createNameableCreators(); + this.controlUpdatePane = createControlUpdatePane(); + + // p: edit card layout + this.cardLayout = new CardLayout(); + cardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + cardPane.setLayout(this.cardLayout); + // p:选择的Label + UILabel selectLabel = new UILabel(); + cardPane.add(selectLabel, "SELECT"); + cardPane.add(controlUpdatePane, "EDIT"); + // SplitPane +// JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane); +// mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); +// mainSplitPane.setOneTouchExpandable(true); + + this.add(getLeftPane(), BorderLayout.CENTER); +// mainSplitPane.setDividerLocation(getLeftPreferredSize()); + this.checkButtonEnabled(); + } + + protected abstract JPanel createControlUpdatePane(); + + protected JPanel getLeftPane() { + // LeftPane + JPanel leftPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + + JPanel leftContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + initLeftPane(leftContentPane); + leftPane.add(leftContentPane, BorderLayout.CENTER); + + shorts = this.createShortcuts(); + if (ArrayUtils.isEmpty(shorts)) { + return leftPane; + } + + toolbarDef = new ToolBarDef(); + for (ShortCut4JControlPane sj : shorts) { + toolbarDef.addShortCut(sj.getShortCut()); + } + toolBar = ToolBarDef.createJToolBar(); + toolbarDef.updateToolBar(toolBar); + leftContentPane.add(toolBar, BorderLayout.NORTH); + + // 顶部标签及add按钮 + UIToolbar topToolBar = new UIToolbar(); + topToolBar.setLayout(new BorderLayout()); + ShortCut addItem = addItemShortCut().getShortCut(); + addItem.intoJToolBar(topToolBar); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, f }; + double[] rowSize = { p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel("add hyperlink "), topToolBar}, + }; + JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + leftPane.add(leftTopPane, BorderLayout.NORTH); + + return leftPane; + } + + /** + * 初始化左边面板 + */ + protected void initLeftPane(JPanel leftPane) { + + } + + protected int getLeftPreferredSize() { + return shorts.length * SHORT_WIDTH; + } + + + protected ShortCut4JControlPane[] createShortcuts() { + return new ShortCut4JControlPane[]{ +// addItemShortCut(), + copyItemShortCut(), + moveUpItemShortCut(), + moveDownItemShortCut(), + sortItemShortCut(), + removeItemShortCut() + }; + } + + protected abstract ShortCut4JControlPane addItemShortCut(); + + protected abstract ShortCut4JControlPane removeItemShortCut(); + + protected abstract ShortCut4JControlPane copyItemShortCut(); + + protected abstract ShortCut4JControlPane moveUpItemShortCut(); + + protected abstract ShortCut4JControlPane moveDownItemShortCut(); + + protected abstract ShortCut4JControlPane sortItemShortCut(); + + public abstract Nameable[] update(); + + + public void populate(Nameable[] nameableArray) { + } + + /** + * 检查按钮可用状态 Check button enabled. + */ + public void checkButtonEnabled() { + } + + protected void doBeforeRemove() { + } + + protected void doAfterRemove() { + } + + public NameableCreator[] creators() { + return creators == null ? new NameableCreator[0] : creators; + } + + protected abstract boolean hasInvalid(boolean isAdd); + + /** + * 刷新 NameableCreator + * + * @param creators 生成器 + */ + public void refreshNameableCreator(NameableCreator[] creators) { + this.creators = creators; + shorts = this.createShortcuts(); + toolbarDef.clearShortCuts(); + for (ShortCut4JControlPane sj : shorts) { + toolbarDef.addShortCut(sj.getShortCut()); + } + + toolbarDef.updateToolBar(toolBar); + toolBar.validate(); + toolBar.repaint(); + this.repaint(); + } +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java new file mode 100644 index 0000000000..c36a7902c2 --- /dev/null +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -0,0 +1,945 @@ +package com.fr.design.gui.controlpane; + +import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.design.actions.UpdateAction; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.icontainer.UIScrollPane; +import com.fr.design.gui.ilist.JNameEdList; +import com.fr.design.gui.ilist.ListModelElement; +import com.fr.design.gui.ilist.ModNameActionListener; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.JTemplate; +import com.fr.design.menu.LineSeparator; +import com.fr.design.menu.MenuDef; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.Nameable; +import com.fr.stable.core.PropertyChangeAdapter; +import sun.swing.DefaultLookup; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.Comparator; + +/** + * Created by plough on 2017/7/19. + */ + +public abstract class UIListControlPane extends UIControlPane { + public static final String LIST_NAME = "UIControl_List"; + + protected JNameEdList nameableList; + protected int editingIndex; + protected String selectedName; + private boolean isNameRepeated = false; + + public UIListControlPane() { + this.initComponentPane(); + } + + @Override + protected JPanel createControlUpdatePane() { + return new JControlUpdatePane(); + } + + /** + * 生成添加按钮的NameableCreator + * + * @return 按钮的NameableCreator + */ + @Override + public abstract NameableCreator[] createNameableCreators(); + + + @Override + protected void initLeftPane(JPanel leftPane) { + nameableList = createJNameList(); + nameableList.setName(LIST_NAME); + leftPane.add(new UIScrollPane(nameableList), BorderLayout.CENTER); + + + nameableList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); + nameableList.addMouseListener(listMouseListener); + nameableList.addListSelectionListener(new ListSelectionListener() { + public void valueChanged(ListSelectionEvent evt) { + // richie:避免多次update和populate大大降低效率 + if (!evt.getValueIsAdjusting()) { + // shoc 切换的时候加检验 + if (hasInvalid(false)) { + return; + } + ((JControlUpdatePane) UIListControlPane.this.controlUpdatePane).update(); + ((JControlUpdatePane) UIListControlPane.this.controlUpdatePane).populate(); + UIListControlPane.this.checkButtonEnabled(); + } + } + }); + } + + public JNameEdList createJNameList() { + JNameEdList nameEdList = new JNameEdList(new DefaultListModel()) { + @Override + protected void doAfterLostFocus() { + UIListControlPane.this.updateControlUpdatePane(); + } + }; + nameEdList.setCellRenderer(new UINameableListCellRenderer(this)); + return nameEdList; + } + + public void updateControlUpdatePane() { + ((JControlUpdatePane) controlUpdatePane).update(); + } + + protected void doWhenPopulate(BasicBeanPane beanPane) { + + } + + protected void doBeforePopulate(ListModelElement el, Object obj) { + + } + + @Override + protected ShortCut4JControlPane addItemShortCut() { + ShortCut addItemShortCut; + NameableCreator[] creators = creators(); + if (creators.length == 1) { + addItemShortCut = new AddItemUpdateAction(creators); + } else { + addItemShortCut = new AddItemMenuDef(creators); + } + return new AbsoluteEnableShortCut(addItemShortCut); + } + + @Override + protected ShortCut4JControlPane removeItemShortCut() { + return new NormalEnableShortCut(new RemoveItemAction()); + } + + @Override + protected ShortCut4JControlPane copyItemShortCut() { + return new NormalEnableShortCut(new CopyItemAction()); + } + + @Override + protected ShortCut4JControlPane moveUpItemShortCut() { + return new NormalEnableShortCut(new MoveUpItemAction()); + } + + @Override + protected ShortCut4JControlPane moveDownItemShortCut() { + return new NormalEnableShortCut(new MoveDownItemAction()); + } + + @Override + protected ShortCut4JControlPane sortItemShortCut() { + return new NormalEnableShortCut(new SortItemAction()); + } + + public void setNameListEditable(boolean editable) { + this.nameableList.setEditable(editable); + } + + @Override + public Nameable[] update() { + java.util.List res = new java.util.ArrayList(); + ((JControlUpdatePane) this.controlUpdatePane).update(); + DefaultListModel listModel = (DefaultListModel) this.nameableList.getModel(); + for (int i = 0, len = listModel.getSize(); i < len; i++) { + res.add(((ListModelElement) listModel.getElementAt(i)).wrapper); + } + + return res.toArray(new Nameable[res.size()]); + } + + @Override + public void populate(Nameable[] nameableArray) { + DefaultListModel listModel = (DefaultListModel) this.nameableList.getModel(); + listModel.removeAllElements(); + if (ArrayUtils.isEmpty(nameableArray)) { + return; + } + + for (Nameable aNameableArray : nameableArray) { + listModel.addElement(new ListModelElement(aNameableArray)); + } + + if (listModel.size() > 0) { + this.nameableList.setSelectedIndex(0); + } + this.checkButtonEnabled(); + } + + /** + * 添加名字改变时的listener + * + * @param l 名字改变时的监听 + */ + public void addModNameActionListener(ModNameActionListener l) { + this.nameableList.addModNameActionListener(l); + } + + /** + * 添加Editinglistener + * + * @param l 监听 + */ + public void addEditingListner(PropertyChangeAdapter l) { + this.nameableList.addEditingListner(l); + } + + /* + * 刷新当前的选中的UpdatePane + */ + protected void populateSelectedValue() { + ((JControlUpdatePane) UIListControlPane.this.controlUpdatePane).populate(); + } + + /** + * 根据name,选中JNameEdList中的item + */ + public void setSelectedName(String name) { + DefaultListModel listModel = (DefaultListModel) this.nameableList.getModel(); + for (int i = 0, len = listModel.getSize(); i < len; i++) { + Nameable item = ((ListModelElement) listModel.getElementAt(i)).wrapper; + if (ComparatorUtils.equals(name, item.getName())) { + this.nameableList.setSelectedIndex(i); + break; + } + } + } + + public String getEditingName() { + return this.nameableList.getEditingName(); + } + + public Object getEditingType() { + return this.nameableList.getAllTypes()[editingIndex]; + } + + public void setWarnigText(int index) { + this.nameableList.setWarnigText(index); + } + + /** + * 获取选中的名字 + */ + public String getSelectedName() { + ListModelElement el = (ListModelElement) this.nameableList.getSelectedValue(); + + return el == null ? null : el.wrapper.getName(); + } + + protected boolean isNameRepeted(java.util.List[] list, String name) { + for (int i = 0; i < list.length; i++) { + if (list[i].contains(name)) { + isNameRepeated = true; + return true; + } + } + isNameRepeated = false; + return false; + } + + /** + * 名字是否重复 + * + * @return 重复则返回true + */ + public boolean isNameRepeated() { + return isNameRepeated; + } + + /** + * 添加 Nameable + * + * @param nameable 添加的Nameable + * @param index 序号 + */ + public void addNameable(Nameable nameable, int index) { + JNameEdList nameEdList = UIListControlPane.this.nameableList; + DefaultListModel model = (DefaultListModel) nameEdList.getModel(); + + ListModelElement el = new ListModelElement(nameable); + model.add(index, el); + nameableList.setSelectedIndex(index); + nameableList.ensureIndexIsVisible(index); + + nameEdList.repaint(); + } + + /** + * 是否重命名 + * + * @return 是则true + */ + public boolean isContainsRename() { + String rename = Inter.getLocText("FR-Please_Rename") + "!"; + String[] names = this.nameableList.getAllNames(); + for (int i = names.length - 1; i >= 0; i--) { + if (ComparatorUtils.equals(names[i], rename)) { + return true; + } + } + return false; + } + + protected DefaultListModel getModel() { + return (DefaultListModel) UIListControlPane.this.nameableList.getModel(); + } + + private String createUnrepeatedCopyName(String suffix) { + DefaultListModel model = this.getModel(); + String[] names = new String[model.getSize()]; + for (int i = 0; i < model.size(); i++) { + names[i] = ((ListModelElement) model.get(i)).wrapper.getName(); + } + String lastName = "CopyOf" + suffix; + while (ArrayUtils.contains(names, lastName)) { + lastName = "CopyOf" + lastName; + } + return lastName; + } + + + /** + * 生成不重复的名字 + * + * @param prefix 名字前缀 + * @return 名字 + */ + @Override + public String createUnrepeatedName(String prefix) { + DefaultListModel model = this.getModel(); + Nameable[] all = new Nameable[model.getSize()]; + for (int i = 0; i < model.size(); i++) { + all[i] = ((ListModelElement) model.get(i)).wrapper; + } + // richer:生成的名字从1开始. kunsnat: 添加属性从0开始. + int count = all.length + 1; + while (true) { + String name_test = prefix + count; + boolean repeated = false; + for (int i = 0, len = model.size(); i < len; i++) { + Nameable nameable = all[i]; + if (ComparatorUtils.equals(nameable.getName(), name_test)) { + repeated = true; + break; + } + } + + if (!repeated) { + return name_test; + } + + count++; + } + } + + /** + * 增加项的UpdateAction + */ + protected class AddItemUpdateAction extends UpdateAction { + final NameableCreator creator; + + public AddItemUpdateAction(NameableCreator[] creators) { + this.creator = creators[0]; + this.setName(Inter.getLocText("FR-Action_Add")); + this.setMnemonic('A'); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); + } + + @Override + public void actionPerformed(ActionEvent e) { + Nameable nameable = creator.createNameable(UIListControlPane.this); + + UIListControlPane.this.addNameable(nameable, getModel().getSize()); + } + } + + /* + * 增加项的MenuDef + */ + protected class AddItemMenuDef extends MenuDef { + public AddItemMenuDef(NameableCreator[] creators) { + this.setName(Inter.getLocText("FR-Action_Add")); + this.setMnemonic('A'); + this.setIconPath("/com/fr/design/images/control/addPopup.png"); + wrapActionListener(creators); + } + + private void wrapActionListener(NameableCreator[] creators) { + for (final NameableCreator creator : creators) { + if (!whetherAdd(creator.menuName())) { + continue; + } + boolean isTrue = ComparatorUtils.equals(creator.menuName(), Inter.getLocText("Datasource-Stored_Procedure")) || + ComparatorUtils.equals(creator.menuName(), Inter.getLocText("DS-Relation_TableData")) || ComparatorUtils.equals(creator.menuName(), Inter.getLocText("DS-Multi_Dimensional_Database")); + if (isTrue) { + this.addShortCut(new LineSeparator()); + } + this.addShortCut(new UpdateAction() { + { + this.setName(creator.menuName()); + Icon icon = creator.menuIcon(); + if (icon != null) { + this.setSmallIcon(icon); + } + } + + @Override + public void actionPerformed(ActionEvent e) { + if (hasInvalid(true)) { + return; + } + + Nameable nameable = creator.createNameable(UIListControlPane.this); + + UIListControlPane.this.addNameable(nameable, getModel().getSize()); + } + }); + } + } + + private boolean whetherAdd(String itemName) { + JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jTemplate == null) { + return false; + } + //先屏蔽掉这个,之后还有别的 + String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")}; + for (String name : names) { + if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { + return false; + } + } + String formName = Inter.getLocText("Hyperlink-Form_link"); + return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); + } + } + + /* + * 移除item + */ + private class RemoveItemAction extends UpdateAction { + public RemoveItemAction() { + this.setName(Inter.getLocText("FR-Action_Remove")); + this.setMnemonic('R'); + this.setSmallIcon(BaseUtils + .readIcon("/com/fr/base/images/cell/control/remove.png")); + } + + @Override + public void actionPerformed(ActionEvent evt) { + try { + UIListControlPane.this.nameableList.getCellEditor() + .stopCellEditing(); + } catch (Exception ignored) { + } + // bug:在选中一个NameObject并删除,会遗留下Name. + doBeforeRemove(); + if (GUICoreUtils.removeJListSelectedNodes(SwingUtilities + .getWindowAncestor(UIListControlPane.this), nameableList)) { + checkButtonEnabled(); + doAfterRemove(); + } + } + } + + /* + * CopyItem + */ + private class CopyItemAction extends UpdateAction { + public CopyItemAction() { + this.setName(Inter.getLocText("FR-Action_Copy")); + this.setMnemonic('C'); + this.setSmallIcon(BaseUtils + .readIcon("/com/fr/base/images/cell/control/copy.png")); + } + + @Override + public void actionPerformed(ActionEvent evt) { + // p:选中的值. + ListModelElement selectedValue = (ListModelElement) nameableList.getSelectedValue(); + if (selectedValue == null) { + return; + } + + ((JControlUpdatePane) controlUpdatePane).update(); + + Nameable selectedNameable = selectedValue.wrapper; + + // p: 用反射机制实现 + try { + Nameable newNameable = (Nameable) BaseUtils.cloneObject(selectedNameable); + newNameable.setName(createUnrepeatedCopyName(selectedNameable.getName())); + + UIListControlPane.this.addNameable(newNameable, nameableList.getSelectedIndex() + 1); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + } + + /* + * 上移Item + */ + private class MoveUpItemAction extends UpdateAction { + public MoveUpItemAction() { + this.setName(Inter.getLocText("Utils-Move_Up")); + this.setMnemonic('U'); + this.setSmallIcon(BaseUtils + .readIcon("/com/fr/design/images/control/up.png")); + } + + @Override + public void actionPerformed(ActionEvent evt) { + int selectedIndex = nameableList.getSelectedIndex(); + if (selectedIndex == -1) { + return; + } + + // 上移 + if (selectedIndex > 0) { + DefaultListModel listModel = (DefaultListModel) nameableList + .getModel(); + + Object selecteObj1 = listModel.get(selectedIndex - 1); + listModel.set(selectedIndex - 1, listModel.get(selectedIndex)); + listModel.set(selectedIndex, selecteObj1); + + nameableList.setSelectedIndex(selectedIndex - 1); + nameableList.ensureIndexIsVisible(selectedIndex - 1); + } + } + } + + /* + * 下移Item + */ + private class MoveDownItemAction extends UpdateAction { + public MoveDownItemAction() { + this.setName(Inter.getLocText("Utils-Move_Down")); + this.setMnemonic('D'); + this.setSmallIcon(BaseUtils + .readIcon("/com/fr/design/images/control/down.png")); + } + + @Override + public void actionPerformed(ActionEvent evt) { + int selectedIndex = nameableList.getSelectedIndex(); + if (selectedIndex == -1) { + return; + } + + if (selectedIndex < nameableList.getModel().getSize() - 1) { + DefaultListModel listModel = (DefaultListModel) nameableList + .getModel(); + + Object selecteObj1 = listModel.get(selectedIndex + 1); + listModel.set(selectedIndex + 1, listModel.get(selectedIndex)); + listModel.set(selectedIndex, selecteObj1); + + nameableList.setSelectedIndex(selectedIndex + 1); + nameableList.ensureIndexIsVisible(selectedIndex + 1); + } + } + } + + private class SortItemAction extends UpdateAction { + private boolean isAtoZ = false; + + public SortItemAction() { + this.setName(Inter.getLocText("FR-Action_Sort")); + this.setMnemonic('S'); + this.setSmallIcon(BaseUtils + .readIcon("/com/fr/design/images/control/sortAsc.png")); + } + + @Override + public void actionPerformed(ActionEvent evt) { + // p:选中的值. + Object selectedValue = nameableList.getSelectedValue(); + + DefaultListModel listModel = (DefaultListModel) nameableList + .getModel(); + Nameable[] nameableArray = new Nameable[listModel.getSize()]; + if (nameableArray.length <= 0) { + return; + } + + for (int i = 0; i < listModel.getSize(); i++) { + nameableArray[i] = ((ListModelElement) listModel.getElementAt(i)).wrapper; + } + + // p:排序. + if (isAtoZ) { + Comparator nameableComparator = new Comparator() { + @Override + public int compare(Nameable o1, Nameable o2) { + return -ComparatorUtils.compare(o1.getName(), o2 + .getName()); + } + }; + isAtoZ = !isAtoZ; + Arrays.sort(nameableArray, nameableComparator); + } else { + Comparator nameableComparator = new Comparator() { + @Override + public int compare(Nameable o1, Nameable o2) { + return ComparatorUtils.compare(o1.getName(), o2 + .getName()); + } + }; + isAtoZ = !isAtoZ; + Arrays.sort(nameableArray, nameableComparator); + } + + for (int i = 0; i < nameableArray.length; i++) { + listModel.set(i, new ListModelElement(nameableArray[i])); + } + + // p:需要选中以前的那个值. + if (selectedValue != null) { + nameableList.setSelectedValue(selectedValue, true); + } + + checkButtonEnabled(); + // p:需要repaint. + nameableList.repaint(); + } + } + + /* + * JNameEdList的鼠标事件 + */ + private MouseListener listMouseListener = new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent evt) { + nameableList.stopEditing(); + if (evt.getClickCount() >= 2 + && SwingUtilities.isLeftMouseButton(evt)) { + editingIndex = nameableList.getSelectedIndex(); + selectedName = nameableList.getNameAt(editingIndex); + nameableList.editItemAt(nameableList.getSelectedIndex()); + } + // peter:处理右键的弹出菜单 + if (!SwingUtilities.isRightMouseButton(evt)) { + return; + } + + // peter: 注意,在checkButtonEnabled()方法里面,设置了所有的Action的Enabled. + checkButtonEnabled(); + + // p:右键菜单. + JPopupMenu popupMenu = new JPopupMenu(); + + for (ShortCut4JControlPane sj : getShorts()) { + sj.getShortCut().intoJPopupMenu(popupMenu); + } + + // peter: 只有弹出菜单有子菜单的时候,才需要弹出来. + GUICoreUtils.showPopupMenu(popupMenu, nameableList, evt.getX() - 1, + evt.getY() - 1); + } + + @Override + public void mouseMoved(MouseEvent e) { + + } + }; + + /** + * 检查按钮可用状态 Check button enabled. + */ + @Override + public void checkButtonEnabled() { + + int selectedIndex = nameableList.getSelectedIndex(); + if (selectedIndex == -1) { + this.cardLayout.show(cardPane, "SELECT"); + } else { + this.cardLayout.show(cardPane, "EDIT"); + } + for (ShortCut4JControlPane sj : getShorts()) { + sj.checkEnable(); + } + } + + + public class AbsoluteEnableShortCut extends ShortCut4JControlPane { + public AbsoluteEnableShortCut(ShortCut shortCut) { + this.shortCut = shortCut; + } + + /** + * 检查是否可用 + */ + @Override + public void checkEnable() { + this.shortCut.setEnabled(true); + } + } + + public class NormalEnableShortCut extends ShortCut4JControlPane { + public NormalEnableShortCut(ShortCut shortCut) { + this.shortCut = shortCut; + } + + /** + * 检查是否可用 + */ + @Override + public void checkEnable() { + this.shortCut.setEnabled(getModel() + .getSize() > 0 + && UIListControlPane.this.nameableList.getSelectedIndex() != -1); + } + } + + public class SortEnableShortCut extends ShortCut4JControlPane { + public SortEnableShortCut(ShortCut shortCut) { + this.shortCut = shortCut; + } + + /** + * 检查是否可用 + */ + @Override + public void checkEnable() { + this.shortCut.setEnabled(getModel().getSize() > 1); + } + + } + + public class MoveUpEnableShortCut extends ShortCut4JControlPane { + public MoveUpEnableShortCut(ShortCut shortCut) { + this.shortCut = shortCut; + } + + /** + * 检查是否可用 + */ + @Override + public void checkEnable() { + this.shortCut.setEnabled(getModel().getSize() > 1 + && UIListControlPane.this.nameableList.getSelectedIndex() > 0); + } + + } + + public class MoveDownEnableShortCut extends ShortCut4JControlPane { + public MoveDownEnableShortCut(ShortCut shortCut) { + this.shortCut = shortCut; + } + + /** + * 检查是否可用 + */ + @Override + public void checkEnable() { + this.shortCut.setEnabled(getModel().getSize() > 1 + && UIListControlPane.this.nameableList.getSelectedIndex() < UIListControlPane.this.nameableList.getModel().getSize() - 1); + } + + } + + private class JControlUpdatePane extends JPanel { + private CardLayout card; + private JPanel cardPane; + private BasicBeanPane[] updatePanes; + + private ListModelElement elEditing; + + public JControlUpdatePane() { + initUpdatePane(); + } + + private void initUpdatePane() { + NameableCreator[] creators = creators(); + if (creators == null) { + return; + } + card = new CardLayout(); + cardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + cardPane.setLayout(card); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.add(cardPane); + int len = creators.length; + updatePanes = new BasicBeanPane[len]; + } + + public void populate() { + ListModelElement el = (ListModelElement) UIListControlPane.this.nameableList.getSelectedValue(); + if (el == null) { + return; + } + + elEditing = el; + NameableCreator[] creators = creators(); + + for (int i = 0, len = updatePanes.length; i < len; i++) { + Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper); + if (ob2Populate != null) { + if (updatePanes[i] == null) { + if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) { + updatePanes[i] = createPaneByCreators(creators[i], el.wrapper.getName()); + } else { + updatePanes[i] = createPaneByCreators(creators[i]); + } + cardPane.add(updatePanes[i], String.valueOf(i)); + } + card.show(cardPane, String.valueOf(i)); + doBeforePopulate(el, ob2Populate); + updatePanes[i].populateBean(ob2Populate); + doWhenPopulate(updatePanes[i]); + break; + } + } + } + + public boolean isMulti(Class _class) { + return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class); + } + + public boolean isTree(Class _class) { + return ComparatorUtils.equals(_class, GlobalTreeTableDataPane.class) || ComparatorUtils.equals(_class, TreeTableDataPane.class); + } + + public void update() { + NameableCreator[] creators = creators(); + for (int i = 0; i < updatePanes.length; i++) { + BasicBeanPane pane = updatePanes[i]; + + if (pane != null && pane.isVisible()) { + Object bean = pane.updateBean(); + if (i < creators.length) { + creators[i].saveUpdatedBean(elEditing, bean); + } + } + } + } + + public void checkValid() throws Exception { + if (updatePanes != null) { + for (int i = 0; i < updatePanes.length; i++) { + if (updatePanes[i] != null) { + updatePanes[i].checkValid(); + } + } + } + } + } + + protected BasicBeanPane createPaneByCreators(NameableCreator creator) { + try { + return creator.getUpdatePane().newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + protected BasicBeanPane createPaneByCreators(NameableCreator creator, String string) { + Constructor constructor = null; + try { + constructor = creator.getUpdatePane().getDeclaredConstructor(new Class[]{String.class}); + constructor.setAccessible(true); + return (BasicBeanPane) constructor.newInstance(string); + } catch (NoSuchMethodException e) { + throw new RuntimeException(e); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + + // 选项添加个数有限制等情况下 要求能控制快捷按钮的状态 + protected void setToolbarDefEnable(int shortCutIndex, int itemIndex, boolean enabled) { + ToolBarDef toolbarDef = getToolbarDef(); + if (toolbarDef.getShortCutCount() > shortCutIndex) { + ShortCut sc = toolbarDef.getShortCut(shortCutIndex); + if (sc instanceof AddItemMenuDef) { + AddItemMenuDef am = (AddItemMenuDef) sc; + if (am.getShortCutCount() > itemIndex) { + am.getShortCut(itemIndex).setEnabled(enabled); + } + } + } + } + + /** + * 检查是否符合规范 + * + * @throws Exception + */ + @Override + public void checkValid() throws Exception { + ((JControlUpdatePane) this.controlUpdatePane).checkValid(); + } + + private int getInValidIndex() { + BasicBeanPane[] p = ((JControlUpdatePane) controlUpdatePane).updatePanes; + if (p != null) { + for (int i = 0; i < p.length; i++) { + if (p[i] != null) { + try { + p[i].checkValid(); + } catch (Exception e) { + return i; + } + } + } + } + return -1; + } + + @Override + protected boolean hasInvalid(boolean isAdd) { + int idx = UIListControlPane.this.getInValidIndex(); + if (isAdd || nameableList.getSelectedIndex() != idx) { + try { + checkValid(); + } catch (Exception exp) { + JOptionPane.showMessageDialog(UIListControlPane.this, exp.getMessage()); + nameableList.setSelectedIndex(idx); + return true; + } + } + return false; + } + /** + * 设置选中项 + * + * @param index 选中项的序列号 + */ + public void setSelectedIndex(int index) { + nameableList.setSelectedIndex(index); + } + +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java new file mode 100644 index 0000000000..df672e8a1d --- /dev/null +++ b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java @@ -0,0 +1,146 @@ +package com.fr.design.gui.controlpane; + +import com.fr.base.BaseUtils; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ilist.ListModelElement; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.stable.Nameable; +import sun.swing.DefaultLookup; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import java.awt.*; + +/** + * Nameable的ListCellRenerer + * Created by plough on 2017/7/21. + */ + +public class UINameableListCellRenderer extends + JPanel implements ListCellRenderer { + private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); + private static final Border DEFAULT_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); + protected static Border noFocusBorder = DEFAULT_NO_FOCUS_BORDER; + private static final int BUTTON_WIDTH = 40; + private UIButton editButton; + private UILabel label; + private UIListControlPane listControlPane; + + public UINameableListCellRenderer(UIListControlPane listControlPane) { + super(); + this.listControlPane = listControlPane; + initComponents(); + setOpaque(true); + setBorder(getNoFocusBorder()); + setName("List.cellRenderer"); + } + + private void initComponents() { + editButton = new UIButton("edit") { + public Dimension getPreferredSize() { + return new Dimension(BUTTON_WIDTH, BUTTON_WIDTH); + } + }; + editButton.set4LargeToolbarButton(); + label = new UILabel(); +// label.setEditable(false); + this.setLayout(new BorderLayout()); + this.add(editButton, BorderLayout.WEST); + this.add(label, BorderLayout.CENTER); + } + + private Border getNoFocusBorder() { + Border border = DefaultLookup.getBorder(this, ui, "List.cellNoFocusBorder"); + if (System.getSecurityManager() != null) { + if (border != null) return border; + return SAFE_NO_FOCUS_BORDER; + } else { + if (border != null && + (noFocusBorder == null || + noFocusBorder == DEFAULT_NO_FOCUS_BORDER)) { + return border; + } + return noFocusBorder; + } + } + + private void setText(String t) { + label.setText(t); + } + + @Override + public Component getListCellRendererComponent(JList list, Object value, + int index, boolean isSelected, boolean cellHasFocus) { + setComponentOrientation(list.getComponentOrientation()); + + Color bg = null; + Color fg = null; + + JList.DropLocation dropLocation = list.getDropLocation(); + if (dropLocation != null + && !dropLocation.isInsert() + && dropLocation.getIndex() == index) { + + bg = DefaultLookup.getColor(this, ui, "List.dropCellBackground"); + fg = DefaultLookup.getColor(this, ui, "List.dropCellForeground"); + + isSelected = true; + } + + if (isSelected) { + setBackground(bg == null ? list.getSelectionBackground() : bg); + setForeground(fg == null ? list.getSelectionForeground() : fg); + } + else { + setBackground(list.getBackground()); + setForeground(list.getForeground()); + } + +// if (value instanceof Icon) { +// setIcon((Icon)value); +// setText(""); +// } +// else { +// setIcon(null); + setText((value == null) ? "" : value.toString()); +// } + + setEnabled(list.isEnabled()); + setFont(list.getFont()); + + Border border = null; + if (cellHasFocus) { + if (isSelected) { + border = DefaultLookup.getBorder(this, ui, "List.focusSelectedCellHighlightBorder"); + } + if (border == null) { + border = DefaultLookup.getBorder(this, ui, "List.focusCellHighlightBorder"); + } + } else { + border = getNoFocusBorder(); + } + setBorder(border); + + if (value instanceof ListModelElement) { + Nameable wrappee = ((ListModelElement) value).wrapper; + this.setText(((ListModelElement) value).wrapper.getName()); + + boolean iconSet = false; + for (NameableCreator creator : listControlPane.creators()) { + if (creator.menuIcon() != null && creator.acceptObject2Populate(wrappee) != null) { +// this.setIcon(creator.menuIcon()); + this.setToolTipText(creator.createTooltip()); + iconSet = true; + break; + } + } +// if (!iconSet) { +// this.setIcon(BaseUtils.readIcon("/com/fr/base/images/oem/cpt.png")); +// } + } + + return this; + } +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java b/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java index d0a824074a..fcd9ba3833 100644 --- a/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java @@ -4,6 +4,7 @@ import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.HyperlinkProvider; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.module.DesignModuleFactory; import com.fr.general.Inter; import com.fr.general.NameObject; @@ -23,7 +24,7 @@ import java.util.Set; * @author kunsnat E-mail:kunsnat@gmail.com * @version 创建时间:2013-6-25 上午11:17:57 */ -public abstract class HyperlinkGroupPane extends JListControlPane { +public abstract class HyperlinkGroupPane extends UIListControlPane { /** * 生成添加按钮的NameableCreator * From f89951424a1b205101fa4070bb90840deda4996e Mon Sep 17 00:00:00 2001 From: MoMeak Date: Sun, 23 Jul 2017 23:40:28 +0800 Subject: [PATCH 086/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E7=BC=A9=E6=94=BE=E6=9D=A1=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 64 ++++++++++---- .../mainframe/ReportComponentComposite.java | 2 +- designer/src/com/fr/poly/PolyArea.java | 18 +++- designer/src/com/fr/poly/PolyDesignUI.java | 87 ++++++++++++------- designer/src/com/fr/poly/PolyDesigner.java | 62 +++++++------ .../src/com/fr/poly/creator/BlockCreator.java | 4 + .../src/com/fr/poly/creator/BlockEditor.java | 2 +- .../fr/poly/creator/ChartBlockCreator.java | 14 ++- .../com/fr/poly/creator/ChartBlockEditor.java | 13 ++- .../com/fr/poly/creator/ECBlockEditor.java | 5 ++ .../com/fr/design/mainframe/JTemplate.java | 13 ++- .../fr/design/chart/gui/ChartComponent.java | 13 ++- .../src/com/fr/design/mainframe/JForm.java | 10 +++ 13 files changed, 219 insertions(+), 88 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 0a75350676..8251368849 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -56,6 +56,7 @@ import com.fr.main.TemplateWorkBook; import com.fr.main.impl.WorkBook; import com.fr.main.parameter.ReportParameterAttr; import com.fr.poly.PolyDesigner; +import com.fr.poly.creator.BlockCreator; import com.fr.privilege.finegrain.WorkSheetPrivilegeControl; import com.fr.report.ReportHelper; import com.fr.report.elementcase.ElementCase; @@ -147,6 +148,16 @@ public class JWorkBook extends JTemplate { return processInfo; } + @Override + public void setJTemplateResolution(int resolution) { + this.resolution = resolution; + } + + @Override + public int getJTemplateResolution() { + return this.resolution; + } + /** * 判断sheet权限 * @@ -353,6 +364,7 @@ public class JWorkBook extends JTemplate { } if (reportComposite.centerCardPane.polyDezi != null){ reportComposite.centerCardPane.polyDezi.setResolution(resolution); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setJTemplateResolution(resolution); reportComposite.centerCardPane.polyDezi.updateUI(); } // reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setVerticalValue(10); @@ -361,23 +373,45 @@ public class JWorkBook extends JTemplate { } @Override public int selfAdaptUpdate(){ - ElementCasePane reportPane = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getElementCasePane(); - int column = reportPane.getSelection().getSelectedColumns()[0]; - double columnLength = reportPane.getSelection().getSelectedColumns().length; - double columnExtent = reportPane.getGrid().getHorizontalExtent(); - int row = reportPane.getSelection().getSelectedRows()[0]; - double rowLength = reportPane.getSelection().getSelectedRows().length; - double rowExtent = reportPane.getGrid().getVerticalExtent(); - if (columnLength == 0||rowLength == 0){ + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } + if (reportComposite.centerCardPane.polyDezi.getSelection() !=null){ + BlockCreator blockCreator =reportComposite.centerCardPane.polyDezi.getSelection(); + double x = blockCreator.getEditorBounds().getX(); + double y = blockCreator.getEditorBounds().getY(); + reportComposite.centerCardPane.polyDezi.setHorizontalValue((int) x); + reportComposite.centerCardPane.polyDezi.setVerticalValue((int) y); + double creatorHeight = blockCreator.getEditorBounds().height; + double creatorWidth = blockCreator.getEditorBounds().width; + double areaHeight = reportComposite.centerCardPane.polyDezi.polyArea.getHeight(); + double areaWidth = reportComposite.centerCardPane.polyDezi.polyArea.getWidth(); + if (creatorWidth == 0||creatorHeight == 0){ + return resolution; + } + double time =(areaHeight/creatorHeight)<(areaWidth/creatorWidth) ? (areaHeight/creatorHeight) : (areaWidth/creatorWidth); + return (int) (time * reportComposite.centerCardPane.polyDezi.getResolution()); + + }else if (reportComposite.centerCardPane.editingComponet.elementCasePane != null) { + ElementCasePane reportPane = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getElementCasePane(); + int column = reportPane.getSelection().getSelectedColumns()[0]; + double columnLength = reportPane.getSelection().getSelectedColumns().length; + double columnExtent = reportPane.getGrid().getHorizontalExtent(); + int row = reportPane.getSelection().getSelectedRows()[0]; + double rowLength = reportPane.getSelection().getSelectedRows().length; + double rowExtent = reportPane.getGrid().getVerticalExtent(); + if (columnLength == 0||rowLength == 0){ + return resolution; + } + double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); + if (reportPane.isHorizontalScrollBarVisible()) { + reportPane.getVerticalScrollBar().setValue(row); + reportPane.getHorizontalScrollBar().setValue(column); + } + return (int) (time * reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getResolution()); + }else { return resolution; } - double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); - if (reportPane.isHorizontalScrollBarVisible()) { - reportPane.getVerticalScrollBar().setValue(row); - reportPane.getHorizontalScrollBar().setValue(column); - } - - return (int) (time * reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getResolution()); } @Override diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 36418924b8..1b4fcdd1d2 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -85,7 +85,7 @@ public class ReportComponentComposite extends JComponent { public void itemStateChanged(ItemEvent e) { if (jSliderContainer.getSelfAdaptButton().isSelected()){ int resolution = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().selfAdaptUpdate(); - jSliderContainer.getShowVal().setValue(resolution); + jSliderContainer.getShowVal().setValue(resolution*HUND/ScreenResolution.getScreenResolution()); } } }; diff --git a/designer/src/com/fr/poly/PolyArea.java b/designer/src/com/fr/poly/PolyArea.java index 07a79edc53..c9589f69f1 100644 --- a/designer/src/com/fr/poly/PolyArea.java +++ b/designer/src/com/fr/poly/PolyArea.java @@ -1,15 +1,29 @@ package com.fr.poly; + import javax.swing.JComponent; public class PolyArea extends JComponent { private PolyDesigner polyDesigner; + private int resolution; - public PolyArea(PolyDesigner polyDesigner) { + public PolyArea(PolyDesigner polyDesigner, int resolution) { this.polyDesigner = polyDesigner; - setUI(new PolyDesignUI()); + this.resolution = resolution; + this.setUI(new PolyDesignUI(resolution)); +// setUI(new PolyDesignUI()); + } + + + public void setResolution(int resolution) { + this.resolution = resolution; } + public int getResolution() { + return this.resolution; + } + + public PolyDesigner getPolyDesigner() { return polyDesigner; } diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index e46a24310a..58ed225b85 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -10,6 +10,7 @@ import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; import java.text.DecimalFormat; import java.util.ArrayList; @@ -27,12 +28,14 @@ import com.fr.general.Inter; import com.fr.page.PaperSettingProvider; import com.fr.page.ReportSettingsProvider; import com.fr.poly.creator.BlockCreator; +import com.fr.poly.creator.ECBlockCreator; import com.fr.poly.model.AddedData; import com.fr.poly.model.AddingData; import com.fr.report.report.Report; import com.fr.report.report.TemplateReport; import com.fr.report.stable.ReportConstants; import com.fr.stable.Constants; +import com.fr.stable.CoreGraphHelper; import com.fr.stable.unit.UNIT; /** @@ -44,13 +47,19 @@ public class PolyDesignUI extends ComponentUI { private static final double SCROLL_POINT = 50; private static final int SCROLL_DISTANCE = 15; - + private static final int CREATORWIDTH = 30; + private static final int CREATORGEIGHT = 19; + private static final int TEN = 10; + private static final int HHUNDRED = 100; private PolyDesigner designer; - private int resolution = ScreenResolution.getScreenResolution(); - private int ten = 10; - private int hundred = 100; + private int resolution; + private float time; - public PolyDesignUI() { + public PolyDesignUI(int resolution) { + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } + this.resolution = resolution; } /** @@ -83,6 +92,8 @@ public class PolyDesignUI extends ComponentUI { @Override public void paint(Graphics g, JComponent c) { + this.resolution = ((PolyArea)c).getResolution(); + this.time = (float)resolution/ScreenResolution.getScreenResolution(); paintBackground(g, c); Graphics2D g2d = (Graphics2D) g; paintAddedData(g2d); @@ -100,20 +111,27 @@ public class PolyDesignUI extends ComponentUI { BlockCreator creator = addedData.getAddedAt(i); // richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来 if (creator == designer.getSelection()) { - paintPositionLine(g, creator.getX(), creator.getY(), designer.getHorizontalValue(), designer - .getVerticalValue()); - if (creator.getEditor().isDragging()) { - creator.getEditor().paintAbsorptionline(g); - //如果与其他块重合了, 需要画出提示禁止重叠 - changeForbiddenWindowVisibility(creator); - //到边缘地带自动滚动 - scrollWhenCreatorAtCorner(creator); - }else{ - creator.getEditor().hideForbiddenWindow(); - } + if (creator instanceof ECBlockCreator){ + int x = (int) ((creator.getX()-CREATORWIDTH)*time)+CREATORWIDTH; + int y = (int) ((creator.getY()-CREATORGEIGHT)*time)+CREATORGEIGHT; + paintPositionLine(g, x, y, (int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time)); + }else { + int x = (int) (creator.getX()*time); + int y = (int) (creator.getY()*time); + paintPositionLine(g, x, y, (int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time)); + } + if (creator.getEditor().isDragging()) { + creator.getEditor().paintAbsorptionline(g); + //如果与其他块重合了, 需要画出提示禁止重叠 + changeForbiddenWindowVisibility(creator); + //到边缘地带自动滚动 + scrollWhenCreatorAtCorner(creator); + }else{ + creator.getEditor().hideForbiddenWindow(); + } } else { - paintCreator(g, creator, creator.getX() - designer.getHorizontalValue(), creator.getY() - designer.getVerticalValue(), - creator.getWidth(), creator.getHeight()); + paintCreator(g, creator, (int) (creator.getX()*time - designer.getHorizontalValue()*time), (int) (creator.getY()*time - designer.getVerticalValue()*time), + (int) (creator.getWidth()*time), (int) (creator.getHeight()*time)); } } } @@ -126,8 +144,8 @@ public class PolyDesignUI extends ComponentUI { return; } - int x = (int) (designer.getAreaLocationX() + pixRec.getCenterX() - designer.getHorizontalValue()); - int y = (int) (designer.getAreaLocationY() + pixRec.getCenterY() - designer.getVerticalValue()); + int x = (int) (designer.getAreaLocationX() + pixRec.getCenterX()*time - designer.getHorizontalValue()); + int y = (int) (designer.getAreaLocationY() + pixRec.getCenterY()*time - designer.getVerticalValue()); creator.getEditor().showForbiddenWindow(x, y); } @@ -183,16 +201,16 @@ public class PolyDesignUI extends ComponentUI { private String convertUnit(int i) { short unit = designer.getRulerLengthUnit(); - int resolution = ScreenResolution.getScreenResolution(); +// int resolution = ScreenResolution.getScreenResolution(); if (unit == Constants.UNIT_MM) { Double j = (i + 2) * 1.0 * Constants.HUNDRED_FU_PER_INCH / Constants.HUNDRED_FU_PER_MM / resolution; return j.intValue() + Inter.getLocText("Unit_MM"); } else if (unit == Constants.UNIT_CM) { Double j = (i + 2) * 1.0 * Constants.HUNDRED_FU_PER_INCH / Constants.HUNDRED_FU_PER_MM / resolution; - return new DecimalFormat("0.0").format(j.intValue() * 1.0 / ten) + Inter.getLocText("Unit_CM"); + return new DecimalFormat("0.0").format(j.intValue() * 1.0 / TEN) + Inter.getLocText("Unit_CM"); } else if (unit == Constants.UNIT_INCH) { - Double j = i == 0 ? 0 : (i + 2) * 1.0 / resolution * hundred; - return new DecimalFormat("0.00").format(j.intValue() * 1.0 / hundred) + Inter.getLocText("Unit_INCH"); + Double j = i == 0 ? 0 : (i + 2) * 1.0 / resolution * HHUNDRED; + return new DecimalFormat("0.00").format(j.intValue() * 1.0 / HHUNDRED) + Inter.getLocText("Unit_INCH"); } else if (unit == Constants.UNIT_PT) { int j = i == 0 ? 0 : (i + 2) * UNIT.PT_PER_INCH / resolution; return j + Inter.getLocText("Unit_PT"); @@ -203,10 +221,10 @@ public class PolyDesignUI extends ComponentUI { private void paintAddingData(Graphics g, AddingData addingData) { BlockCreator comp = addingData.getCreator(); - int x = addingData.getCurrentX(); - int y = addingData.getCurrentY(); - int width = comp.getWidth(); - int height = comp.getHeight(); + int x = (int) (addingData.getCurrentX()*time); + int y = (int) (addingData.getCurrentY()*time); + int width = (int) (comp.getWidth()*time); + int height = (int) (comp.getHeight()*time); paintCreator(g, comp, x, y, width, height); } @@ -214,9 +232,16 @@ public class PolyDesignUI extends ComponentUI { ArrayList dbcomponents = new ArrayList(); // richer:禁止双缓冲行为,否则会出现两个图像 ComponentUtils.disableBuffer(comp, dbcomponents); - Graphics clipg = g.create(x, y, width, height); - comp.paint(clipg); - clipg.dispose(); +// Graphics clipg = g.create(x, y, width*resolution/ScreenResolution.getScreenResolution(), height*resolution/ScreenResolution.getScreenResolution()); +// + BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB); + Graphics2D g2d = img.createGraphics(); + comp.printAll(g2d); + g2d.dispose(); + g.drawImage(img,x,y,width,height,null); + +// comp.paint(clipg); +// clipg.dispose(); ComponentUtils.resetBuffer(dbcomponents); } diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index faa15a9463..e2a25aeb6d 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -3,14 +3,10 @@ */ package com.fr.poly; -import java.awt.AWTEvent; -import java.awt.Adjustable; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Graphics; -import java.awt.Point; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List; @@ -36,16 +32,7 @@ import com.fr.design.designer.EditingState; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.AuthorityEditPane; -import com.fr.design.mainframe.CellElementPropertyPane; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.EastRegionContainerPane; -import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.ElementCasePaneAuthorityEditPane; -import com.fr.design.mainframe.FormScrollBar; -import com.fr.design.mainframe.JTemplate; -import com.fr.design.mainframe.NoSupportAuthorityEdit; -import com.fr.design.mainframe.ReportComponent; +import com.fr.design.mainframe.*; import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; @@ -75,6 +62,7 @@ import com.fr.report.block.Block; import com.fr.report.poly.PolyWorkSheet; import com.fr.report.poly.TemplateBlock; import com.fr.stable.ArrayUtils; +import com.fr.stable.CoreGraphHelper; import com.fr.stable.StringUtils; import com.fr.stable.unit.FU; import com.fr.stable.unit.OLDPIX; @@ -98,7 +86,7 @@ public class PolyDesigner extends ReportComponent clip_board = new ArrayList(); - // richer:鼠标滚轮每滚动一下,PolyDesignPane的尺寸就改变ROTATIONS这么多 private static final int ROTATIONS = 50; private JScrollBar verScrollBar; private JScrollBar horScrollBar; - private JComponent polyArea; + private PolyComponetsBar polyComponetsBar = new PolyComponetsBar(); private JComponent[] toolBarComponent = null; - private int resolution = ScreenResolution.getScreenResolution(); + private int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); + private float time; public PolyDesigner(PolyWorkSheet report) { super(report); @@ -157,7 +145,7 @@ public class PolyDesigner extends ReportComponent extends JComponent i LayoutUtils.layoutContainer(this); } + public void setResolution(int resolution){ + this.resolution = resolution; + } + //默认大小, 报表块默认3列6行, 图表块默认330*240 public abstract UnitRectangle getDefaultBlockBounds(); diff --git a/designer/src/com/fr/poly/creator/BlockEditor.java b/designer/src/com/fr/poly/creator/BlockEditor.java index 2e058b0f49..070f3e3a02 100644 --- a/designer/src/com/fr/poly/creator/BlockEditor.java +++ b/designer/src/com/fr/poly/creator/BlockEditor.java @@ -50,7 +50,7 @@ public abstract class BlockEditor public BlockEditor(PolyDesigner designer, BlockCreator creator) { this.designer = designer; this.creator = creator; - + this.resolution = creator.resolution; this.initComponets(); this.addColumnRowListeners(); diff --git a/designer/src/com/fr/poly/creator/ChartBlockCreator.java b/designer/src/com/fr/poly/creator/ChartBlockCreator.java index ca8106ffae..93e25d21e0 100644 --- a/designer/src/com/fr/poly/creator/ChartBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ChartBlockCreator.java @@ -3,13 +3,15 @@ */ package com.fr.poly.creator; -import java.awt.Color; +import java.awt.*; +import java.awt.image.BufferedImage; -import javax.swing.BorderFactory; -import javax.swing.JComponent; +import javax.swing.*; +import com.fr.base.ScreenResolution; import com.fr.design.DesignState; import com.fr.design.designer.TargetComponent; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; @@ -34,6 +36,7 @@ public class ChartBlockCreator extends BlockCreator { private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000); private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000); + public ChartBlockCreator() { } @@ -42,6 +45,10 @@ public class ChartBlockCreator extends BlockCreator { super(block); } + public void setResolution(int resolution){ + this.resolution = resolution; + } + /** * 初始化 * @return 初始化的控件. @@ -65,6 +72,7 @@ public class ChartBlockCreator extends BlockCreator { } + /** * 检测按钮状态 * diff --git a/designer/src/com/fr/poly/creator/ChartBlockEditor.java b/designer/src/com/fr/poly/creator/ChartBlockEditor.java index 8b0d90542d..8996b58fba 100644 --- a/designer/src/com/fr/poly/creator/ChartBlockEditor.java +++ b/designer/src/com/fr/poly/creator/ChartBlockEditor.java @@ -5,6 +5,7 @@ package com.fr.poly.creator; import com.fr.base.BaseUtils; import com.fr.base.FRContext; +import com.fr.base.ScreenResolution; import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartGetter; @@ -13,6 +14,7 @@ import com.fr.design.border.UIRoundedBorder; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.mainframe.EastRegionContainerPane; +import com.fr.design.mainframe.JSliderPane; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.NoSupportAuthorityEdit; import com.fr.design.mainframe.cell.QuickEditorRegion; @@ -25,6 +27,7 @@ import com.fr.poly.PolyDesigner.SelectionType; import com.fr.poly.hanlder.ColumnOperationMouseHandler; import com.fr.poly.hanlder.RowOperationMouseHandler; import com.fr.report.poly.PolyChartBlock; +import com.fr.stable.CoreGraphHelper; import com.fr.stable.core.PropertyChangeAdapter; import javax.swing.*; @@ -32,6 +35,7 @@ import javax.swing.border.Border; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; /** * @author richer @@ -43,6 +47,7 @@ public class ChartBlockEditor extends BlockEditor { @Override protected void initSize() { + resolution = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution(); + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } Dimension cornerSize = getCornerSize(); PolyECBlock block = getValue(); UnitRectangle ub = block.getBounds(); diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 309fac533d..121171b7a8 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -1,9 +1,6 @@ package com.fr.design.mainframe; -import com.fr.base.BaseUtils; -import com.fr.base.ConfigManager; -import com.fr.base.FRContext; -import com.fr.base.Parameter; +import com.fr.base.*; import com.fr.base.io.IOFile; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; @@ -51,6 +48,7 @@ import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import javax.swing.*; +import javax.swing.Icon; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.undo.UndoManager; import java.awt.*; @@ -82,6 +80,7 @@ public abstract class JTemplate> ex private long openTime = 0L; // 打开模板的时间点(包括新建模板) private TemplateInfoCollector tic = TemplateInfoCollector.getInstance(); private StringBuilder process = new StringBuilder(""); // 制作模板的过程 + private int resolution = ScreenResolution.getScreenResolution(); public JTemplate(T t, String defaultFileName) { this(t, new MemFILE(newTemplateNameByIndex(defaultFileName)), true); @@ -144,6 +143,12 @@ public abstract class JTemplate> ex return undoState; } + public abstract void setJTemplateResolution(int resolution); + + public abstract int getJTemplateResolution(); + + ; + /** * 初始化权限细粒度撤销状态 */ diff --git a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java index 5ce350450b..127f640d2d 100644 --- a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java +++ b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java @@ -13,6 +13,7 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartglyph.AxisGlyph; import com.fr.design.chart.gui.active.ActiveGlyph; import com.fr.design.chart.gui.active.ChartActiveGlyph; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeListener; @@ -41,7 +42,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene private int chartWidth = -1; private int chartHeight = -1; private Point point; - + private int resolution = ScreenResolution.getScreenResolution(); private ActiveGlyph activeGlyph; private boolean supportEdit = true; @@ -171,7 +172,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene g2d.setPaint(Color.white); g2d.fillRect(0, 0, this.getBounds().width, this.getBounds().height); g2d.setPaint(oldPaint); - + g2d.translate(ChartConstants.PREGAP4BOUNDS/2, ChartConstants.PREGAP4BOUNDS/2); if (needRefreshChartGlyph()) { @@ -315,7 +316,13 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene //不直接画chartGlyph而画image的原因是表单的柱形图会溢出表单 //其他图都ok,其实感觉应该是柱形图画的不对,应该也可以改那边 //处理画图事件 - Image chartImage = chartGlyph.toImage(chartWidth,chartHeight,ScreenResolution.getScreenResolution(), this, null); + + resolution = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution(); + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } + Image chartImage = chartGlyph.toImage(chartWidth,chartHeight,resolution, this, null); + g2d.drawImage(chartImage, 0, 0, null); } } diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index e6288dc2f7..2e6aefaeb1 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -104,6 +104,16 @@ public class JForm extends JTemplate implements BaseJForm { return processInfo; } + @Override + public void setJTemplateResolution(int resolution) { + + } + + @Override + public int getJTemplateResolution() { + return 0; + } + @Override protected boolean accept(Object o) { return !(o instanceof FloatElementsProvider); From 5985819f8e4075d08874e6b071eac96b0b4b93ef Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 24 Jul 2017 10:06:11 +0800 Subject: [PATCH 087/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=97=E8=A1=A8=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIControlPane.java | 42 ++ .../gui/controlpane/UIListControlPane.java | 14 +- .../UINameableListCellRenderer.java | 23 +- .../com/fr/design/gui/ilist/UINameEdList.java | 398 ++++++++++++++++++ 4 files changed, 466 insertions(+), 11 deletions(-) create mode 100644 designer_base/src/com/fr/design/gui/ilist/UINameEdList.java diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index f67512d92f..b21b740f5a 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -6,6 +6,7 @@ import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.design.utils.gui.GUICoreUtils; @@ -28,6 +29,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH private ToolBarDef toolbarDef; private UIToolbar toolBar; + protected PopupEditPane popupEditPane; // peter:这是整体的一个cardLayout Pane protected CardLayout cardLayout; @@ -101,6 +103,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH UILabel selectLabel = new UILabel(); cardPane.add(selectLabel, "SELECT"); cardPane.add(controlUpdatePane, "EDIT"); + popupEditPane = new PopupEditPane(cardPane); // SplitPane // JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane); // mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); @@ -229,4 +232,43 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH toolBar.repaint(); this.repaint(); } + + // 点击"编辑"按钮,弹出面板 + protected class PopupEditPane extends JPopupMenu { + private JComponent contentPane; + // private PopupToolPane popupToolPane; + private int fixedHeight; + + PopupEditPane(JComponent pane) { + contentPane = pane; + this.setLayout(new BorderLayout()); + this.add(contentPane, BorderLayout.CENTER); + this.setOpaque(false); +// fixedHeight = getPreferredSize().height - contentPane.getPreferredSize().height; +// updateSize(); + } + +// private void updateSize() { +// int newHeight = fixedHeight + contentPane.getPreferredSize().height; +// this.setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, newHeight)); +// } + + public JComponent getContentPane() { + return contentPane; + } + + public void replaceContentPane(JComponent pane) { +// remove(pane); + this.remove(this.contentPane); + this.add(this.contentPane = pane); +// updateSize(); + refreshContainer(); + } + + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index c36a7902c2..878668f0d0 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -10,7 +10,7 @@ import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.icontainer.UIScrollPane; -import com.fr.design.gui.ilist.JNameEdList; +import com.fr.design.gui.ilist.UINameEdList; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ModNameActionListener; import com.fr.design.layout.FRGUIPaneFactory; @@ -48,7 +48,7 @@ import java.util.Comparator; public abstract class UIListControlPane extends UIControlPane { public static final String LIST_NAME = "UIControl_List"; - protected JNameEdList nameableList; + protected UINameEdList nameableList; protected int editingIndex; protected String selectedName; private boolean isNameRepeated = false; @@ -96,8 +96,8 @@ public abstract class UIListControlPane extends UIControlPane { }); } - public JNameEdList createJNameList() { - JNameEdList nameEdList = new JNameEdList(new DefaultListModel()) { + public UINameEdList createJNameList() { + UINameEdList nameEdList = new UINameEdList(new DefaultListModel()) { @Override protected void doAfterLostFocus() { UIListControlPane.this.updateControlUpdatePane(); @@ -216,7 +216,7 @@ public abstract class UIListControlPane extends UIControlPane { } /** - * 根据name,选中JNameEdList中的item + * 根据name,选中UINameEdList中的item */ public void setSelectedName(String name) { DefaultListModel listModel = (DefaultListModel) this.nameableList.getModel(); @@ -277,7 +277,7 @@ public abstract class UIListControlPane extends UIControlPane { * @param index 序号 */ public void addNameable(Nameable nameable, int index) { - JNameEdList nameEdList = UIListControlPane.this.nameableList; + UINameEdList nameEdList = UIListControlPane.this.nameableList; DefaultListModel model = (DefaultListModel) nameEdList.getModel(); ListModelElement el = new ListModelElement(nameable); @@ -631,7 +631,7 @@ public abstract class UIListControlPane extends UIControlPane { } /* - * JNameEdList的鼠标事件 + * UINameEdList的鼠标事件 */ private MouseListener listMouseListener = new MouseAdapter() { @Override diff --git a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java index df672e8a1d..e8844d3856 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java @@ -5,6 +5,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Nameable; import sun.swing.DefaultLookup; @@ -12,6 +13,8 @@ import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; /** * Nameable的ListCellRenerer @@ -23,8 +26,8 @@ public class UINameableListCellRenderer extends private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); private static final Border DEFAULT_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); protected static Border noFocusBorder = DEFAULT_NO_FOCUS_BORDER; - private static final int BUTTON_WIDTH = 40; - private UIButton editButton; + private static final int BUTTON_WIDTH = 20; + private UILabel editButton; // "编辑按钮",实际上是一个 UILabel,由列表项(UIListControlPane)统一处理点击事件 private UILabel label; private UIListControlPane listControlPane; @@ -38,12 +41,19 @@ public class UINameableListCellRenderer extends } private void initComponents() { - editButton = new UIButton("edit") { + editButton = new UILabel() { public Dimension getPreferredSize() { return new Dimension(BUTTON_WIDTH, BUTTON_WIDTH); } }; - editButton.set4LargeToolbarButton(); +// editButton.set4LargeToolbarButton(); + editButton.setIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); +// editButton.addActionListener(new ActionListener() { +// @Override +// public void actionPerformed(ActionEvent e) { +// popupEditPane(); +// } +// }); label = new UILabel(); // label.setEditable(false); this.setLayout(new BorderLayout()); @@ -51,6 +61,11 @@ public class UINameableListCellRenderer extends this.add(label, BorderLayout.CENTER); } + private void popupEditPane() { + GUICoreUtils.showPopupMenu(listControlPane.popupEditPane, editButton, + - listControlPane.popupEditPane.getPreferredSize().width, 0); + } + private Border getNoFocusBorder() { Border border = DefaultLookup.getBorder(this, ui, "List.cellNoFocusBorder"); if (System.getSecurityManager() != null) { diff --git a/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java b/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java new file mode 100644 index 0000000000..73ba2bf82c --- /dev/null +++ b/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java @@ -0,0 +1,398 @@ +package com.fr.design.gui.ilist; + +import com.fr.base.Utils; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.general.Inter; +import com.fr.general.NameObject; +import com.fr.stable.Nameable; +import com.fr.stable.StringUtils; +import com.fr.stable.core.PropertyChangeAdapter; + +import javax.swing.*; +import javax.swing.event.CellEditorListener; +import javax.swing.event.ChangeEvent; +import java.awt.*; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.Vector; + +/** + * Created by plough on 2017/7/23. + */ +public class UINameEdList extends UIList implements CellEditorListener { + private static final int TEST_LIST_LENTH = 20; + private static final int BUTTON_WIDTH = 20; + private boolean editable = true; + + // kunsnat: 是否强制ListName是数字 (int型) + private boolean isNameShouldNumber = false; + + transient protected ListCellEditor cellEditor; + transient protected Component editorComp; + transient protected int editingIndex; + private PropertyChangeAdapter editingListner; + private java.util.List ll = new ArrayList(); + + public UINameEdList(ListModel dataModel) { + super(dataModel); + } + + public UINameEdList(final Object[] listData) { + super(listData); + } + + public UINameEdList(final Vector listData) { + super(listData); + } + + public UINameEdList() { + super(); + } + + /* + * Sets是否可编辑 + */ + public void setEditable(boolean editable) { + this.editable = editable; + } + + /** + * 是否可编辑 + * + * @return 是则返回true + */ + public boolean isEditable() { + return this.editable; + } + + public void setNameShouldNumber(boolean isNameShouldNumber) { + this.isNameShouldNumber = isNameShouldNumber; + } + + /** + * 是否强制ListName是数字 (int型) + * + * @return 是则返回true + */ + public boolean isNameShouldNumber() { + return isNameShouldNumber; + } + + /** + * 添加名字改变时的listener + * + * @param l 监听器 + */ + public void addModNameActionListener(ModNameActionListener l) { + ll.add(l); + } + + /** + * 编辑时的监听器 + * + * @param l 监听器 + */ + public void addEditingListner(PropertyChangeAdapter l) { + this.editingListner = l; + } + + /** + * 移除某名字改变时的listener + * + * @param l 监听器 + */ + public void removeModNameActionListener(ModNameActionListener l) { + ll.remove(l); + } + + public ListCellEditor getCellEditor() { + if (cellEditor == null) { + UITextField editField = new UITextField(); + if (editingListner != null) { + editField.addFocusListener(new FocusListener() { + + @Override + public void focusLost(FocusEvent e) { + editingListner.propertyChange(); + + } + + @Override + public void focusGained(FocusEvent e) { + // TODO Auto-generated method stub + + } + }); + } + cellEditor = new DefaultListCellEditor(editField) { + public boolean stopCellEditing() { + boolean isTrue = super.stopCellEditing(); + stopEditing(); + + return isTrue; + } + }; + cellEditor.addCellEditorListener(this); + } + + return cellEditor; + } + + protected void doAfterLostFocus() { + + } + + public void setCellEditor(ListCellEditor editor) { + this.cellEditor = editor; + } + + /* + * 取得index节点的名字 + */ + public String getNameAt(int index) { + Nameable nameable = ((ListModelElement) getModel().getElementAt(index)).wrapper; + if (nameable != null) { + return nameable.getName(); + } + + return null; + } + + public Object getType(int index) { + Nameable nameable = ((ListModelElement) getModel().getElementAt(index)).wrapper; + if (nameable != null && nameable instanceof NameObject) { + return ((NameObject) nameable).getObject(); + } + return null; + } + + + public void setWarnigText() { + setWarnigText(this.getSelectedIndex()); + } + + public void setWarnigText(int index) { + setNameAt(Inter.getLocText("Please_Rename") + "!", index); + this.repaint(); + } + + /* + * 设置index节点的名字 + */ + // b:edit改变name的时候怎么办? + public void setNameAt(String name, int index) { + Nameable nameable = ((ListModelElement) getModel().getElementAt(index)).wrapper; + if (nameable != null) { + String oldName = nameable.getName(); + + if (isNameShouldNumber()) { + // kunsnat: 限制只能是数字(int型) + Number number = Utils.string2Number(name); + if (number == null) { + nameable.setName(oldName); + } else { + int newName = number.intValue(); + nameable.setName(String.valueOf(newName)); + } + } else { + nameable.setName(name); + } + + for (int i = 0, len = ll.size(); i < len; i++) { + ll.get(i).nameModed(index, oldName, name); + } + } + } + + /* + * 编辑第index个item + */ + private String oldName; + + /** + * 编辑第index项 + * + * @param index 序号 + * @return 成功返回true + */ + public boolean editItemAt(int index) { + // 如果不可编辑,返回 + if (!this.editable) { + return false; + } + + if (cellEditor != null && !cellEditor.stopCellEditing()) { + return false; + } + if (index < 0 || index >= this.getModel().getSize()) { + return false; + } + + ListCellEditor editor = getCellEditor(); + Object value = editor.getCellEditorValue(); + if (!StringUtils.isBlank(value.toString())) { + oldName = value.toString(); + } + editorComp = prepareEditor(editor, index); + if (editorComp == null) { + return false; + } + Rectangle rect = this.getCellBounds(index, index); + // alex:所有的UINameEdList都有Icon,空出前面20 * 20的位置就是放的Icon + rect.setRect(createRect(rect, BUTTON_WIDTH)); + + editorComp.setBounds(rect); + add(editorComp); + editorComp.validate(); + editorComp.requestFocus(); + if (editorComp instanceof UITextField) { + ((UITextField) editorComp).selectAll(); + } + + setEditingIndex(index); + + return true; + } + + public Rectangle createRect(Rectangle rect, int iconWidth) { + return new Rectangle(rect.x + iconWidth, rect.y, rect.width - iconWidth, rect.height); + } + + public String getEditingName() { + return (String) getCellEditor().getCellEditorValue(); + } + + /* + * 根据ListCellEditor取得编辑器的Component + */ + private Component prepareEditor(ListCellEditor cellEditor, int index) { + String name = getNameAt(index); + boolean isSelected = this.isSelectedIndex(index); + Component comp = cellEditor.getListCellEditorComponent(this, name, isSelected, index); + + return comp; + } + + /* + * 记录正在编辑的index + */ + private void setEditingIndex(int idx) { + editingIndex = idx; + } + + /** + * 编辑取消 + * + * @param e 事件 + */ + public void editingCanceled(ChangeEvent e) { + removeComp(); + } + + /** + * 编辑结束 + * + * @param e 事件 + */ + public void editingStopped(ChangeEvent e) { + doAfterLostFocus(); + stopEditing(); + } + + /** + * 停止编辑事件 + */ + public void stopEditing() { + ListCellEditor editor = getCellEditor(); + if (editor != null && editorComp != null) { + Object value = editor.getCellEditorValue(); + String name = StringUtils.isBlank(value.toString()) ? oldName : value.toString(); + setNameAt(name, editingIndex); + removeComp(); + } + } + + public String[] getAllNames() { + int length = this.getModel().getSize(); + String[] names = new String[length]; + for (int i = 0; i < length; i++) { + names[i] = getNameAt(i); + } + return names; + } + + public Object[] getAllTypes() { + int length = this.getModel().getSize(); + Object[] types = new Object[length]; + for (int i = 0; i < length; i++) { + types[i] = getType(i); + } + return types; + } + + + /* + * 移除编辑器的Component + */ + private void removeComp() { + if (editorComp != null) { + remove(editorComp); + } + Rectangle cellRect = this.getCellBounds(editingIndex, editingIndex); + setEditingIndex(-1); + editorComp = null; + repaint(cellRect); + } + + /** + * 主函数 + * + * @param args 参数 + */ + public static void main(String... args) { + JFrame f = new JFrame(); + JPanel c = (JPanel) f.getContentPane(); + c.setLayout(new BorderLayout()); + ListModelElement[] data = new ListModelElement[TEST_LIST_LENTH]; + for (int i = 0; i < TEST_LIST_LENTH; i++) { + data[i] = new ListModelElement(new NameObject(i + 1 + "", i)); + } + final UINameEdList list = new UINameEdList(data); + list.setEditable(true); + list.addMouseListener(new MouseAdapter() { + public void mouseReleased(MouseEvent evt) { + list.stopEditing(); + if (evt.getClickCount() >= 2 + && SwingUtilities.isLeftMouseButton(evt)) { + list.editItemAt(list.getSelectedIndex()); + } + } + }) + ; + + list.setCellEditor(new DefaultListCellEditor(new UITextField())); + list.setCellRenderer(new NameableListCellRenderer()); + c.add(list, BorderLayout.CENTER); + f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + f.setSize(400, 600); + f.setVisible(true); + } + + private static class NameableListCellRenderer extends DefaultListCellRenderer { + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, + boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + + if (value instanceof Nameable) { + Nameable wrappee = (Nameable) value; + this.setText(wrappee.getName()); + } + return this; + } + } + +} \ No newline at end of file From 05451d24a6422e6600dd2333774e0a44fecd064d Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 24 Jul 2017 10:52:44 +0800 Subject: [PATCH 088/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=9D=A2=E6=9D=BF=E5=BC=B9=E5=87=BA=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/controlpane/UIControlPane.java | 5 ++++- .../fr/design/gui/controlpane/UIListControlPane.java | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index b21b740f5a..4de5f5d86b 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -236,14 +236,17 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH // 点击"编辑"按钮,弹出面板 protected class PopupEditPane extends JPopupMenu { private JComponent contentPane; + private static final int WIDTH = 460; + private static final int HEIGHT = 500; // private PopupToolPane popupToolPane; - private int fixedHeight; +// private int fixedHeight; PopupEditPane(JComponent pane) { contentPane = pane; this.setLayout(new BorderLayout()); this.add(contentPane, BorderLayout.CENTER); this.setOpaque(false); + contentPane.setPreferredSize(new Dimension(WIDTH, HEIGHT)); // fixedHeight = getPreferredSize().height - contentPane.getPreferredSize().height; // updateSize(); } diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index 878668f0d0..a6131b3ed5 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -47,6 +47,7 @@ import java.util.Comparator; public abstract class UIListControlPane extends UIControlPane { public static final String LIST_NAME = "UIControl_List"; + private static final int EDIT_RANGE = 20; // 编辑按钮的x坐标范围 protected UINameEdList nameableList; protected int editingIndex; @@ -356,6 +357,11 @@ public abstract class UIListControlPane extends UIControlPane { } } + private void popupEditPane() { + GUICoreUtils.showPopupMenu(popupEditPane, this, + - popupEditPane.getPreferredSize().width, nameableList.getSelectedIndex() * EDIT_RANGE); + } + /** * 增加项的UpdateAction */ @@ -638,11 +644,14 @@ public abstract class UIListControlPane extends UIControlPane { public void mouseReleased(MouseEvent evt) { nameableList.stopEditing(); if (evt.getClickCount() >= 2 - && SwingUtilities.isLeftMouseButton(evt)) { + && SwingUtilities.isLeftMouseButton(evt) && evt.getX() > EDIT_RANGE) { editingIndex = nameableList.getSelectedIndex(); selectedName = nameableList.getNameAt(editingIndex); nameableList.editItemAt(nameableList.getSelectedIndex()); + } else if (SwingUtilities.isLeftMouseButton(evt) && evt.getX() <= EDIT_RANGE) { + popupEditPane(); } + // peter:处理右键的弹出菜单 if (!SwingUtilities.isRightMouseButton(evt)) { return; From 18c5fc394181f4604cd3f202e237988f7f898f55 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 24 Jul 2017 15:08:05 +0800 Subject: [PATCH 089/101] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E5=BC=80=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=9D=A2=E6=9D=BF=3D=E3=80=8B=E5=AE=8C=E5=96=84UI?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIControlPane.java | 11 +++++- .../gui/controlpane/UIListControlPane.java | 24 +++++++++++- .../UINameableListCellRenderer.java | 37 ++++++++++--------- .../com/fr/design/gui/ilist/UINameEdList.java | 2 +- 4 files changed, 52 insertions(+), 22 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index 4de5f5d86b..8878cd43a8 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -110,6 +110,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH // mainSplitPane.setOneTouchExpandable(true); this.add(getLeftPane(), BorderLayout.CENTER); + this.setBorder(BorderFactory.createEmptyBorder(0, 10, 12, 10)); // mainSplitPane.setDividerLocation(getLeftPreferredSize()); this.checkButtonEnabled(); } @@ -134,14 +135,21 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH toolbarDef.addShortCut(sj.getShortCut()); } toolBar = ToolBarDef.createJToolBar(); +// toolBar.setLayout(new FlowLayout(FlowLayout.LEFT)); toolbarDef.updateToolBar(toolBar); - leftContentPane.add(toolBar, BorderLayout.NORTH); + // 封装一层,加边框 + JPanel toolBarPane = new JPanel(new BorderLayout()); + toolBarPane.add(toolBar, BorderLayout.CENTER); + toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, new Color(201, 198, 184))); + leftContentPane.add(toolBarPane, BorderLayout.NORTH); +// leftContentPane.setBorder(BorderFactory.createLineBorder(new Color(201, 198, 184))); // 顶部标签及add按钮 UIToolbar topToolBar = new UIToolbar(); topToolBar.setLayout(new BorderLayout()); ShortCut addItem = addItemShortCut().getShortCut(); addItem.intoJToolBar(topToolBar); + topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f }; @@ -150,6 +158,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH new Component[]{new UILabel("add hyperlink "), topToolBar}, }; JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); leftPane.add(leftTopPane, BorderLayout.NORTH); return leftPane; diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index a6131b3ed5..c082f66983 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -9,6 +9,7 @@ import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane; import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilist.UINameEdList; import com.fr.design.gui.ilist.ListModelElement; @@ -47,7 +48,7 @@ import java.util.Comparator; public abstract class UIListControlPane extends UIControlPane { public static final String LIST_NAME = "UIControl_List"; - private static final int EDIT_RANGE = 20; // 编辑按钮的x坐标范围 + private static final int EDIT_RANGE = 25; // 编辑按钮的x坐标范围 protected UINameEdList nameableList; protected int editingIndex; @@ -358,8 +359,11 @@ public abstract class UIListControlPane extends UIControlPane { } private void popupEditPane() { + if (editingIndex < 0) { + return; + } GUICoreUtils.showPopupMenu(popupEditPane, this, - - popupEditPane.getPreferredSize().width, nameableList.getSelectedIndex() * EDIT_RANGE); + - popupEditPane.getPreferredSize().width, editingIndex * EDIT_RANGE); } /** @@ -394,6 +398,21 @@ public abstract class UIListControlPane extends UIControlPane { wrapActionListener(creators); } + /** + * 生成UIButton + * @return 菜单按钮 + */ + public UIButton createUIButton() { + createdButton = super.createUIButton(); + // 此按钮单独抽出,不应使用工具栏外观 + if (!createdButton.isOpaque()) { + createdButton.setOpaque(true); + createdButton.setNormalPainted(true); + createdButton.setBorderPaintedOnlyWhenPressed(false); + } + return createdButton; + } + private void wrapActionListener(NameableCreator[] creators) { for (final NameableCreator creator : creators) { if (!whetherAdd(creator.menuName())) { @@ -649,6 +668,7 @@ public abstract class UIListControlPane extends UIControlPane { selectedName = nameableList.getNameAt(editingIndex); nameableList.editItemAt(nameableList.getSelectedIndex()); } else if (SwingUtilities.isLeftMouseButton(evt) && evt.getX() <= EDIT_RANGE) { + editingIndex = nameableList.getSelectedIndex(); popupEditPane(); } diff --git a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java index e8844d3856..e56b038074 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java @@ -25,8 +25,9 @@ public class UINameableListCellRenderer extends JPanel implements ListCellRenderer { private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); private static final Border DEFAULT_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); + private static final Color BORDER_COLOR = new Color(201, 198, 184); protected static Border noFocusBorder = DEFAULT_NO_FOCUS_BORDER; - private static final int BUTTON_WIDTH = 20; + private static final int BUTTON_WIDTH = 25; private UILabel editButton; // "编辑按钮",实际上是一个 UILabel,由列表项(UIListControlPane)统一处理点击事件 private UILabel label; private UIListControlPane listControlPane; @@ -48,6 +49,8 @@ public class UINameableListCellRenderer extends }; // editButton.set4LargeToolbarButton(); editButton.setIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); + editButton.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, BORDER_COLOR)); + editButton.setHorizontalAlignment(SwingConstants.CENTER); // editButton.addActionListener(new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) { @@ -55,30 +58,28 @@ public class UINameableListCellRenderer extends // } // }); label = new UILabel(); + label.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); // label.setEditable(false); this.setLayout(new BorderLayout()); this.add(editButton, BorderLayout.WEST); this.add(label, BorderLayout.CENTER); } - private void popupEditPane() { - GUICoreUtils.showPopupMenu(listControlPane.popupEditPane, editButton, - - listControlPane.popupEditPane.getPreferredSize().width, 0); - } - private Border getNoFocusBorder() { - Border border = DefaultLookup.getBorder(this, ui, "List.cellNoFocusBorder"); - if (System.getSecurityManager() != null) { - if (border != null) return border; - return SAFE_NO_FOCUS_BORDER; - } else { - if (border != null && - (noFocusBorder == null || - noFocusBorder == DEFAULT_NO_FOCUS_BORDER)) { - return border; - } - return noFocusBorder; - } +// return BorderFactory.createLineBorder(new Color(201, 198, 184)); + return BorderFactory.createMatteBorder(0, 0, 1, 0, BORDER_COLOR); + // Border border = DefaultLookup.getBorder(this, ui, "List.cellNoFocusBorder"); +// if (System.getSecurityManager() != null) { +// if (border != null) return border; +// return SAFE_NO_FOCUS_BORDER; +// } else { +// if (border != null && +// (noFocusBorder == null || +// noFocusBorder == DEFAULT_NO_FOCUS_BORDER)) { +// return border; +// } +// return noFocusBorder; +// } } private void setText(String t) { diff --git a/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java b/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java index 73ba2bf82c..823c95d6e4 100644 --- a/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java +++ b/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java @@ -24,7 +24,7 @@ import java.util.Vector; */ public class UINameEdList extends UIList implements CellEditorListener { private static final int TEST_LIST_LENTH = 20; - private static final int BUTTON_WIDTH = 20; + private static final int BUTTON_WIDTH = 25; private boolean editable = true; // kunsnat: 是否强制ListName是数字 (int型) From f59ff6bb4064135210d27be5c868eebe14eef08c Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 24 Jul 2017 15:17:15 +0800 Subject: [PATCH 090/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 12 ++++- .../com/fr/design/mainframe/JWorkBook.java | 1 + .../form/FormReportComponentComposite.java | 54 ++++++++++++++++--- .../com/fr/design/mainframe/JTemplate.java | 2 +- .../src/com/fr/design/mainframe/FormArea.java | 29 +++++----- .../com/fr/design/mainframe/FormDesigner.java | 11 ++++ .../fr/design/mainframe/FormDesignerUI.java | 26 ++++++--- .../src/com/fr/design/mainframe/JForm.java | 49 ++++++++++++++++- 8 files changed, 155 insertions(+), 29 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 17dfa8442d..6682a6fa58 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -209,7 +209,9 @@ public abstract class ElementCasePane extends Tar this.setLayout(new RGridLayout()); //todo 直接修改分辨率 - this.resolution = ScreenResolution.getScreenResolution(); + if (this.resolution == 0){ + this.resolution = ScreenResolution.getScreenResolution(); + } this.initGridComponent(); @@ -344,6 +346,14 @@ public abstract class ElementCasePane extends Tar } + public void setResolution(int resolution){ + this.resolution = resolution; + } + + public int getResolution(){ + return this.resolution; + } + /** * 所有的操作都必须在可见范围内,否则不做任何操作 * diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 8251368849..1fa6ee8d52 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -345,6 +345,7 @@ public class JWorkBook extends JTemplate { //更新resolution this.resolution = resolution; if (reportComposite.centerCardPane.editingComponet.elementCasePane != null){ + reportComposite.centerCardPane.editingComponet.elementCasePane.setResolution(resolution); reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setResolution(resolution); //更新Grid diff --git a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java index 11bfbe476d..d9ad0f35f3 100644 --- a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java @@ -1,29 +1,41 @@ package com.fr.design.mainframe.form; +import com.fr.base.ScreenResolution; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.JForm; +import com.fr.design.mainframe.JSliderPane; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.form.FormElementCaseContainerProvider; import com.fr.form.FormElementCaseProvider; import com.fr.report.worksheet.FormElementCase; import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; /** * 整个FormElementCase编辑区域 包括滚动条、中间的grid或者聚合块、下面的sheetTab */ public class FormReportComponentComposite extends JComponent implements TargetModifiedListener, FormECCompositeProvider{ - - private FormElementCaseDesigner elementCaseDesigner; + + private static final int MAX = 400; + private static final int HUND = 100; + private static final int MIN = 10; + public FormElementCaseDesigner elementCaseDesigner; private BaseJForm jForm; private FormTabPane sheetNameTab; private JPanel hbarContainer; - + private JSliderPane jSliderContainer; public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { @@ -33,10 +45,33 @@ public class FormReportComponentComposite extends JComponent implements TargetMo this.add(elementCaseDesigner, BorderLayout.CENTER); sheetNameTab = new FormTabPane(ecContainer, jform); this.add(createSouthControlPane(), BorderLayout.SOUTH); - + jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener); + jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener); elementCaseDesigner.addTargetModifiedListener(this); } + ChangeListener showValSpinnerChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); + value = value>MAX ? MAX : value; + value = value targetModifiedList = new java.util.ArrayList(); /** @@ -62,13 +97,18 @@ public class FormReportComponentComposite extends JComponent implements TargetMo } private JComponent createSouthControlPane() { + JPanel southPane = new JPanel(new BorderLayout()); hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); hbarContainer.add(elementCaseDesigner.getHorizontalScrollBar()); - JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, hbarContainer); + jSliderContainer = JSliderPane.getInstance(); + + JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sheetNameTab, jSliderContainer); + southPane.add(hbarContainer,BorderLayout.NORTH); + southPane.add(splitpane,BorderLayout.CENTER); splitpane.setBorder(null); splitpane.setDividerSize(3); - splitpane.setResizeWeight(0.6); - return splitpane; + splitpane.setResizeWeight(1); + return southPane; } /** diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 121171b7a8..95614b2124 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -80,7 +80,7 @@ public abstract class JTemplate> ex private long openTime = 0L; // 打开模板的时间点(包括新建模板) private TemplateInfoCollector tic = TemplateInfoCollector.getInstance(); private StringBuilder process = new StringBuilder(""); // 制作模板的过程 - private int resolution = ScreenResolution.getScreenResolution(); + public int resolution = ScreenResolution.getScreenResolution(); public JTemplate(T t, String defaultFileName) { this(t, new MemFILE(newTemplateNameByIndex(defaultFileName)), true); diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index b7853183e1..1203bdf0de 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -23,6 +23,7 @@ import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import com.fr.base.ScreenResolution; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; @@ -64,12 +65,12 @@ public class FormArea extends JComponent implements ScrollRulerComponent { //显示和设置表单界面大小的控件 private UINumberField widthPane; private UINumberField heightPane; - private JSliderPane slidePane; + private JFormSliderPane slidePane; private boolean isValid = true; // 初始时滑块值为100,托动后的值设为START_VALUE; private double START_VALUE = DEFAULT_SLIDER; + private int resolution = ScreenResolution.getScreenResolution(); private double screenValue; - private JSliderPane sliderPane; public FormScrollBar getHorScrollBar() { return horScrollBar; @@ -123,8 +124,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent { // slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT); // slidePane.setPreferredSize(new Dimension(260,20)); - slidePane = JSliderPane.getInstance(); - slidePane.setPreferredSize(new Dimension(300,20)); + slidePane = JFormSliderPane.getInstance(); + slidePane.setPreferredSize(new Dimension(350,20)); JPanel resizePane =TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ @@ -160,14 +161,18 @@ public class FormArea extends JComponent implements ScrollRulerComponent { ChangeListener showValSpinnerChangeListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); - value = value>SHOWVALMAX ? SHOWVALMAX : value; - value = valueSHOWVALMAX ? SHOWVALMAX : value; + value = value implements TreeSelection // 存储被选择组件和剪切板的model private transient SelectionModel selectionModel; + private int resolution = ScreenResolution.getScreenResolution(); // 编辑状态的事件表 private CreatorEventListenerTable edit; protected Action[] designerActions; @@ -1416,4 +1419,12 @@ public class FormDesigner extends TargetComponent
implements TreeSelection } } + + public void setResolution(int resolution){ + this.resolution = resolution; + } + + public int getResolution(){ + return this.resolution; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/FormDesignerUI.java b/designer_form/src/com/fr/design/mainframe/FormDesignerUI.java index 259e1b65ef..2cc0cabdfc 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesignerUI.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesignerUI.java @@ -7,6 +7,7 @@ import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.geom.Area; import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; import java.util.ArrayList; import javax.swing.JComponent; @@ -15,6 +16,7 @@ import javax.swing.plaf.ComponentUI; import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; +import com.fr.base.ScreenResolution; import com.fr.base.Utils; import com.fr.design.constants.UIConstants; import com.fr.design.designer.beans.AdapterBus; @@ -31,6 +33,7 @@ import com.fr.design.utils.ComponentUtils; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; +import com.fr.stable.CoreGraphHelper; /** * FormDesigner的UI类,是一个有状态的UI类,它根据FormDesigner的当前状态画出 @@ -42,6 +45,7 @@ public class FormDesignerUI extends ComponentUI { private FormDesigner designer; private SelectionModel selectionModel; private Rectangle2D.Double back_or_selection_rect = new Rectangle2D.Double(0, 0, 0, 0); + private float time; public FormDesignerUI() { } @@ -63,6 +67,7 @@ public class FormDesignerUI extends ComponentUI { @Override public void paint(Graphics g, JComponent c) { XCreator rootComponent = designer.getRootComponent(); + this.time = (float)designer.getResolution()/ScreenResolution.getScreenResolution(); if (rootComponent != null) { // 设计自适应界面 repaintFit(g, rootComponent, c); @@ -373,9 +378,17 @@ public class FormDesignerUI extends ComponentUI { // 禁止双缓冲 ComponentUtils.disableBuffer(component, dbcomponents); Graphics clipg; - clipg = g.create(-designer.getArea().getHorizontalValue(), -designer.getArea().getVerticalValue() + designer.getParaHeight(), parent - .getSize().width + designer.getArea().getHorizontalValue(), parent.getSize().height - + designer.getArea().getVerticalValue()); + clipg = g.create( + -designer.getArea().getHorizontalValue(), + -designer.getArea().getVerticalValue() + designer.getParaHeight(), + parent.getSize().width + designer.getArea().getHorizontalValue(), + parent.getSize().height + designer.getArea().getVerticalValue()); + +// BufferedImage img = CoreGraphHelper.createBufferedImage(parent.getSize().width + designer.getArea().getHorizontalValue(), parent.getSize().height + designer.getArea().getVerticalValue(), BufferedImage.TYPE_INT_RGB); +// Graphics2D g2d = img.createGraphics(); +// component.printAll(g2d); +// g2d.dispose(); +// g.drawImage(img,-designer.getArea().getHorizontalValue(),-designer.getArea().getVerticalValue() + designer.getParaHeight(), (int) (parent.getSize().width*time + designer.getArea().getHorizontalValue()), (int) (parent.getSize().height*time + designer.getArea().getVerticalValue()),null); designer.paintContent(clipg); clipg.dispose(); @@ -397,9 +410,10 @@ public class FormDesignerUI extends ComponentUI { // 禁止双缓冲 ComponentUtils.disableBuffer(component, dbcomponents); Graphics clipg1; - clipg1 = g.create(-designer.getArea().getHorizontalValue(), -designer.getArea().getVerticalValue() , parent - .getSize().width + designer.getArea().getHorizontalValue(), designer.getParaHeight() - + designer.getArea().getVerticalValue()); + clipg1 = g.create(-designer.getArea().getHorizontalValue(), + -designer.getArea().getVerticalValue() , + parent.getSize().width + designer.getArea().getHorizontalValue(), + designer.getParaHeight() + designer.getArea().getVerticalValue()); designer.paintPara(clipg1); clipg1.dispose(); diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 2e6aefaeb1..7cb1e0e01f 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -1,10 +1,13 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; +import com.fr.base.DynamicUnitList; +import com.fr.base.ScreenResolution; import com.fr.design.DesignState; import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.cell.FloatElementsProvider; +import com.fr.design.cell.bar.DynamicScrollBar; import com.fr.design.constants.UIConstants; import com.fr.design.designer.beans.actions.CopyAction; import com.fr.design.designer.beans.actions.CutAction; @@ -26,6 +29,8 @@ import com.fr.design.mainframe.actions.FormMobileAttrAction; import com.fr.design.mainframe.actions.TemplateParameterAction; import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; +import com.fr.design.mainframe.form.FormElementCasePaneDelegate; +import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.templateinfo.JFormProcessInfo; import com.fr.design.mainframe.templateinfo.TemplateProcessInfo; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; @@ -47,6 +52,9 @@ import com.fr.form.ui.container.WLayout; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; +import com.fr.grid.Grid; +import com.fr.grid.GridUtils; +import com.fr.report.ReportHelper; import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.bridge.StableFactory; @@ -256,7 +264,25 @@ public class JForm extends JTemplate implements BaseJForm { @Override public void setScale(int resolution) { - + this.resolution = resolution; + ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane(); + elementCasePane.setResolution(resolution); + elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); + elementCasePane.getGrid().setResolution(resolution); + //更新Grid + Grid grid = elementCasePane.getGrid(); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase()); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase()); + grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); + grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); + elementCasePane.getGrid().updateUI(); + //更新Column和Row + ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution); + ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution); + elementCasePane.getGridColumn().setResolution(resolution); + elementCasePane.getGridColumn().updateUI(); + elementCasePane.getGridRow().setResolution(resolution); + elementCasePane.getGridRow().updateUI(); } @Override @@ -266,7 +292,26 @@ public class JForm extends JTemplate implements BaseJForm { @Override public int selfAdaptUpdate() { - return 0; + if (resolution == 0){ + resolution = ScreenResolution.getScreenResolution(); + } + ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane(); + ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); + int column = reportPane.getSelection().getSelectedColumns()[0]; + double columnLength = reportPane.getSelection().getSelectedColumns().length; + double columnExtent = reportPane.getGrid().getHorizontalExtent(); + int row = reportPane.getSelection().getSelectedRows()[0]; + double rowLength = reportPane.getSelection().getSelectedRows().length; + double rowExtent = reportPane.getGrid().getVerticalExtent(); + if (columnLength == 0||rowLength == 0){ + return resolution; + } + double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); + if (reportPane.isHorizontalScrollBarVisible()) { + reportPane.getVerticalScrollBar().setValue(row); + reportPane.getHorizontalScrollBar().setValue(column); + } + return (int) (time * elementCasePane.getGrid().getResolution()); } /** From 56d93a11d5abba348d04a6aad37b8ae94909ebd5 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 24 Jul 2017 15:21:13 +0800 Subject: [PATCH 091/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/JFormSliderPane.java | 433 ++++++++++++++++++ 1 file changed, 433 insertions(+) create mode 100644 designer_base/src/com/fr/design/mainframe/JFormSliderPane.java diff --git a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java new file mode 100644 index 0000000000..dd6fdb756d --- /dev/null +++ b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java @@ -0,0 +1,433 @@ +package com.fr.design.mainframe; + +import com.fr.base.BaseUtils; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.islider.UISlider; +import com.fr.design.gui.ispinner.UIBasicSpinner; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; + +import javax.swing.*; +import javax.swing.border.MatteBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.plaf.basic.BasicSliderUI; +import java.awt.*; +import java.awt.event.*; +import java.math.BigDecimal; + +/** + * Created by MoMeak on 2017/7/13. + */ +public class JFormSliderPane extends JPanel { + + private static final double ONEPOINTEIGHT = 1.8; + private static final int SIX = 6; + private static final int TEN = 10; + private static final int ONEEIGHT = 18; + private static final int FONTSIZE = 14; + private static final int SPINNERWIDTH= 45; + private static final int SPINNERHEIGHT = 20; + private static final int TWOFIVE = 25; + private static final int FOURTEN = 40; + private static final int HALFHUNDRED = 50; + private static final int HUNDRED = 100; + private static final int TWOHUNDRED = 200; + private static final int THREEHUNDRED = 300; + private static final int FOURHUNDRED = 400; + private static final int DIALOGWIDTH = 150; + private static final int DIALOGHEIGHT = 220; + private static final int SHOWVALBUTTONWIDTH = 70; + private static final int SHOWVALBUTTONHEIGHTH = 25; + public int showValue = 100; + public double resolutionTimes = 1.0; + private static JFormSliderPane THIS; + private UITextField showVal; + private JSpinner showValSpinner; + private UISlider slider; + private int times; + private int sliderValue; + private UIButton downButton; + private UIButton upButton; + private UIButton showValButton; + private UIRadioButton twoHundredButton; + private UIRadioButton oneHundredButton; + private UIRadioButton SevenFiveButton; + private UIRadioButton fiveTenButton; + private UIRadioButton twoFiveButton; + private UIRadioButton selfAdaptButton; + private UIRadioButton customButton; + //拖动条处理和button、直接输入不一样 + private boolean isButtonOrIsTxt = true; + private FormPopupPane dialog; + private int upButtonX; + private JPanel dialogContentPanel; + + + public JFormSliderPane() { + this.setLayout(new BorderLayout()); + slider = new UISlider(0,HUNDRED,HALFHUNDRED); + slider.setUI(new JSliderPaneUI(slider)); + slider.addChangeListener(listener); + + showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOURHUNDRED, 1)); + showValSpinner.setEnabled(true); + showValSpinner.addChangeListener(showValSpinnerChangeListener); + showValSpinner.setPreferredSize(new Dimension(SPINNERWIDTH, SPINNERHEIGHT)); + //MoMeak:控制只能输入10-400,但是用起来感觉不舒服,先注释掉吧 +// JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0"); +// showValSpinner.setEditor(editor); +// JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField(); +// textField.setEditable(true); +// DefaultFormatterFactory factory = (DefaultFormatterFactory) textField .getFormatterFactory(); +// NumberFormatter formatter = (NumberFormatter) factory.getDefaultFormatter(); +// formatter.setAllowsInvalid(false); + downButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveDown.png")); + upButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/source/moveUp.png")); + downButton.setActionCommand("less"); + upButton.setActionCommand("more"); + downButton.addActionListener(buttonActionListener); + upButton.addActionListener(buttonActionListener); + + showValButton = new UIButton(showValSpinner.getValue()+"%"); + showValButton.setBorderPainted(false); + showValButton.setPreferredSize(new Dimension(SHOWVALBUTTONWIDTH,SHOWVALBUTTONHEIGHTH)); + showValButton.addActionListener(showValButtonActionListener); + + initUIRadioButton(); + initPane(); + JPanel panel = new JPanel(new FlowLayout(1,1,0)); + panel.add(downButton); + panel.add(slider); + panel.add(upButton); + panel.add(showValButton); + this.add(panel,BorderLayout.NORTH); + this.setBounds(0,0,THREEHUNDRED,ONEEIGHT); + } + + public static final JFormSliderPane getInstance() { +// if (THIS == null) { +// THIS = new JFormSliderPane(); +// } + THIS = new JFormSliderPane(); + return THIS; + } + + private void initUIRadioButton(){ + twoHundredButton = new UIRadioButton("200%"); + oneHundredButton = new UIRadioButton("100%"); + SevenFiveButton = new UIRadioButton("75%"); + fiveTenButton = new UIRadioButton("50%"); + twoFiveButton = new UIRadioButton("25%"); +// selfAdaptButton = new UIRadioButton(Inter.getLocText("FR-Designer_Scale_selfAdaptButton")); + customButton = new UIRadioButton(Inter.getLocText("FR-Designer_Scale_customButton")); + twoHundredButton.addItemListener(radioButtonItemListener); + oneHundredButton.addItemListener(radioButtonItemListener); + SevenFiveButton.addItemListener(radioButtonItemListener); + fiveTenButton.addItemListener(radioButtonItemListener); + twoFiveButton.addItemListener(radioButtonItemListener); + //TODO +// selfAdaptButton.addItemListener(); + + ButtonGroup bg=new ButtonGroup();// 初始化按钮组 + bg.add(twoHundredButton);// 加入按钮组 + bg.add(oneHundredButton); + bg.add(SevenFiveButton); + bg.add(fiveTenButton); + bg.add(twoFiveButton); +// bg.add(selfAdaptButton); + bg.add(customButton); + customButton.setSelected(true); + } + + private void initPane(){ + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, f }; + double[] rowSize = { p,p,p,p,p,p,p}; + Component[][] components = new Component[][]{ + new Component[]{twoHundredButton,null}, + new Component[]{oneHundredButton,null}, + new Component[]{SevenFiveButton,null}, + new Component[]{fiveTenButton,null}, + new Component[]{twoFiveButton,null}, +// new Component[]{selfAdaptButton,null}, + new Component[]{customButton,createSpinnerPanel()} + }; + dialogContentPanel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + } + + private JPanel createSpinnerPanel(){ + JPanel spinnerPanel = new JPanel(new FlowLayout()); + spinnerPanel.add(showValSpinner); + UILabel percent = new UILabel("%"); + percent.setFont(new Font("Dialog", Font.PLAIN, FONTSIZE)); + spinnerPanel.add(percent); + return spinnerPanel; + } + + ActionListener showValButtonActionListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popupDialog(); + } + }; + + ChangeListener showValSpinnerChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + int val = (int) ((UIBasicSpinner)e.getSource()).getValue(); + isButtonOrIsTxt = true; + resolutionTimes = divide(showValue,100,2); + refreshSlider(val); + refreshBottun(val); + } + }; + + + //定义一个监听器,用于监听所有滑动条 + ChangeListener listener = new ChangeListener() + { + public void stateChanged( ChangeEvent event) { + //取出滑动条的值,并在文本中显示出来 + if (!isButtonOrIsTxt){ + customButton.setSelected(true); + EventQueue.invokeLater(new Runnable() { + public void run() { + sliderValue = slider.getValue(); + getTimes(sliderValue); + showValue = times; + showValSpinner.setValue(times); + } + }); + }else { + isButtonOrIsTxt = false; + } + } + }; + + ItemListener radioButtonItemListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + JRadioButton temp=(JRadioButton)e.getSource(); + if(temp.isSelected()){ + showValSpinner.setValue(Integer.valueOf(temp.getText().substring(0, temp.getText().indexOf("%")))); + } + } + }; + + private void refreshSlider(int val){ + showValue = val; + if (showValue >HUNDRED){ + slider.setValue((int)(showValue+TWOHUNDRED)/SIX); + }else if (showValue = TEN ){ + showValue = newDownVal; + showValSpinner.setValue(newDownVal); + }else { + showValue = newDownVal; + showValSpinner.setValue(TEN); + } + } + if(e.getActionCommand().equals("more")){ + int newUpVal = showValue + TEN; + if (newUpVal <= FOURHUNDRED ){ + showValue = newUpVal; + showValSpinner.setValue(newUpVal); + }else { + showValue = newUpVal; + showValSpinner.setValue(FOURHUNDRED); + } + } + isButtonOrIsTxt = true; + customButton.setSelected(true); + } + }; + + + + private void getTimes(int value){ + if (value == HALFHUNDRED){ + times=HUNDRED; + }else if (value < HALFHUNDRED){ + times = (int) Math.round(ONEPOINTEIGHT*value + TEN); + }else { + times = (int) (SIX*value - TWOHUNDRED); + } + } + + + public JSpinner getShowVal(){ + return this.showValSpinner; + } + + public UIRadioButton getSelfAdaptButton(){ + return this.selfAdaptButton; + } + + private void popupDialog(){ + Point btnCoords = upButton.getLocationOnScreen(); + if (dialog == null){ + dialog = new FormPopupPane(upButton,dialogContentPanel); + if (upButtonX == 0) { + upButtonX = btnCoords.x; + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() + SHOWVALBUTTONWIDTH , -DIALOGHEIGHT); + } + }else { + if (upButtonX == 0) { + upButtonX = btnCoords.x; + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +SHOWVALBUTTONWIDTH, -DIALOGHEIGHT); + } else { + GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOGWIDTH + upButton.getWidth() +SHOWVALBUTTONWIDTH, -DIALOGHEIGHT); + } + } + } + + public static void main(String[] args) + { + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel)jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(JFormSliderPane.getInstance(),BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(400, 80); + jf.setVisible(true); + + } +} + +//class JFromSliderPaneUI extends BasicSliderUI { +// +// private static final int VERTICAL_WIDTH = 11; +// private static final int VERTICAL_HEIGHT = 16; +// private static final int FOUR = 4; +// private static final int FIVE = 5; +// private static final int SIX = 6; +// +// public JFromSliderPaneUI(UISlider b) { +// super(b); +// } +// +// /** */ +// /** +// * 绘制指示物 +// */ +// +// public Dimension getThumbSize() { +// Dimension size = new Dimension(); +// +// if ( slider.getOrientation() == JSlider.VERTICAL ) { +// size.width = VERTICAL_WIDTH; +// size.height = VERTICAL_HEIGHT; +// } +// else { +// size.width = VERTICAL_WIDTH; +// size.height = VERTICAL_HEIGHT; +// } +// +// return size; +// } +// +// public void paintThumb(Graphics g) { +// Rectangle knobBounds = thumbRect; +// int w = knobBounds.width; +// int h = knobBounds.height; +// +// g.translate(knobBounds.x, knobBounds.y); +// if ( slider.isEnabled() ) { +// g.setColor(slider.getBackground()); +// } +// else { +// g.setColor(slider.getBackground().darker()); +// } +// g.setColor(Color.darkGray); +// g.fillRect(0, 1, w-SIX, h+1); +// } +// +// /** */ +// /** +// * 绘制刻度轨迹 +// */ +// public void paintTrack(Graphics g) { +// int cy, cw; +// Rectangle trackBounds = trackRect; +// if (slider.getOrientation() == UISlider.HORIZONTAL) { +// Graphics2D g2 = (Graphics2D) g; +// cy = (trackBounds.height / 2); +// cw = trackBounds.width; +// g.setColor(Color.lightGray); +// g.drawLine(0, cy, cw+FIVE, cy); +// g.drawLine(FIVE+cw/2, cy-FOUR, FIVE+cw/2, cy+FOUR); +// } else { +// super.paintTrack(g); +// } +// } +// +//} +// +class FormPopupPane extends JPopupMenu { + private JComponent contentPane; + private static final int UPLABELHEIGHT = 25; + private static final int HALFHUNDRED = 50; + private static final int DIALOGWIDTH = 150; + private static final int DIALOGHEIGHT = 220; + private static final int UPLABELWIDTH = 300; + private JComponent centerPane; + private UILabel upLabel; + FormPopupPane(UIButton b,JPanel dialogContentPanel) { + contentPane = new JPanel(new BorderLayout()); + centerPane = new JPanel(new BorderLayout()); + upLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); + upLabel.setOpaque(true); + upLabel.setPreferredSize(new Dimension(UPLABELWIDTH,UPLABELHEIGHT)); + upLabel.setBackground(Color.LIGHT_GRAY); + upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); + centerPane.add(dialogContentPanel,BorderLayout.NORTH); + contentPane.add(upLabel,BorderLayout.NORTH); + contentPane.add(centerPane,BorderLayout.CENTER); +// contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); + this.add(contentPane, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(DIALOGWIDTH, DIALOGHEIGHT)); + this.setOpaque(false); + } + + +} \ No newline at end of file From 2b45c73474cb2abb7caefcdc2a6b07b64042855e Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 24 Jul 2017 15:58:26 +0800 Subject: [PATCH 092/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 60 ++++++++++--------- .../fr/design/mainframe/ReportComponent.java | 4 -- .../mainframe/ReportComponentCardPane.java | 6 +- .../mainframe/ReportComponentComposite.java | 4 +- .../mainframe/ReportHyperlinkGroupPane.java | 5 -- .../form/FormReportComponentComposite.java | 6 +- .../com/fr/design/present/BarCodePane.java | 10 ---- designer/src/com/fr/poly/PolyDesignUI.java | 11 +--- .../src/com/fr/poly/creator/BlockCreator.java | 5 ++ .../fr/poly/creator/ChartBlockCreator.java | 9 +++ .../com/fr/poly/creator/ECBlockCreator.java | 13 ++++ 11 files changed, 71 insertions(+), 62 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 5ab98eef79..e99c24a948 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -345,29 +345,31 @@ public class JWorkBook extends JTemplate { public void setScale(int resolution) { //更新resolution this.resolution = resolution; - if (reportComposite.centerCardPane.editingComponet.elementCasePane != null){ - reportComposite.centerCardPane.editingComponet.elementCasePane.setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setResolution(resolution); + ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane; + PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi(); + if (elementCasePane != null){ + elementCasePane.setResolution(resolution); + elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); + elementCasePane.getGrid().setResolution(resolution); //更新Grid - Grid grid = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid(); - DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); - DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(reportComposite.centerCardPane.editingComponet.elementCasePane.getEditingElementCase()); + Grid grid = elementCasePane.getGrid(); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase()); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase()); grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().updateUI(); + elementCasePane.getGrid().updateUI(); //更新Column和Row - ((DynamicScrollBar)reportComposite.centerCardPane.editingComponet.elementCasePane.getVerticalScrollBar()).setDpi(resolution); - ((DynamicScrollBar)reportComposite.centerCardPane.editingComponet.elementCasePane.getHorizontalScrollBar()).setDpi(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridColumn().updateUI(); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().setResolution(resolution); - reportComposite.centerCardPane.editingComponet.elementCasePane.getGridRow().updateUI(); + ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution); + ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution); + elementCasePane.getGridColumn().setResolution(resolution); + elementCasePane.getGridColumn().updateUI(); + elementCasePane.getGridRow().setResolution(resolution); + elementCasePane.getGridRow().updateUI(); } - if (reportComposite.centerCardPane.polyDezi != null){ - reportComposite.centerCardPane.polyDezi.setResolution(resolution); + if (polyDezi != null){ + polyDezi.setResolution(resolution); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setJTemplateResolution(resolution); - reportComposite.centerCardPane.polyDezi.updateUI(); + polyDezi.updateUI(); } // reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setVerticalValue(10); @@ -375,27 +377,29 @@ public class JWorkBook extends JTemplate { } @Override public int selfAdaptUpdate(){ + PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi(); + ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane; if (resolution == 0){ resolution = ScreenResolution.getScreenResolution(); } - if (reportComposite.centerCardPane.polyDezi.getSelection() !=null){ - BlockCreator blockCreator =reportComposite.centerCardPane.polyDezi.getSelection(); + if (polyDezi.getSelection() !=null){ + BlockCreator blockCreator =polyDezi.getSelection(); double x = blockCreator.getEditorBounds().getX(); double y = blockCreator.getEditorBounds().getY(); - reportComposite.centerCardPane.polyDezi.setHorizontalValue((int) x); - reportComposite.centerCardPane.polyDezi.setVerticalValue((int) y); + polyDezi.setHorizontalValue((int) x); + polyDezi.setVerticalValue((int) y); double creatorHeight = blockCreator.getEditorBounds().height; double creatorWidth = blockCreator.getEditorBounds().width; - double areaHeight = reportComposite.centerCardPane.polyDezi.polyArea.getHeight(); - double areaWidth = reportComposite.centerCardPane.polyDezi.polyArea.getWidth(); + double areaHeight = polyDezi.polyArea.getHeight(); + double areaWidth = polyDezi.polyArea.getWidth(); if (creatorWidth == 0||creatorHeight == 0){ return resolution; } double time =(areaHeight/creatorHeight)<(areaWidth/creatorWidth) ? (areaHeight/creatorHeight) : (areaWidth/creatorWidth); - return (int) (time * reportComposite.centerCardPane.polyDezi.getResolution()); + return (int) (time * polyDezi.getResolution()); - }else if (reportComposite.centerCardPane.editingComponet.elementCasePane != null) { - ElementCasePane reportPane = reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getElementCasePane(); + }else if (elementCasePane != null) { + ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); int column = reportPane.getSelection().getSelectedColumns()[0]; double columnLength = reportPane.getSelection().getSelectedColumns().length; double columnExtent = reportPane.getGrid().getHorizontalExtent(); @@ -405,12 +409,12 @@ public class JWorkBook extends JTemplate { if (columnLength == 0||rowLength == 0){ return resolution; } - double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); + double time = (columnExtent/columnLength) < (rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); if (reportPane.isHorizontalScrollBarVisible()) { reportPane.getVerticalScrollBar().setValue(row); reportPane.getHorizontalScrollBar().setValue(column); } - return (int) (time * reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().getResolution()); + return (int) (time * elementCasePane.getGrid().getResolution()); }else { return resolution; } diff --git a/designer/src/com/fr/design/mainframe/ReportComponent.java b/designer/src/com/fr/design/mainframe/ReportComponent.java index 42342f24e7..6ca2685454 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponent.java +++ b/designer/src/com/fr/design/mainframe/ReportComponent.java @@ -27,13 +27,9 @@ import com.fr.design.selection.Selectedable; */ public abstract class ReportComponent extends TargetComponent implements Selectedable { protected E elementCasePane; -// protected P polyElementCasePane; public E getEditingElementCasePane() { return elementCasePane; } -// public P getEditingPolyElementCasePane() { -// return polyElementCasePane; -// } public ReportComponent(T t) { super(t); } diff --git a/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java b/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java index cc45cf5e90..f574892c92 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentCardPane.java @@ -25,7 +25,7 @@ public class ReportComponentCardPane extends JComponent implements TargetModifie private CardLayout cl; private WorkSheetDesigner sheetDezi; - protected PolyDesigner polyDezi; + private PolyDesigner polyDezi; public ReportComponentCardPane() { this.setLayout(cl = new CardLayout()); @@ -37,6 +37,10 @@ public class ReportComponentCardPane extends JComponent implements TargetModifie } } + public PolyDesigner getPolyDezi(){ + return this.polyDezi; + } + protected void stopEditing() { if (editingComponet != null) { editingComponet.stopEditing(); diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 1b4fcdd1d2..15a4b32331 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -73,8 +73,8 @@ public class ReportComponentComposite extends JComponent { @Override public void stateChanged(ChangeEvent e) { double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); - value = value>MAX ? MAX : value; - value = value MAX ? MAX : value; + value = value < MIN ? MIN : value; int resolution = (int) (ScreenResolution.getScreenResolution()*value/HUND); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); } diff --git a/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java index 64c397da1b..d4f06ea4cd 100644 --- a/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java +++ b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java @@ -27,11 +27,6 @@ public class ReportHyperlinkGroupPane extends HyperlinkGroupPane { } public void populate(ElementCasePane reportPane) { -// TemplateElementCase elementCase = ePane.getEditingElementCase(); -// if (elementCase == null) { -// return; -// } -// ePane.getSelection().populatePropertyPane(ePane); final TemplateElementCase report = reportPane.getEditingElementCase(); NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report); populate(nameHyperlinks); diff --git a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java index d9ad0f35f3..67521bf3a3 100644 --- a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java @@ -54,9 +54,9 @@ public class FormReportComponentComposite extends JComponent implements TargetMo @Override public void stateChanged(ChangeEvent e) { double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); - value = value>MAX ? MAX : value; - value = value MAX ? MAX : value; + value = value < MIN ? MIN : value; + int resolution = (int) (ScreenResolution.getScreenResolution()*value/HUND); JForm jf = (JForm) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); } diff --git a/designer/src/com/fr/design/present/BarCodePane.java b/designer/src/com/fr/design/present/BarCodePane.java index 1d59bee6c7..27a42a7e98 100644 --- a/designer/src/com/fr/design/present/BarCodePane.java +++ b/designer/src/com/fr/design/present/BarCodePane.java @@ -69,16 +69,6 @@ public class BarCodePane extends FurtherBasicBeanPane { addlistener(); } - public static void main(String[] args){ - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel)jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(new BarCodePane(),BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(270, 400); - jf.setVisible(true); - } private void initComponents() { barCodePreviewPane = new BarCodePreviewPane(); diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index 58ed225b85..bc5fb7af86 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -111,15 +111,8 @@ public class PolyDesignUI extends ComponentUI { BlockCreator creator = addedData.getAddedAt(i); // richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来 if (creator == designer.getSelection()) { - if (creator instanceof ECBlockCreator){ - int x = (int) ((creator.getX()-CREATORWIDTH)*time)+CREATORWIDTH; - int y = (int) ((creator.getY()-CREATORGEIGHT)*time)+CREATORGEIGHT; - paintPositionLine(g, x, y, (int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time)); - }else { - int x = (int) (creator.getX()*time); - int y = (int) (creator.getY()*time); - paintPositionLine(g, x, y, (int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time)); - } + paintPositionLine(g, creator.getX(time), creator.getY(time), + (int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time)); if (creator.getEditor().isDragging()) { creator.getEditor().paintAbsorptionline(g); //如果与其他块重合了, 需要画出提示禁止重叠 diff --git a/designer/src/com/fr/poly/creator/BlockCreator.java b/designer/src/com/fr/poly/creator/BlockCreator.java index 1719c42ebd..052e111a8e 100644 --- a/designer/src/com/fr/poly/creator/BlockCreator.java +++ b/designer/src/com/fr/poly/creator/BlockCreator.java @@ -89,6 +89,11 @@ public abstract class BlockCreator extends JComponent i public abstract BlockEditor getEditor(); + public abstract int getX(float time); + + public abstract int getY(float time); + + /** * 检测按钮状态 diff --git a/designer/src/com/fr/poly/creator/ChartBlockCreator.java b/designer/src/com/fr/poly/creator/ChartBlockCreator.java index 93e25d21e0..d713356c60 100644 --- a/designer/src/com/fr/poly/creator/ChartBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ChartBlockCreator.java @@ -71,6 +71,15 @@ public class ChartBlockCreator extends BlockCreator { return editor; } + @Override + public int getX(float time) { + return (int) (this.getX() * time); + } + + @Override + public int getY(float time) { + return (int) (this.getY() * time); + } /** diff --git a/designer/src/com/fr/poly/creator/ECBlockCreator.java b/designer/src/com/fr/poly/creator/ECBlockCreator.java index c98c6f7082..860b65d72a 100644 --- a/designer/src/com/fr/poly/creator/ECBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ECBlockCreator.java @@ -23,6 +23,9 @@ import com.fr.stable.unit.UnitRectangle; */ public class ECBlockCreator extends BlockCreator { private ECBlockEditor editor; + private static final int CREATORWIDTH = 30; + private static final int CREATORGEIGHT = 19; + public ECBlockCreator() { @@ -64,6 +67,16 @@ public class ECBlockCreator extends BlockCreator { return editor; } + @Override + public int getX(float time) { + return (int) ((this.getX() - CREATORWIDTH) * time) + CREATORWIDTH; + } + + @Override + public int getY(float time) { + return (int) ((this.getY() - CREATORGEIGHT) * time) + CREATORGEIGHT; + } + /** * 检测按钮状态 * From 3d10040e4ff8ae9d20e8608db37768b2005c8ab2 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 24 Jul 2017 16:07:48 +0800 Subject: [PATCH 093/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/mainframe/JWorkBook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index e99c24a948..159886966a 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -382,7 +382,7 @@ public class JWorkBook extends JTemplate { if (resolution == 0){ resolution = ScreenResolution.getScreenResolution(); } - if (polyDezi.getSelection() !=null){ + if (polyDezi != null && polyDezi.getSelection() != null){ BlockCreator blockCreator =polyDezi.getSelection(); double x = blockCreator.getEditorBounds().getX(); double y = blockCreator.getEditorBounds().getY(); From 48009352321da1ba75460dc65483baa00fb5637c Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 24 Jul 2017 18:15:03 +0800 Subject: [PATCH 094/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86-=E5=A2=9E=E5=8A=A0=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 2 + .../mainframe/ReportComponentComposite.java | 35 +++- .../form/FormReportComponentComposite.java | 100 ++++++++++-- .../fr/design/mainframe/JFormSliderPane.java | 149 +++++------------- .../com/fr/design/mainframe/JSliderPane.java | 97 ++++++------ .../src/com/fr/design/mainframe/FormArea.java | 38 ++++- .../src/com/fr/design/mainframe/JForm.java | 71 +++------ 7 files changed, 275 insertions(+), 217 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 6682a6fa58..7683d8c3bc 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -242,6 +242,8 @@ public abstract class ElementCasePane extends Tar initFormatBrush(); } + + public int getMenuState() { return DesignState.WORK_SHEET; } diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 15a4b32331..6019d1c0df 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -1,8 +1,7 @@ package com.fr.design.mainframe; import java.awt.BorderLayout; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; +import java.awt.event.*; import java.util.ArrayList; import javax.swing.JComponent; @@ -51,6 +50,8 @@ public class ReportComponentComposite extends JComponent { private JSliderPane jSliderContainer; + private boolean isCtrl = false; + /** * Constructor with workbook.. @@ -67,8 +68,38 @@ public class ReportComponentComposite extends JComponent { this.add(createSouthControlPane(), BorderLayout.SOUTH); jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener); jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener); + this.centerCardPane.editingComponet.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener); + this.centerCardPane.editingComponet.elementCasePane.getGrid().addKeyListener(showValSpinnerKeyListener); } + KeyListener showValSpinnerKeyListener = new KeyListener() { + @Override + public void keyTyped(KeyEvent e) { + + } + @Override + public void keyPressed(KeyEvent e) { + if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ + isCtrl = true ; + } + } + @Override + public void keyReleased(KeyEvent e) { + isCtrl = false ; + } + }; + + MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { + @Override + public void mouseWheelMoved(MouseWheelEvent e) { + if (isCtrl){ + int dir = e.getWheelRotation(); + int old_resolution = (int) jSliderContainer.getShowVal().getValue(); + jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); + } + } + }; + ChangeListener showValSpinnerChangeListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { diff --git a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java index 67521bf3a3..9f4aebccc6 100644 --- a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java @@ -1,26 +1,27 @@ package com.fr.design.mainframe.form; +import com.fr.base.DynamicUnitList; import com.fr.base.ScreenResolution; +import com.fr.design.cell.bar.DynamicScrollBar; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.BaseJForm; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.JForm; -import com.fr.design.mainframe.JSliderPane; +import com.fr.design.mainframe.*; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.form.FormElementCaseContainerProvider; import com.fr.form.FormElementCaseProvider; +import com.fr.grid.Grid; +import com.fr.grid.GridUtils; +import com.fr.report.ReportHelper; import com.fr.report.worksheet.FormElementCase; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; +import java.awt.event.*; /** * 整个FormElementCase编辑区域 包括滚动条、中间的grid或者聚合块、下面的sheetTab @@ -36,7 +37,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo private FormTabPane sheetNameTab; private JPanel hbarContainer; private JSliderPane jSliderContainer; - + private boolean isCtrl = false; public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { this.jForm = jform; @@ -47,9 +48,42 @@ public class FormReportComponentComposite extends JComponent implements TargetMo this.add(createSouthControlPane(), BorderLayout.SOUTH); jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener); jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener); + ((JForm)this.jForm).getFormDesign().getArea().addMouseWheelListener(showValSpinnerMouseWheelListener); + ((JForm)this.jForm).getFormDesign().getArea().addKeyListener(showValSpinnerKeyListener); + this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener); + this.elementCaseDesigner.elementCasePane.getGrid().addKeyListener(showValSpinnerKeyListener); elementCaseDesigner.addTargetModifiedListener(this); } + KeyListener showValSpinnerKeyListener = new KeyListener() { + @Override + public void keyTyped(KeyEvent e) { + + } + @Override + public void keyPressed(KeyEvent e) { + if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ + isCtrl = true ; + } + } + @Override + public void keyReleased(KeyEvent e) { + isCtrl = false ; + } + }; + + MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { + @Override + public void mouseWheelMoved(MouseWheelEvent e) { + if (isCtrl){ + int dir = e.getWheelRotation(); + int old_resolution = (int) jSliderContainer.getShowVal().getValue(); + jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); + } + } + }; + + ChangeListener showValSpinnerChangeListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { @@ -57,8 +91,8 @@ public class FormReportComponentComposite extends JComponent implements TargetMo value = value > MAX ? MAX : value; value = value < MIN ? MIN : value; int resolution = (int) (ScreenResolution.getScreenResolution()*value/HUND); - JForm jf = (JForm) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); + setScale(resolution); +// HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); } }; @@ -66,7 +100,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo @Override public void itemStateChanged(ItemEvent e) { if (jSliderContainer.getSelfAdaptButton().isSelected()){ - int resolution = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().selfAdaptUpdate(); + int resolution = selfAdaptUpdate(); jSliderContainer.getShowVal().setValue(resolution*HUND/ScreenResolution.getScreenResolution()); } } @@ -74,6 +108,52 @@ public class FormReportComponentComposite extends JComponent implements TargetMo private java.util.List targetModifiedList = new java.util.ArrayList(); + private void setScale(int resolution){ + JForm jForm = (JForm) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + ElementCasePane elementCasePane = ((FormReportComponentComposite)jForm.getReportComposite()).elementCaseDesigner.getEditingElementCasePane(); + elementCasePane.setResolution(resolution); + elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); + elementCasePane.getGrid().setResolution(resolution); + //更新Grid + Grid grid = elementCasePane.getGrid(); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase()); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase()); + grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); + grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); + elementCasePane.getGrid().updateUI(); + //更新Column和Row + ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution); + ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution); + elementCasePane.getGridColumn().setResolution(resolution); + elementCasePane.getGridColumn().updateUI(); + elementCasePane.getGridRow().setResolution(resolution); + elementCasePane.getGridRow().updateUI(); + } + + private int selfAdaptUpdate(){ + JForm jForm = (JForm) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jForm.resolution == 0){ + jForm.resolution = ScreenResolution.getScreenResolution(); + } + ElementCasePane elementCasePane = ((FormReportComponentComposite)jForm.getReportComposite()).elementCaseDesigner.getEditingElementCasePane(); + ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); + int column = reportPane.getSelection().getSelectedColumns()[0]; + double columnLength = reportPane.getSelection().getSelectedColumns().length; + double columnExtent = reportPane.getGrid().getHorizontalExtent(); + int row = reportPane.getSelection().getSelectedRows()[0]; + double rowLength = reportPane.getSelection().getSelectedRows().length; + double rowExtent = reportPane.getGrid().getVerticalExtent(); + if (columnLength == 0||rowLength == 0){ + return jForm.resolution; + } + double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); + if (reportPane.isHorizontalScrollBarVisible()) { + reportPane.getVerticalScrollBar().setValue(row); + reportPane.getHorizontalScrollBar().setValue(column); + } + return (int) (time * elementCasePane.getGrid().getResolution()); + } + /** * 添加目标改变的监听 * @param targetModifiedListener 目标改变事件 diff --git a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java index dd6fdb756d..92b3fd6479 100644 --- a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java @@ -29,21 +29,19 @@ public class JFormSliderPane extends JPanel { private static final double ONEPOINTEIGHT = 1.8; private static final int SIX = 6; private static final int TEN = 10; - private static final int ONEEIGHT = 18; - private static final int FONTSIZE = 14; - private static final int SPINNERWIDTH= 45; - private static final int SPINNERHEIGHT = 20; - private static final int TWOFIVE = 25; - private static final int FOURTEN = 40; - private static final int HALFHUNDRED = 50; + private static final int ONE_EIGHT = 18; + private static final int FONT_SIZE = 14; + private static final int SPINNER_WIDTH= 45; + private static final int SPINNER_HEIGHT = 20; + private static final int HALF_HUNDRED = 50; private static final int HUNDRED = 100; - private static final int TWOHUNDRED = 200; - private static final int THREEHUNDRED = 300; - private static final int FOURHUNDRED = 400; - private static final int DIALOGWIDTH = 150; - private static final int DIALOGHEIGHT = 220; - private static final int SHOWVALBUTTONWIDTH = 70; - private static final int SHOWVALBUTTONHEIGHTH = 25; + private static final int TWO_HUNDRED = 200; + private static final int THREE_HUNDRED = 300; + private static final int FOUR_HUNDRED = 400; + private static final int DIALOG_WIDTH = 150; + private static final int DIALOG_HEIGHT = 240; + private static final int SHOWVALBUTTON_WIDTH = 70; + private static final int SHOWVALBUTTON_HEIGHTH = 25; public int showValue = 100; public double resolutionTimes = 1.0; private static JFormSliderPane THIS; @@ -71,14 +69,14 @@ public class JFormSliderPane extends JPanel { public JFormSliderPane() { this.setLayout(new BorderLayout()); - slider = new UISlider(0,HUNDRED,HALFHUNDRED); + slider = new UISlider(0,HUNDRED,HALF_HUNDRED); slider.setUI(new JSliderPaneUI(slider)); slider.addChangeListener(listener); - showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOURHUNDRED, 1)); + showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOUR_HUNDRED, 1)); showValSpinner.setEnabled(true); showValSpinner.addChangeListener(showValSpinnerChangeListener); - showValSpinner.setPreferredSize(new Dimension(SPINNERWIDTH, SPINNERHEIGHT)); + showValSpinner.setPreferredSize(new Dimension(SPINNER_WIDTH, SPINNER_HEIGHT)); //MoMeak:控制只能输入10-400,但是用起来感觉不舒服,先注释掉吧 // JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0"); // showValSpinner.setEditor(editor); @@ -96,7 +94,7 @@ public class JFormSliderPane extends JPanel { showValButton = new UIButton(showValSpinner.getValue()+"%"); showValButton.setBorderPainted(false); - showValButton.setPreferredSize(new Dimension(SHOWVALBUTTONWIDTH,SHOWVALBUTTONHEIGHTH)); + showValButton.setPreferredSize(new Dimension(SHOWVALBUTTON_WIDTH,SHOWVALBUTTON_HEIGHTH)); showValButton.addActionListener(showValButtonActionListener); initUIRadioButton(); @@ -107,7 +105,7 @@ public class JFormSliderPane extends JPanel { panel.add(upButton); panel.add(showValButton); this.add(panel,BorderLayout.NORTH); - this.setBounds(0,0,THREEHUNDRED,ONEEIGHT); + this.setBounds(0,0,THREE_HUNDRED,ONE_EIGHT); } public static final JFormSliderPane getInstance() { @@ -166,7 +164,7 @@ public class JFormSliderPane extends JPanel { JPanel spinnerPanel = new JPanel(new FlowLayout()); spinnerPanel.add(showValSpinner); UILabel percent = new UILabel("%"); - percent.setFont(new Font("Dialog", Font.PLAIN, FONTSIZE)); + percent.setFont(new Font("Dialog", Font.PLAIN, FONT_SIZE)); spinnerPanel.add(percent); return spinnerPanel; } @@ -184,6 +182,14 @@ public class JFormSliderPane extends JPanel { int val = (int) ((UIBasicSpinner)e.getSource()).getValue(); isButtonOrIsTxt = true; resolutionTimes = divide(showValue,100,2); + if (val > FOUR_HUNDRED){ + showValSpinner.setValue(FOUR_HUNDRED); + val = FOUR_HUNDRED; + } + if (val < TEN){ + showValSpinner.setValue(TEN); + val = TEN; + } refreshSlider(val); refreshBottun(val); } @@ -224,11 +230,11 @@ public class JFormSliderPane extends JPanel { private void refreshSlider(int val){ showValue = val; if (showValue >HUNDRED){ - slider.setValue((int)(showValue+TWOHUNDRED)/SIX); + slider.setValue((int)(showValue+TWO_HUNDRED)/SIX); }else if (showValue FOUR_HUNDRED){ + showValSpinner.setValue(FOUR_HUNDRED); + val = FOUR_HUNDRED; + } + if (val < TEN){ + showValSpinner.setValue(TEN); + val = TEN; + } refreshSlider(val); refreshBottun(val); } @@ -225,11 +229,11 @@ public class JSliderPane extends JPanel { private void refreshSlider(int val){ showValue = val; if (showValue >HUNDRED){ - slider.setValue((int)(showValue+TWOHUNDRED)/SIX); + slider.setValue((int)(showValue+TWO_HUNDRED)/SIX); }else if (showValue implements BaseJForm { return processInfo; } + public FormECCompositeProvider getReportComposite(){ + return this.reportComposite; + } + @Override public void setJTemplateResolution(int resolution) { @@ -264,25 +260,25 @@ public class JForm extends JTemplate implements BaseJForm { @Override public void setScale(int resolution) { - this.resolution = resolution; - ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane(); - elementCasePane.setResolution(resolution); - elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); - elementCasePane.getGrid().setResolution(resolution); - //更新Grid - Grid grid = elementCasePane.getGrid(); - DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase()); - DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase()); - grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); - grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); - elementCasePane.getGrid().updateUI(); - //更新Column和Row - ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution); - ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution); - elementCasePane.getGridColumn().setResolution(resolution); - elementCasePane.getGridColumn().updateUI(); - elementCasePane.getGridRow().setResolution(resolution); - elementCasePane.getGridRow().updateUI(); +// this.resolution = resolution; +// ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane(); +// elementCasePane.setResolution(resolution); +// elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); +// elementCasePane.getGrid().setResolution(resolution); +// //更新Grid +// Grid grid = elementCasePane.getGrid(); +// DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase()); +// DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase()); +// grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); +// grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); +// elementCasePane.getGrid().updateUI(); +// //更新Column和Row +// ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution); +// ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution); +// elementCasePane.getGridColumn().setResolution(resolution); +// elementCasePane.getGridColumn().updateUI(); +// elementCasePane.getGridRow().setResolution(resolution); +// elementCasePane.getGridRow().updateUI(); } @Override @@ -292,26 +288,7 @@ public class JForm extends JTemplate implements BaseJForm { @Override public int selfAdaptUpdate() { - if (resolution == 0){ - resolution = ScreenResolution.getScreenResolution(); - } - ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane(); - ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); - int column = reportPane.getSelection().getSelectedColumns()[0]; - double columnLength = reportPane.getSelection().getSelectedColumns().length; - double columnExtent = reportPane.getGrid().getHorizontalExtent(); - int row = reportPane.getSelection().getSelectedRows()[0]; - double rowLength = reportPane.getSelection().getSelectedRows().length; - double rowExtent = reportPane.getGrid().getVerticalExtent(); - if (columnLength == 0||rowLength == 0){ - return resolution; - } - double time =(columnExtent/columnLength)<(rowExtent/rowLength) ? (columnExtent/columnLength) : (rowExtent/rowLength); - if (reportPane.isHorizontalScrollBarVisible()) { - reportPane.getVerticalScrollBar().setValue(row); - reportPane.getHorizontalScrollBar().setValue(column); - } - return (int) (time * elementCasePane.getGrid().getResolution()); + return 0; } /** From 6b05f1fbbbfb6f09d832ca9d9854fa952b094dce Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 24 Jul 2017 18:41:39 +0800 Subject: [PATCH 095/101] =?UTF-8?q?REPORT-2539=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=94=B6=E9=9B=86=E5=88=B0=E4=BA=91=E4=B8=AD?= =?UTF-8?q?=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/InformationCollector.java | 2 + .../design/mainframe/errorinfo/ErrorInfo.java | 130 ++++++++++++++++ .../errorinfo/ErrorInfoLogAppender.java | 139 ++++++++++++++++++ .../errorinfo/ErrorInfoUploader.java | 98 ++++++++++++ 4 files changed, 369 insertions(+) create mode 100644 designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java create mode 100644 designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java create mode 100644 designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java diff --git a/designer/src/com/fr/design/mainframe/InformationCollector.java b/designer/src/com/fr/design/mainframe/InformationCollector.java index f50cc5dadf..4bac9a15b0 100644 --- a/designer/src/com/fr/design/mainframe/InformationCollector.java +++ b/designer/src/com/fr/design/mainframe/InformationCollector.java @@ -10,6 +10,7 @@ import com.fr.data.core.db.dml.Delete; import com.fr.data.core.db.dml.Select; import com.fr.data.core.db.dml.Table; import com.fr.design.DesignerEnvManager; +import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.general.*; import com.fr.general.http.HttpClient; @@ -317,6 +318,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { sendFunctionsInfo(); sendUserInfo(); TemplateInfoCollector.getInstance().sendTemplateInfo(); + ErrorInfoUploader.getInstance().sendErrorInfo(); } }); sendThread.start(); diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java new file mode 100644 index 0000000000..5f048caab4 --- /dev/null +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java @@ -0,0 +1,130 @@ +package com.fr.design.mainframe.errorinfo; + +import com.fr.base.FRContext; +import com.fr.general.IOUtils; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.stable.EncodeConstants; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; +import com.fr.stable.core.UUID; + +import java.io.*; +import java.text.DateFormat; +import java.util.Date; + +/** + * Created by Administrator on 2017/7/24 0024. + */ +public class ErrorInfo { + + private String username; + private String uuid; + private String activekey; + private String uploadtime; + private String templateid; + private String logid; + private String log; + + public ErrorInfo(String username, String uuid, String activekey) { + this.username = username; + this.uuid = uuid; + this.activekey = activekey; + this.uploadtime = dateToString(); + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getActivekey() { + return activekey; + } + + public void setActivekey(String activekey) { + this.activekey = activekey; + } + + public String getUploadtime() { + return uploadtime; + } + + public void setUploadtime(String uploadtime) { + this.uploadtime = uploadtime; + } + + public String getTemplateid() { + return templateid; + } + + public void setTemplateid(String templateid) { + this.templateid = templateid; + } + + public String getLogid() { + return logid; + } + + public void setLogid(String logid) { + this.logid = logid; + } + + public String getLog() { + return log; + } + + public void setLog(String log) { + this.log = log; + } + + private String dateToString(){ + DateFormat df = FRContext.getDefaultValues().getDateTimeFormat(); + return df.format(new Date()); + } + + /** + * Ϊjsonַ, ŵĿ¼. + * һϴ. + */ + public void saveAsJSON(){ + JSONObject jo = JSONObject.create(); + try { + jo.put("username", username); + jo.put("uuid", uuid); + jo.put("activekey", activekey); + jo.put("templateid", templateid); + jo.put("uploadtime", uploadtime); + jo.put("logid", logid); + jo.put("log", log); + } catch (JSONException ignore) { + } + + saveFileToCache(jo); + } + + private void saveFileToCache(JSONObject jo) { + String content = jo.toString(); + String fileName = UUID.randomUUID() + ErrorInfoUploader.SUFFIX; + File file = new File(StableUtils.pathJoin(ProductConstants.getEnvHome(), ErrorInfoUploader.FOLDER_NAME, fileName)); + try { + StableUtils.makesureFileExist(file); + FileOutputStream out = new FileOutputStream(file); + InputStream in = new ByteArrayInputStream(content.getBytes(EncodeConstants.ENCODING_UTF_8)); + IOUtils.copyBinaryTo(in, out); + out.close(); + } catch (IOException ignore) { + } + } +} diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java new file mode 100644 index 0000000000..f7423d2ba3 --- /dev/null +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -0,0 +1,139 @@ +package com.fr.design.mainframe.errorinfo; + +import com.fr.base.FRContext; +import com.fr.base.io.IOFile; +import com.fr.base.io.XMLReadHelper; +import com.fr.design.DesignerEnvManager; +import com.fr.general.FRLogLevel; +import com.fr.general.FRLogManager; +import com.fr.general.LogDuration; +import com.fr.stable.StringUtils; +import com.fr.stable.project.ProjectConstants; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; +import com.fr.web.core.SessionDealWith; +import com.fr.web.core.SessionIDInfor; +import org.apache.log4j.AppenderSkeleton; +import org.apache.log4j.Level; +import org.apache.log4j.spi.LoggingEvent; + +import java.io.InputStream; + +/** + * ռϢappender. + *

+ * Created by Administrator on 2017/7/24 0024. + */ +public class ErrorInfoLogAppender extends AppenderSkeleton { + + private static final int ERROR_LEN = 8; + + // ², ûҪƵȡ. + private String username; + private String uuid; + private String activekey; + + public ErrorInfoLogAppender() { + this.layout = new org.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"); + + DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); + this.username = envManager.getBBSName(); + this.uuid = envManager.getUUID(); + this.activekey = envManager.getActivationKey(); + } + + protected void append(LoggingEvent event) { + this.subAppend(event); + } + + public boolean requiresLayout() { + return true; + } + + public synchronized void close() { + if (this.closed) { + return; + } + this.closed = true; + + } + + public void subAppend(LoggingEvent event) { + Level level = event.getLevel(); + // ֻϴ¼errorϵ. + if (level.isGreaterOrEqual(FRLogLevel.ERROR)) { + String msg = this.layout.format(event); + // idһе, оͼ¼, ˵ԤģĴ. + String templateid = readTemplateID(); + String logid = readLogID(msg); + ErrorInfo errorInfo = new ErrorInfo(username, uuid, activekey); + errorInfo.setTemplateid(templateid); + errorInfo.setLog(msg); + errorInfo.setLogid(logid); + errorInfo.saveAsJSON(); + } + } + + private String readLogID(String log) { + int dotIndex = log.lastIndexOf(":"); + if (dotIndex != -1) { + int end = Math.min(dotIndex + ERROR_LEN, log.length()); + String logid = log.substring(dotIndex + 1, end).trim(); + try { + Long.parseLong(logid); + return logid; + } catch (Exception ignore) { + + } + } + + return StringUtils.EMPTY; + } + + private String readTemplateID() { + LogDuration logDuration = FRLogManager.getSession(); + if (logDuration == null) { + return StringUtils.EMPTY; + } + + String sessionID = logDuration.getSessionID(); + SessionIDInfor infor = SessionDealWith.getSessionIDInfor(sessionID); + if (infor == null) { + return StringUtils.EMPTY; + } + + String bookPath = infor.getBookPath(); + // iofileֻһtemplateid, ԺҪٶ. + IOFile file = new IOFile() { + @Override + public void readStream(InputStream in) throws Exception { + XMLableReader xmlReader = XMLReadHelper.createXMLableReader(in, XMLPrintWriter.XML_ENCODER); + xmlReader.readXMLObject(this); + xmlReader.close(); + in.close(); + } + + @Override + public void readXML(XMLableReader reader) { + super.readXML(reader); + readDesign(reader); + } + + @Override + protected String openTag() { + return StringUtils.EMPTY; + } + + @Override + protected void mainContent(XMLPrintWriter writer) { + } + }; + try { + file.readStream(FRContext.getCurrentEnv().readBean(bookPath, ProjectConstants.REPORTLETS_NAME)); + return file.getTemplateID(); + } catch (Exception ignore) { + } + + return StringUtils.EMPTY; + } +} \ No newline at end of file diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java new file mode 100644 index 0000000000..2ec8c6a3e3 --- /dev/null +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -0,0 +1,98 @@ +package com.fr.design.mainframe.errorinfo; + +import com.fr.general.*; +import com.fr.general.http.HttpClient; +import com.fr.json.JSONObject; +import com.fr.stable.CodeUtils; +import com.fr.stable.EnvChangedListener; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; + +import java.io.File; +import java.io.FileInputStream; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.HashMap; + +/** + * Created by Administrator on 2017/7/24 0024. + */ +public class ErrorInfoUploader { + + public static final String SUFFIX = ".json"; + public static final String FOLDER_NAME = "errorInfo"; + + private static ErrorInfoUploader collector; + + static { + GeneralContext.addEnvChangedListener(new EnvChangedListener() { + @Override + public void envChanged() { + FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender()); + } + }); + } + + private ErrorInfoUploader() { + FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender()); + } + + public static ErrorInfoUploader getInstance() { + if (collector == null) { + collector = new ErrorInfoUploader(); + } + + return collector; + } + + public void sendErrorInfo(){ + //ȡļjson, ϴ. + File folder = new File(StableUtils.pathJoin(ProductConstants.getEnvHome(), FOLDER_NAME)); + if (!folder.exists()) { + return; + } + + File[] files = folder.listFiles(); + try { + for (File file : files) { + String filePath = file.getPath(); + String suffix = filePath.substring(filePath.lastIndexOf(".")); + + Thread.sleep(1000L); + if (suffix.endsWith(SUFFIX)) { + String content = IOUtils.inputStream2String(new FileInputStream(file)); + String url = SiteCenter.getInstance().acquireUrlByKind("design.error"); + if (sendErroInfo(url, content)) { + file.delete(); + } + } + } + } catch (Exception ignore) { + + } + } + + private boolean sendErroInfo(String url, String content) { + HashMap para = new HashMap<>(); + String date = new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime()); + para.put("token", CodeUtils.md5Encode(date, "", "MD5")); + para.put("content", content); + HttpClient httpClient = new HttpClient(url, para, true); + httpClient.asGet(); + + if (!httpClient.isServerAlive()) { + return false; + } + + String res = httpClient.getResponseText(); + boolean success; + try { + success = ComparatorUtils.equals(new JSONObject(res).get("status"), "success"); + } catch (Exception ex) { + success = false; + } + return success; + } + + +} From 15f5f6b4341c5cdc634944b7974be8675d078d93 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 24 Jul 2017 18:42:57 +0800 Subject: [PATCH 096/101] utf8 --- .../com/fr/design/mainframe/errorinfo/ErrorInfo.java | 4 ++-- .../mainframe/errorinfo/ErrorInfoLogAppender.java | 10 +++++----- .../design/mainframe/errorinfo/ErrorInfoUploader.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java index 5f048caab4..c101706496 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfo.java @@ -95,8 +95,8 @@ public class ErrorInfo { } /** - * Ϊjsonַ, ŵĿ¼. - * һϴ. + * 将出错对象存为json字符串, 并放到设计器缓存目录. + * 等下一次上传到云中心. */ public void saveAsJSON(){ JSONObject jo = JSONObject.create(); diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index f7423d2ba3..1d4f65de53 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -20,7 +20,7 @@ import org.apache.log4j.spi.LoggingEvent; import java.io.InputStream; /** - * ռϢappender. + * 收集设计器报错信息的appender. *

* Created by Administrator on 2017/7/24 0024. */ @@ -28,7 +28,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { private static final int ERROR_LEN = 8; - // ², ûҪƵȡ. + // 缓存下不变的, 没必要频繁取. private String username; private String uuid; private String activekey; @@ -60,10 +60,10 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { public void subAppend(LoggingEvent event) { Level level = event.getLevel(); - // ֻϴ¼errorϵ. + // 只分析上传记录error以上的. if (level.isGreaterOrEqual(FRLogLevel.ERROR)) { String msg = this.layout.format(event); - // idһе, оͼ¼, ˵ԤģĴ. + // 这个id并不是一定会有的, 有就记录下, 说明是预览模板出的错. String templateid = readTemplateID(); String logid = readLogID(msg); ErrorInfo errorInfo = new ErrorInfo(username, uuid, activekey); @@ -103,7 +103,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { } String bookPath = infor.getBookPath(); - // iofileֻһtemplateid, ԺҪٶ. + // 这个iofile只读一个templateid, 其他以后有需要再读. IOFile file = new IOFile() { @Override public void readStream(InputStream in) throws Exception { diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 2ec8c6a3e3..3ee85b5720 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -46,7 +46,7 @@ public class ErrorInfoUploader { } public void sendErrorInfo(){ - //ȡļjson, ϴ. + //读取文件夹里的json, 加入上传队列中. File folder = new File(StableUtils.pathJoin(ProductConstants.getEnvHome(), FOLDER_NAME)); if (!folder.exists()) { return; From 13c06a5c7c75fe92d220f766c74be9f1534a322f Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 24 Jul 2017 18:44:53 +0800 Subject: [PATCH 097/101] 1 --- .../com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 3ee85b5720..0204d33a96 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -58,8 +58,8 @@ public class ErrorInfoUploader { String filePath = file.getPath(); String suffix = filePath.substring(filePath.lastIndexOf(".")); - Thread.sleep(1000L); if (suffix.endsWith(SUFFIX)) { + Thread.sleep(1000L); String content = IOUtils.inputStream2String(new FileInputStream(file)); String url = SiteCenter.getInstance().acquireUrlByKind("design.error"); if (sendErroInfo(url, content)) { From 8ad699c1bab852f5aeaea5f8713f8e5a4c5ed669 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 24 Jul 2017 19:32:49 +0800 Subject: [PATCH 098/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E4=BF=AE=E6=94=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B4=A8=E9=87=8F=EF=BC=8C=E5=8A=A0=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E6=96=B9=E6=B3=95=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 2 -- .../mainframe/ReportComponentComposite.java | 2 +- .../form/FormReportComponentComposite.java | 2 +- designer/src/com/fr/poly/PolyDesignUI.java | 2 -- .../com/fr/poly/creator/ECBlockCreator.java | 8 ++++---- .../com/fr/design/mainframe/JTemplate.java | 10 +++++++++- .../src/com/fr/design/mainframe/FormArea.java | 2 +- .../src/com/fr/design/mainframe/JForm.java | 19 ------------------- 8 files changed, 16 insertions(+), 31 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 159886966a..de214fb6dc 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -371,8 +371,6 @@ public class JWorkBook extends JTemplate { HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setJTemplateResolution(resolution); polyDezi.updateUI(); } -// reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setVerticalValue(10); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); } @Override diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 6019d1c0df..431a2ae5d9 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -79,7 +79,7 @@ public class ReportComponentComposite extends JComponent { } @Override public void keyPressed(KeyEvent e) { - if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ + if( e.isControlDown()){ isCtrl = true ; } } diff --git a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java index 9f4aebccc6..b6173c6d80 100644 --- a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java @@ -62,7 +62,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo } @Override public void keyPressed(KeyEvent e) { - if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ + if( e.isControlDown()){ isCtrl = true ; } } diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index bc5fb7af86..0eaf7c139e 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -47,8 +47,6 @@ public class PolyDesignUI extends ComponentUI { private static final double SCROLL_POINT = 50; private static final int SCROLL_DISTANCE = 15; - private static final int CREATORWIDTH = 30; - private static final int CREATORGEIGHT = 19; private static final int TEN = 10; private static final int HHUNDRED = 100; private PolyDesigner designer; diff --git a/designer/src/com/fr/poly/creator/ECBlockCreator.java b/designer/src/com/fr/poly/creator/ECBlockCreator.java index 860b65d72a..92313115e4 100644 --- a/designer/src/com/fr/poly/creator/ECBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ECBlockCreator.java @@ -23,8 +23,8 @@ import com.fr.stable.unit.UnitRectangle; */ public class ECBlockCreator extends BlockCreator { private ECBlockEditor editor; - private static final int CREATORWIDTH = 30; - private static final int CREATORGEIGHT = 19; + private static final int CREATOR_WIDTH = 30; + private static final int CREATOR_HEIGHT = 19; public ECBlockCreator() { @@ -69,12 +69,12 @@ public class ECBlockCreator extends BlockCreator { @Override public int getX(float time) { - return (int) ((this.getX() - CREATORWIDTH) * time) + CREATORWIDTH; + return (int) ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH; } @Override public int getY(float time) { - return (int) ((this.getY() - CREATORGEIGHT) * time) + CREATORGEIGHT; + return (int) ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT; } /** diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 2d8f42aad9..8f64ce9718 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -143,11 +143,13 @@ public abstract class JTemplate> ex return undoState; } + /** + * set/get 模板屏幕分辨率 + */ public abstract void setJTemplateResolution(int resolution); public abstract int getJTemplateResolution(); - ; /** * 初始化权限细粒度撤销状态 @@ -218,10 +220,16 @@ public abstract class JTemplate> ex */ public abstract void removeParameterPaneSelection(); + /** + * 缩放参数 + */ public abstract void setScale(int resolution); public abstract int getScale(); + /** + * 缩放参数自适应 + */ public abstract int selfAdaptUpdate(); protected abstract DesignModelAdapter createDesignModel(); diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index abab2469e4..6c59130df6 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -114,7 +114,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent { } @Override public void keyPressed(KeyEvent e) { - if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ + if( e.isControlDown()){ isCtrl = true ; } } diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 7ded93c6ee..7a3ca7ac4b 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -260,25 +260,6 @@ public class JForm extends JTemplate implements BaseJForm { @Override public void setScale(int resolution) { -// this.resolution = resolution; -// ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane(); -// elementCasePane.setResolution(resolution); -// elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); -// elementCasePane.getGrid().setResolution(resolution); -// //更新Grid -// Grid grid = elementCasePane.getGrid(); -// DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase()); -// DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase()); -// grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution)); -// grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); -// elementCasePane.getGrid().updateUI(); -// //更新Column和Row -// ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution); -// ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution); -// elementCasePane.getGridColumn().setResolution(resolution); -// elementCasePane.getGridColumn().updateUI(); -// elementCasePane.getGridRow().setResolution(resolution); -// elementCasePane.getGridRow().updateUI(); } @Override From 616c69a90c7713a74e1aad4aa69a7325a01648f5 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 25 Jul 2017 10:57:11 +0800 Subject: [PATCH 099/101] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E7=BC=A9=E6=94=BE=E6=9D=A1=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 4 +- .../mainframe/ReportComponentComposite.java | 18 ++++---- designer/src/com/fr/poly/PolyDesigner.java | 46 ++++++++++++++++--- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index de214fb6dc..b25b8f5faa 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -86,7 +86,7 @@ public class JWorkBook extends JTemplate { private static final int TOOLBARPANEDIMHEIGHT = 26; private UIModeControlContainer centerPane; - private ReportComponentComposite reportComposite; + public ReportComponentComposite reportComposite; private ParameterDefinitePane parameterPane; private int resolution; @@ -394,7 +394,7 @@ public class JWorkBook extends JTemplate { return resolution; } double time =(areaHeight/creatorHeight)<(areaWidth/creatorWidth) ? (areaHeight/creatorHeight) : (areaWidth/creatorWidth); - return (int) (time * polyDezi.getResolution()); + return (int) (time * ScreenResolution.getScreenResolution()); }else if (elementCasePane != null) { ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 431a2ae5d9..f2e81e00af 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -23,6 +23,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; import com.fr.grid.Grid; import com.fr.main.impl.WorkBook; +import com.fr.poly.PolyArea; import com.fr.report.report.TemplateReport; /** @@ -58,6 +59,8 @@ public class ReportComponentComposite extends JComponent { * */ public ReportComponentComposite(JWorkBook jwb) { + setFocusable(true); + setFocusTraversalKeysEnabled(false); this.parent = jwb; this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.add(centerCardPane = new ReportComponentCardPane(), BorderLayout.CENTER); @@ -135,6 +138,7 @@ public class ReportComponentComposite extends JComponent { return; } centerCardPane.populate(workbook.getTemplateReport(newIndex)); + if (parentContainer != null) { parentContainer.setDownPane(ReportComponentComposite.this); } @@ -184,6 +188,10 @@ public class ReportComponentComposite extends JComponent { return sheetNameTab.getSelectedIndex(); } + public JSliderPane getjSliderContainer(){ + return this.jSliderContainer; + } + public void setParentContainer(UIModeControlContainer parentContainer) { this.parentContainer = parentContainer; @@ -237,16 +245,6 @@ public class ReportComponentComposite extends JComponent { return southPane; } - private JComponent createSouthControlPaneWithJSliderPane() { - hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); - hbarContainer.add(centerCardPane.editingComponet.getHorizontalScrollBar()); - JSplitPane splitWithJSliderPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, hbarContainer, JSliderPane.getInstance()); - splitWithJSliderPane.setBorder(null); - splitWithJSliderPane.setDividerLocation(0.9); - splitWithJSliderPane.setDividerSize(3); - splitWithJSliderPane.setResizeWeight(1); - return splitWithJSliderPane; - } public void setSelectedIndex(int selectedIndex) { sheetNameTab.setSelectedIndex(selectedIndex); diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index e2a25aeb6d..57413a1293 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -4,8 +4,7 @@ package com.fr.poly; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.MouseEvent; +import java.awt.event.*; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List; @@ -98,18 +97,22 @@ public class PolyDesigner extends ReportComponent clip_board = new ArrayList(); // richer:鼠标滚轮每滚动一下,PolyDesignPane的尺寸就改变ROTATIONS这么多 private static final int ROTATIONS = 50; + private static final int MIN = 10; private JScrollBar verScrollBar; private JScrollBar horScrollBar; private PolyComponetsBar polyComponetsBar = new PolyComponetsBar(); private JComponent[] toolBarComponent = null; - + private JPanel ployareaPane; + private JSliderPane jSliderContainer; private int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); private float time; + private boolean isCtrl = false; public PolyDesigner(PolyWorkSheet report) { super(report); setDoubleBuffered(true); + // 为了处理键盘事件,需要FormDesigner能够获取焦点 setFocusable(true); setFocusTraversalKeysEnabled(false); @@ -119,11 +122,13 @@ public class PolyDesigner extends ReportComponent Date: Tue, 25 Jul 2017 11:07:08 +0800 Subject: [PATCH 100/101] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 2 +- .../mainframe/ReportComponentComposite.java | 54 ++-- designer/src/com/fr/poly/PolyDesigner.java | 265 +++++++++--------- .../fr/design/mainframe/JFormSliderPane.java | 158 +++++------ .../com/fr/design/mainframe/JSliderPane.java | 176 ++++++------ 5 files changed, 322 insertions(+), 333 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 7683d8c3bc..a04de95388 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -297,7 +297,7 @@ public abstract class ElementCasePane extends Tar if(DesignerContext.getReferencedElementCasePane() == null){ return; } - + ((ElementCasePane) DesignerContext.getReferencedElementCasePane()).getGrid().setNotShowingTableSelectPane(true); ((ElementCasePane) DesignerContext.getReferencedElementCasePane()).getGrid().setCursor(UIConstants.CELL_DEFAULT_CURSOR); DesignerContext.setReferencedElementCasePane(null); diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index f2e81e00af..c54fd51b2b 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -1,17 +1,5 @@ package com.fr.design.mainframe; -import java.awt.BorderLayout; -import java.awt.event.*; -import java.util.ArrayList; - -import javax.swing.JComponent; -import javax.swing.JPanel; -import javax.swing.JSplitPane; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; - import com.fr.base.FRContext; import com.fr.base.ScreenResolution; import com.fr.design.designer.EditingState; @@ -23,9 +11,15 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; import com.fr.grid.Grid; import com.fr.main.impl.WorkBook; -import com.fr.poly.PolyArea; import com.fr.report.report.TemplateReport; +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.*; +import java.util.ArrayList; + /** * 整个报表编辑区域 包括滚动条、中间的grid或者聚合块、下面的sheetTab * @@ -56,7 +50,6 @@ public class ReportComponentComposite extends JComponent { /** * Constructor with workbook.. - * */ public ReportComponentComposite(JWorkBook jwb) { setFocusable(true); @@ -80,22 +73,24 @@ public class ReportComponentComposite extends JComponent { public void keyTyped(KeyEvent e) { } + @Override public void keyPressed(KeyEvent e) { - if( e.isControlDown()){ - isCtrl = true ; + if (e.isControlDown()) { + isCtrl = true; } } + @Override public void keyReleased(KeyEvent e) { - isCtrl = false ; + isCtrl = false; } }; MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { @Override public void mouseWheelMoved(MouseWheelEvent e) { - if (isCtrl){ + if (isCtrl) { int dir = e.getWheelRotation(); int old_resolution = (int) jSliderContainer.getShowVal().getValue(); jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); @@ -106,10 +101,10 @@ public class ReportComponentComposite extends JComponent { ChangeListener showValSpinnerChangeListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - double value = (int) ((UIBasicSpinner)e.getSource()).getValue(); + double value = (int) ((UIBasicSpinner) e.getSource()).getValue(); value = value > MAX ? MAX : value; value = value < MIN ? MIN : value; - int resolution = (int) (ScreenResolution.getScreenResolution()*value/HUND); + int resolution = (int) (ScreenResolution.getScreenResolution() * value / HUND); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); } }; @@ -117,9 +112,9 @@ public class ReportComponentComposite extends JComponent { ItemListener selfAdaptButtonItemListener = new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - if (jSliderContainer.getSelfAdaptButton().isSelected()){ + if (jSliderContainer.getSelfAdaptButton().isSelected()) { int resolution = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().selfAdaptUpdate(); - jSliderContainer.getShowVal().setValue(resolution*HUND/ScreenResolution.getScreenResolution()); + jSliderContainer.getShowVal().setValue(resolution * HUND / ScreenResolution.getScreenResolution()); } } }; @@ -166,11 +161,10 @@ public class ReportComponentComposite extends JComponent { } /** - * 移除选中状态 - * - * @date 2015-2-5-上午11:41:44 - * - */ + * 移除选中状态 + * + * @date 2015-2-5-上午11:41:44 + */ public void removeSelection() { if (centerCardPane.editingComponet instanceof WorkSheetDesigner) { ((WorkSheetDesigner) centerCardPane.editingComponet).removeSelection(); @@ -188,7 +182,7 @@ public class ReportComponentComposite extends JComponent { return sheetNameTab.getSelectedIndex(); } - public JSliderPane getjSliderContainer(){ + public JSliderPane getjSliderContainer() { return this.jSliderContainer; } @@ -240,8 +234,8 @@ public class ReportComponentComposite extends JComponent { splitpane.setBorder(null); splitpane.setDividerSize(3); splitpane.setResizeWeight(1); - southPane.add(hbarContainer,BorderLayout.NORTH); - southPane.add(splitpane,BorderLayout.CENTER); + southPane.add(hbarContainer, BorderLayout.NORTH); + southPane.add(splitpane, BorderLayout.CENTER); return southPane; } diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index 57413a1293..088ef95e0e 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -3,20 +3,6 @@ */ package com.fr.poly; -import java.awt.*; -import java.awt.event.*; -import java.awt.image.BufferedImage; -import java.util.ArrayList; -import java.util.List; - -import javax.swing.AbstractAction; -import javax.swing.ActionMap; -import javax.swing.InputMap; -import javax.swing.JComponent; -import javax.swing.JPanel; -import javax.swing.JScrollBar; -import javax.swing.KeyStroke; - import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.GraphHelper; @@ -47,11 +33,7 @@ import com.fr.design.utils.gui.LayoutUtils; import com.fr.general.ComparatorUtils; import com.fr.grid.selection.Selection; import com.fr.poly.actions.DeleteBlockAction; -import com.fr.poly.creator.BlockCreator; -import com.fr.poly.creator.BlockEditor; -import com.fr.poly.creator.ECBlockCreator; -import com.fr.poly.creator.ECBlockEditor; -import com.fr.poly.creator.PolyElementCasePane; +import com.fr.poly.creator.*; import com.fr.poly.hanlder.DataEditingListener; import com.fr.poly.hanlder.PolyDesignerDropTarget; import com.fr.poly.model.AddedData; @@ -61,13 +43,21 @@ import com.fr.report.block.Block; import com.fr.report.poly.PolyWorkSheet; import com.fr.report.poly.TemplateBlock; import com.fr.stable.ArrayUtils; -import com.fr.stable.CoreGraphHelper; import com.fr.stable.StringUtils; import com.fr.stable.unit.FU; import com.fr.stable.unit.OLDPIX; import com.fr.stable.unit.UNIT; import com.fr.stable.unit.UnitRectangle; +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.List; + /** * @author richer * @since 6.5.3 聚合报表的设计块,不包括底部和右边的滚动条以及左边和上边的像素标识条 @@ -85,6 +75,7 @@ public class PolyDesigner extends ReportComponent jt = DesignerContext.getDesignerFrame().getSelectedJTemplate(); - if(jt != null){ - jt.setComposite(); - } + if (jt != null) { + jt.setComposite(); + } DesignerContext.getDesignerFrame().resetToolkitByPlus(DesignerContext.getDesignerFrame().getSelectedJTemplate()); if (BaseUtils.isAuthorityEditing()) { EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); @@ -918,8 +921,9 @@ public class PolyDesigner extends ReportComponent FOUR_HUNDRED){ + resolutionTimes = divide(showValue, 100, 2); + if (val > FOUR_HUNDRED) { showValSpinner.setValue(FOUR_HUNDRED); val = FOUR_HUNDRED; } - if (val < TEN){ + if (val < TEN) { showValSpinner.setValue(TEN); val = TEN; } @@ -197,11 +199,10 @@ public class JFormSliderPane extends JPanel { //定义一个监听器,用于监听所有滑动条 - ChangeListener listener = new ChangeListener() - { - public void stateChanged( ChangeEvent event) { + ChangeListener listener = new ChangeListener() { + public void stateChanged(ChangeEvent event) { //取出滑动条的值,并在文本中显示出来 - if (!isButtonOrIsTxt){ + if (!isButtonOrIsTxt) { customButton.setSelected(true); EventQueue.invokeLater(new Runnable() { public void run() { @@ -211,50 +212,50 @@ public class JFormSliderPane extends JPanel { showValSpinner.setValue(times); } }); - }else { + } else { isButtonOrIsTxt = false; } } }; - ItemListener radioButtonItemListener = new ItemListener() { + ItemListener radioButtonItemListener = new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - JRadioButton temp=(JRadioButton)e.getSource(); - if(temp.isSelected()){ + JRadioButton temp = (JRadioButton) e.getSource(); + if (temp.isSelected()) { showValSpinner.setValue(Integer.valueOf(temp.getText().substring(0, temp.getText().indexOf("%")))); } } }; - private void refreshSlider(int val){ + private void refreshSlider(int val) { showValue = val; - if (showValue >HUNDRED){ - slider.setValue((int)(showValue+TWO_HUNDRED)/SIX); - }else if (showValue HUNDRED) { + slider.setValue((int) (showValue + TWO_HUNDRED) / SIX); + } else if (showValue < HUNDRED) { + slider.setValue((int) ((showValue - TEN) / ONEPOINTEIGHT)); + } else if (showValue == HUNDRED) { slider.setValue(HALF_HUNDRED); } } - private void refreshBottun(int val){ - showValButton.setText(val+"%"); + private void refreshBottun(int val) { + showValButton.setText(val + "%"); } - public double getResolutionTimes(){ + public double getResolutionTimes() { return this.resolutionTimes; } - public int getshowValue(){ + public int getshowValue() { return this.showValue; } - public static double divide(double v1, double v2,int scale) { + public static double divide(double v1, double v2, int scale) { BigDecimal b1 = new BigDecimal(Double.toString(v1)); BigDecimal b2 = new BigDecimal(Double.toString(v2)); - return b1.divide(b2,scale).doubleValue(); + return b1.divide(b2, scale).doubleValue(); } ActionListener buttonActionListener = new ActionListener() { @@ -262,22 +263,22 @@ public class JFormSliderPane extends JPanel { public void actionPerformed(ActionEvent e) { showValue = (int) showValSpinner.getValue(); isButtonOrIsTxt = true; - if(e.getActionCommand().equals("less")){ + if (e.getActionCommand().equals("less")) { int newDownVal = showValue - TEN; - if (newDownVal >= TEN ){ + if (newDownVal >= TEN) { showValue = newDownVal; showValSpinner.setValue(newDownVal); - }else { + } else { showValue = newDownVal; showValSpinner.setValue(TEN); } } - if(e.getActionCommand().equals("more")){ + if (e.getActionCommand().equals("more")) { int newUpVal = showValue + TEN; - if (newUpVal <= FOUR_HUNDRED ){ + if (newUpVal <= FOUR_HUNDRED) { showValue = newUpVal; showValSpinner.setValue(newUpVal); - }else { + } else { showValue = newUpVal; showValSpinner.setValue(FOUR_HUNDRED); } @@ -288,51 +289,49 @@ public class JFormSliderPane extends JPanel { }; - - private void getTimes(int value){ - if (value == HALF_HUNDRED){ - times=HUNDRED; - }else if (value < HALF_HUNDRED){ - times = (int) Math.round(ONEPOINTEIGHT*value + TEN); - }else { - times = (int) (SIX*value - TWO_HUNDRED); + private void getTimes(int value) { + if (value == HALF_HUNDRED) { + times = HUNDRED; + } else if (value < HALF_HUNDRED) { + times = (int) Math.round(ONEPOINTEIGHT * value + TEN); + } else { + times = (int) (SIX * value - TWO_HUNDRED); } } - public JSpinner getShowVal(){ + public JSpinner getShowVal() { return this.showValSpinner; } - public UIRadioButton getSelfAdaptButton(){ + public UIRadioButton getSelfAdaptButton() { return this.selfAdaptButton; } - private void popupDialog(){ + private void popupDialog() { Point btnCoords = upButton.getLocationOnScreen(); - if (dialog == null){ - dialog = new FormPopupPane(upButton,dialogContentPanel); + if (dialog == null) { + dialog = new FormPopupPane(upButton, dialogContentPanel); if (upButtonX == 0) { upButtonX = btnCoords.x; - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH , -DIALOG_HEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, -DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); } - }else { + } else { if (upButtonX == 0) { upButtonX = btnCoords.x; - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOG_WIDTH + upButton.getWidth() +SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, -DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); } else { - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOG_WIDTH + upButton.getWidth() +SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, -DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); } } } - public static void main(String[] args) - { + public static void main(String[] args) { JFrame jf = new JFrame("test"); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel)jf.getContentPane(); + JPanel content = (JPanel) jf.getContentPane(); content.setLayout(new BorderLayout()); - content.add(JFormSliderPane.getInstance(),BorderLayout.CENTER); + content.add(JFormSliderPane.getInstance(), BorderLayout.CENTER); GUICoreUtils.centerWindow(jf); jf.setSize(400, 80); jf.setVisible(true); @@ -349,17 +348,18 @@ class FormPopupPane extends JPopupMenu { private static final int UPLABEL_WIDTH = 300; private JComponent centerPane; private UILabel upLabel; - FormPopupPane(UIButton b,JPanel dialogContentPanel) { + + FormPopupPane(UIButton b, JPanel dialogContentPanel) { contentPane = new JPanel(new BorderLayout()); centerPane = new JPanel(new BorderLayout()); upLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); upLabel.setOpaque(true); - upLabel.setPreferredSize(new Dimension(UPLABEL_WIDTH,UPLABEL_HEIGHT)); + upLabel.setPreferredSize(new Dimension(UPLABEL_WIDTH, UPLABEL_HEIGHT)); upLabel.setBackground(Color.LIGHT_GRAY); - upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); - centerPane.add(dialogContentPanel,BorderLayout.NORTH); - contentPane.add(upLabel,BorderLayout.NORTH); - contentPane.add(centerPane,BorderLayout.CENTER); + upLabel.setBorder(new MatteBorder(0, 0, 1, 0, Color.gray)); + centerPane.add(dialogContentPanel, BorderLayout.NORTH); + contentPane.add(upLabel, BorderLayout.NORTH); + contentPane.add(centerPane, BorderLayout.CENTER); // contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); this.add(contentPane, BorderLayout.CENTER); this.setPreferredSize(new Dimension(DIALOG_WIDTH, DIALOG_HEIGHT)); diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index a14e106629..3feba5efa4 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -18,7 +18,10 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.*; -import java.awt.event.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.math.BigDecimal; /** @@ -31,7 +34,7 @@ public class JSliderPane extends JPanel { private static final int TEN = 10; private static final int ONE_EIGHT = 18; private static final int FONT_SIZE = 14; - private static final int SPINNER_WIDTH= 45; + private static final int SPINNER_WIDTH = 45; private static final int SPINNER_HEIGHT = 20; private static final int HALF_HUNDRED = 50; private static final int HUNDRED = 100; @@ -69,7 +72,7 @@ public class JSliderPane extends JPanel { public JSliderPane() { this.setLayout(new BorderLayout()); - slider = new UISlider(0,HUNDRED,HALF_HUNDRED); + slider = new UISlider(0, HUNDRED, HALF_HUNDRED); slider.setUI(new JSliderPaneUI(slider)); slider.addChangeListener(listener); @@ -92,19 +95,19 @@ public class JSliderPane extends JPanel { downButton.addActionListener(buttonActionListener); upButton.addActionListener(buttonActionListener); - showValButton = new UIButton(showValSpinner.getValue()+"%"); + showValButton = new UIButton(showValSpinner.getValue() + "%"); showValButton.setBorderPainted(false); - showValButton.setPreferredSize(new Dimension(SHOWVALBUTTON_WIDTH,SHOWVALBUTTON_HEIGHTH)); + showValButton.setPreferredSize(new Dimension(SHOWVALBUTTON_WIDTH, SHOWVALBUTTON_HEIGHTH)); showValButton.addActionListener(showValButtonActionListener); initUIRadioButton(); initPane(); - JPanel panel = new JPanel(new FlowLayout(1,1,0)); + JPanel panel = new JPanel(new FlowLayout(1, 1, 0)); panel.add(downButton); panel.add(slider); panel.add(upButton); panel.add(showValButton); - this.add(panel,BorderLayout.NORTH); - this.setBounds(0,0,THREE_HUNDRED,ONE_EIGHT); + this.add(panel, BorderLayout.NORTH); + this.setBounds(0, 0, THREE_HUNDRED, ONE_EIGHT); } public static final JSliderPane getInstance() { @@ -115,7 +118,7 @@ public class JSliderPane extends JPanel { return THIS; } - private void initUIRadioButton(){ + private void initUIRadioButton() { twoHundredButton = new UIRadioButton("200%"); oneHundredButton = new UIRadioButton("100%"); SevenFiveButton = new UIRadioButton("75%"); @@ -131,7 +134,7 @@ public class JSliderPane extends JPanel { //TODO // selfAdaptButton.addItemListener(); - ButtonGroup bg=new ButtonGroup();// 初始化按钮组 + ButtonGroup bg = new ButtonGroup();// 初始化按钮组 bg.add(twoHundredButton);// 加入按钮组 bg.add(oneHundredButton); bg.add(SevenFiveButton); @@ -142,24 +145,24 @@ public class JSliderPane extends JPanel { customButton.setSelected(true); } - private void initPane(){ + private void initPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = { p, f }; - double[] rowSize = { p,p,p,p,p,p,p}; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p, p, p, p, p}; Component[][] components = new Component[][]{ - new Component[]{twoHundredButton,null}, - new Component[]{oneHundredButton,null}, - new Component[]{SevenFiveButton,null}, - new Component[]{fiveTenButton,null}, - new Component[]{twoFiveButton,null}, - new Component[]{selfAdaptButton,null}, - new Component[]{customButton,createSpinnerPanel()} + new Component[]{twoHundredButton, null}, + new Component[]{oneHundredButton, null}, + new Component[]{SevenFiveButton, null}, + new Component[]{fiveTenButton, null}, + new Component[]{twoFiveButton, null}, + new Component[]{selfAdaptButton, null}, + new Component[]{customButton, createSpinnerPanel()} }; - dialogContentPanel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + dialogContentPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } - private JPanel createSpinnerPanel(){ + private JPanel createSpinnerPanel() { JPanel spinnerPanel = new JPanel(new FlowLayout()); spinnerPanel.add(showValSpinner); UILabel percent = new UILabel("%"); @@ -178,14 +181,14 @@ public class JSliderPane extends JPanel { ChangeListener showValSpinnerChangeListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - int val = (int) ((UIBasicSpinner)e.getSource()).getValue(); + int val = (int) ((UIBasicSpinner) e.getSource()).getValue(); isButtonOrIsTxt = true; - resolutionTimes = divide(showValue,100,2); - if (val > FOUR_HUNDRED){ + resolutionTimes = divide(showValue, 100, 2); + if (val > FOUR_HUNDRED) { showValSpinner.setValue(FOUR_HUNDRED); val = FOUR_HUNDRED; } - if (val < TEN){ + if (val < TEN) { showValSpinner.setValue(TEN); val = TEN; } @@ -196,11 +199,10 @@ public class JSliderPane extends JPanel { //定义一个监听器,用于监听所有滑动条 - ChangeListener listener = new ChangeListener() - { - public void stateChanged( ChangeEvent event) { + ChangeListener listener = new ChangeListener() { + public void stateChanged(ChangeEvent event) { //取出滑动条的值,并在文本中显示出来 - if (!isButtonOrIsTxt){ + if (!isButtonOrIsTxt) { customButton.setSelected(true); EventQueue.invokeLater(new Runnable() { public void run() { @@ -210,50 +212,50 @@ public class JSliderPane extends JPanel { showValSpinner.setValue(times); } }); - }else { + } else { isButtonOrIsTxt = false; } } }; - ItemListener radioButtonItemListener = new ItemListener() { + ItemListener radioButtonItemListener = new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - JRadioButton temp=(JRadioButton)e.getSource(); - if(temp.isSelected()){ + JRadioButton temp = (JRadioButton) e.getSource(); + if (temp.isSelected()) { showValSpinner.setValue(Integer.valueOf(temp.getText().substring(0, temp.getText().indexOf("%")))); } } }; - private void refreshSlider(int val){ + private void refreshSlider(int val) { showValue = val; - if (showValue >HUNDRED){ - slider.setValue((int)(showValue+TWO_HUNDRED)/SIX); - }else if (showValue HUNDRED) { + slider.setValue((int) (showValue + TWO_HUNDRED) / SIX); + } else if (showValue < HUNDRED) { + slider.setValue((int) ((showValue - TEN) / ONEPOINTEIGHT)); + } else if (showValue == HUNDRED) { slider.setValue(HALF_HUNDRED); } } - private void refreshBottun(int val){ - showValButton.setText(val+"%"); + private void refreshBottun(int val) { + showValButton.setText(val + "%"); } - public double getResolutionTimes(){ + public double getResolutionTimes() { return this.resolutionTimes; } - public int getshowValue(){ + public int getshowValue() { return this.showValue; } - public static double divide(double v1, double v2,int scale) { + public static double divide(double v1, double v2, int scale) { BigDecimal b1 = new BigDecimal(Double.toString(v1)); BigDecimal b2 = new BigDecimal(Double.toString(v2)); - return b1.divide(b2,scale).doubleValue(); + return b1.divide(b2, scale).doubleValue(); } ActionListener buttonActionListener = new ActionListener() { @@ -261,22 +263,22 @@ public class JSliderPane extends JPanel { public void actionPerformed(ActionEvent e) { showValue = (int) showValSpinner.getValue(); isButtonOrIsTxt = true; - if(e.getActionCommand().equals("less")){ + if (e.getActionCommand().equals("less")) { int newDownVal = showValue - TEN; - if (newDownVal >= TEN ){ + if (newDownVal >= TEN) { showValue = newDownVal; showValSpinner.setValue(newDownVal); - }else { + } else { showValue = newDownVal; showValSpinner.setValue(TEN); } } - if(e.getActionCommand().equals("more")){ + if (e.getActionCommand().equals("more")) { int newUpVal = showValue + TEN; - if (newUpVal <= FOUR_HUNDRED ){ + if (newUpVal <= FOUR_HUNDRED) { showValue = newUpVal; showValSpinner.setValue(newUpVal); - }else { + } else { showValue = newUpVal; showValSpinner.setValue(FOUR_HUNDRED); } @@ -287,51 +289,49 @@ public class JSliderPane extends JPanel { }; - - private void getTimes(int value){ - if (value == HALF_HUNDRED){ - times=HUNDRED; - }else if (value < HALF_HUNDRED){ - times = (int) Math.round(ONEPOINTEIGHT*value + TEN); - }else { - times = (int) (SIX*value - TWO_HUNDRED); + private void getTimes(int value) { + if (value == HALF_HUNDRED) { + times = HUNDRED; + } else if (value < HALF_HUNDRED) { + times = (int) Math.round(ONEPOINTEIGHT * value + TEN); + } else { + times = (int) (SIX * value - TWO_HUNDRED); } } - public JSpinner getShowVal(){ + public JSpinner getShowVal() { return this.showValSpinner; } - public UIRadioButton getSelfAdaptButton(){ + public UIRadioButton getSelfAdaptButton() { return this.selfAdaptButton; } - private void popupDialog(){ + private void popupDialog() { Point btnCoords = upButton.getLocationOnScreen(); - if (dialog == null){ - dialog = new PopupPane(upButton,dialogContentPanel); + if (dialog == null) { + dialog = new PopupPane(upButton, dialogContentPanel); if (upButtonX == 0) { upButtonX = btnCoords.x; - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH , -DIALOG_HEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, -DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); } - }else { + } else { if (upButtonX == 0) { upButtonX = btnCoords.x; - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOG_WIDTH + upButton.getWidth() +SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, -DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); } else { - GUICoreUtils.showPopupMenu(dialog, upButton, - DIALOG_WIDTH + upButton.getWidth() +SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); + GUICoreUtils.showPopupMenu(dialog, upButton, -DIALOG_WIDTH + upButton.getWidth() + SHOWVALBUTTON_WIDTH, -DIALOG_HEIGHT); } } } - public static void main(String[] args) - { + public static void main(String[] args) { JFrame jf = new JFrame("test"); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel)jf.getContentPane(); + JPanel content = (JPanel) jf.getContentPane(); content.setLayout(new BorderLayout()); - content.add(JSliderPane.getInstance(),BorderLayout.CENTER); + content.add(JSliderPane.getInstance(), BorderLayout.CENTER); GUICoreUtils.centerWindow(jf); jf.setSize(400, 80); jf.setVisible(true); @@ -359,11 +359,10 @@ class JSliderPaneUI extends BasicSliderUI { public Dimension getThumbSize() { Dimension size = new Dimension(); - if ( slider.getOrientation() == JSlider.VERTICAL ) { + if (slider.getOrientation() == JSlider.VERTICAL) { size.width = VERTICAL_WIDTH; size.height = VERTICAL_HEIGHT; - } - else { + } else { size.width = VERTICAL_WIDTH; size.height = VERTICAL_HEIGHT; } @@ -377,14 +376,13 @@ class JSliderPaneUI extends BasicSliderUI { int h = knobBounds.height; g.translate(knobBounds.x, knobBounds.y); - if ( slider.isEnabled() ) { + if (slider.isEnabled()) { g.setColor(slider.getBackground()); - } - else { + } else { g.setColor(slider.getBackground().darker()); } g.setColor(Color.darkGray); - g.fillRect(0, 1, w-SIX, h+1); + g.fillRect(0, 1, w - SIX, h + 1); } /** */ @@ -399,8 +397,8 @@ class JSliderPaneUI extends BasicSliderUI { cy = (trackBounds.height / 2); cw = trackBounds.width; g.setColor(Color.lightGray); - g.drawLine(0, cy, cw+FIVE, cy); - g.drawLine(FIVE+cw/2, cy-FOUR, FIVE+cw/2, cy+FOUR); + g.drawLine(0, cy, cw + FIVE, cy); + g.drawLine(FIVE + cw / 2, cy - FOUR, FIVE + cw / 2, cy + FOUR); } else { super.paintTrack(g); } @@ -416,17 +414,18 @@ class PopupPane extends JPopupMenu { private static final int UPLABEL_WIDTH = 300; private JComponent centerPane; private UILabel upLabel; - PopupPane(UIButton b,JPanel dialogContentPanel) { + + PopupPane(UIButton b, JPanel dialogContentPanel) { contentPane = new JPanel(new BorderLayout()); centerPane = new JPanel(new BorderLayout()); upLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce")); upLabel.setOpaque(true); - upLabel.setPreferredSize(new Dimension(UPLABEL_WIDTH,UPLABEL_HEIGHT)); + upLabel.setPreferredSize(new Dimension(UPLABEL_WIDTH, UPLABEL_HEIGHT)); upLabel.setBackground(Color.LIGHT_GRAY); - upLabel.setBorder(new MatteBorder(0,0,1,0,Color.gray)); - centerPane.add(dialogContentPanel,BorderLayout.NORTH); - contentPane.add(upLabel,BorderLayout.NORTH); - contentPane.add(centerPane,BorderLayout.CENTER); + upLabel.setBorder(new MatteBorder(0, 0, 1, 0, Color.gray)); + centerPane.add(dialogContentPanel, BorderLayout.NORTH); + contentPane.add(upLabel, BorderLayout.NORTH); + contentPane.add(centerPane, BorderLayout.CENTER); // contentPane.setBorder(new MatteBorder(1,1,1,1,Color.darkGray)); this.add(contentPane, BorderLayout.CENTER); this.setPreferredSize(new Dimension(DIALOG_WIDTH, DIALOG_HEIGHT)); @@ -434,5 +433,4 @@ class PopupPane extends JPopupMenu { } - } \ No newline at end of file From e656d7e562c82c434d8cdf2713ed18d50863d3a0 Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 25 Jul 2017 13:57:28 +0800 Subject: [PATCH 101/101] =?UTF-8?q?=E5=A2=9E=E5=8A=A0license?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100755 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000000..9cecc1d466 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +.