From 620cb6f49e3fdc01a6921c2566bbc43140850246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 13 Nov 2017 14:07:11 +0800 Subject: [PATCH 1/7] =?UTF-8?q?MOBILE-6599=20=E8=AE=BE=E7=BD=AE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8D=E5=8F=AF=E7=94=A8=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=A1=BA=E5=BA=8F=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/MobileWidgetTable.java | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index c9a858797..63b22e421 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -250,26 +250,23 @@ public class MobileWidgetTable extends JTable { return new String[0][0]; } - //选择的控件 - XCreator selectedCreator = designer.getSelectionModel().getSelection().getSelectedCreator(); - Widget selectedModel = selectedCreator != null ? selectedCreator.toData() : null; + WFitLayout body = (WFitLayout) designer.getRootComponent().toData(); - if (selectedModel == null) { + if (body == null || !body.acceptType(WSortLayout.class)) { return new String[0][0]; } - // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 - if (selectedModel.acceptType(WSortLayout.class)) { - List mobileWidgetList = ((WSortLayout) selectedModel).getOrderedMobileWidgetList(); - String[][] widgetName = new String[mobileWidgetList.size() + 1][1]; - widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); - for (int i = 0; i < mobileWidgetList.size(); i++) { - widgetName[i + 1][0] = mobileWidgetList.get(i); - } - return widgetName; - } else { - return new String[0][0]; + List mobileWidgetList = body.getOrderedMobileWidgetList(); + String[][] widgetName = new String[mobileWidgetList.size() + 1][1]; + widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); + for (int i = 0; i < mobileWidgetList.size(); i++) { + widgetName[i + 1][0] = mobileWidgetList.get(i); } + if (!body.isSorted()) { + body.setSorted(true); + } + return widgetName; + } public boolean isCollapsed() { From acf7591b0cdc7d0134420f3f46a31026ed1d1112 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 13 Nov 2017 14:42:04 +0800 Subject: [PATCH 2/7] =?UTF-8?q?REPORT-5292=20=E3=80=909.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E3=80=91=E7=B9=81=E4=BD=93=E5=92=8C=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E5=9B=BD=E9=99=85=E5=8C=96=E9=80=82=E9=85=8D9.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_en_US.properties | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 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 1658fecd6..736d53e7c 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -1,4 +1,3 @@ -# generated time: \u661F\u671F\u56DB \u5341\u4E00\u6708 24 12:02:51 CST 2016 FR-Designer-BBSLogin_Account=User name FR-Designer-BBSLogin_Connection-Failure=Connection failure, check your network status FR-Designer-BBSLogin_Connection-Failure-Tip=Tip @@ -591,13 +590,13 @@ FR-Designer_Style=Style FR-Designer_Color=Color FR-Designer_Border=Border FR-Designer_Background-Pattern=Pattern -FR-Designer_SimpleDetail_Report= -FR-Designer_SimpleCross_Report= +FR-Designer_SimpleDetail_Report=Simple list +FR-Designer_SimpleCross_Report=Simple cross table FR-Designer_Edit_Button_ToolBar=Edit Button ToolBar FR-Designer_Remove_Button_ToolBar=Remove Button ToolBar -FR-Designer_Get-CubeGetting= -FR-Designer_DoubleLayer_Report= -FR-Designer_Get-Cube= +FR-Designer_Get-CubeGetting=Getting cube +FR-Designer_DoubleLayer_Report=Double deck header +FR-Designer_Get-Cube=Getting the cube CellWrite-InsertRow_NULL=Null DashBoard-ChartFloat=Chart contact_info=Contact information (optional) @@ -1246,7 +1245,7 @@ FR-Designer-Cell_Group=Cell Group Week=Week PageSetup-Orientation=Orientation M-Open_Recent=Open Recent -NNormal= +NNormal=normal Integer=Integer Select_The_Source_To_Save=Select Source to Save Transition=Branch @@ -1458,7 +1457,7 @@ Env-Configure_Workspace=Configure working directory feedback_info=We welcome your comments and suggestions, please fill out the information as detailed as possible, we will contact you soon Ratio=Ratio DBCP_TEST_ON_BORROW=Test before Getting Connections -FR-Designer_layerIndex= +FR-Designer_layerIndex=Dependent layers WEB-Write_Setting=Filling Settings M-New_WorkBook=New General Report FR-Designer-Plugin_Has_Been_Actived=Plugin is now active, restart the designer and sever to enable it and the sever need to be manually restarted @@ -1760,7 +1759,7 @@ 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 -FR-Designer-Dependence= +FR-Designer-Dependence=Dependent environment ECP_error_pwd=Password Error REPORTLET=Parameter of access path to template RWA-Column_Offset=Column Offset @@ -1799,7 +1798,7 @@ ParentCell_Setting=Parent Cell Setting Only_selected_cell_can_paste_only=Paste when cell is selected M_Report-Report_Columns=Multi-columns/lines Unit_Hundred=Hundred -FR-Designer_DataTable-Build= +FR-Designer_DataTable-Build=Speed layered construction Widget-Form_Widget_Config=Form control 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. Actions=Task @@ -1819,7 +1818,7 @@ BackgroundTexture-Cork=Cork M_Format-Data_Map=Data Dictionary FR-mobile_native_analysis=native analysis HighLight=High Light -FR-Designer_Dropdown-More-Preview= +FR-Designer_Dropdown-More-Preview=Pull down to get more previews local=local FR-Designer_Gradation=Gradation PageSetup-Finis_Start_Column=Duplicate Last Column @@ -1942,7 +1941,7 @@ Widget-User_Defined=Predefine Url_location=Absolute path Disk_File=Disk File Inside=Inside -FR-Designer_filedChosen= +FR-Designer_filedChosen=Dependent fields ServerM-Predefined_Styles=Predefined Styles is_need_word_adjust=Word Auto Adjust Background-Null=No Background @@ -2122,7 +2121,7 @@ FS-Designer_DS_Filter_Odd_Tip=Odd_Tip FS-Designer_DS_Filter_Even_Tip=Even_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FR-Designer-AlphaFine_NO_Result=no search result -FR-Designer-Download_Online_Sources= +FR-Designer-Download_Online_Sources=The chart needs to download the latest resource file. Is it installed? FR-Designer_Select_Color=Select Color FR-Designer-Basic_Dynamic_Parameter_Injection=Injection FR-Designer_Label=Label @@ -2131,17 +2130,17 @@ FR-Designer_Insert_Cell_Element=Insert Cell Element FR-Designer_Add_Condition=Add Condition FR-Designer_Use_Params_Template=use parameter template FR-Designer_Label_Name=label name -FR-Designer_Widget_Visible= -FR-Designer_Widget_Display_Report_Tool= -FR-Designer_Cell_Value= -FR-Designer_Cell_Visible= -FR-Designer_Widget_Formula= -FR-Designer_Show= -FR-Designer_Widget_Position= -FR-Designer_Float_Visible= -FR-Designer_Widget_String= -FR-Designer_Widget_Field= -FR-Designer_Widget_Enabled= +FR-Designer_Widget_Visible=Visible control +FR-Designer_Widget_Display_Report_Tool=Display report block toolbar +FR-Designer_Cell_Value=cell value +FR-Designer_Cell_Visible=Cell visible +FR-Designer_Widget_Formula=formula +FR-Designer_Show=display +FR-Designer_Widget_Position=Control location +FR-Designer_Float_Visible=Suspended elements are visible +FR-Designer_Widget_String=Character string +FR-Designer_Widget_Field=field +FR-Designer_Widget_Enabled=Control available FR-Designer_Export_Background= FR-Designer_Print_Background= FR-Designer_Sheet_Label_Page_Display_Position= From c6e31aa55093c1fd557fdf21ad12faaabd1f544d Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 13 Nov 2017 14:42:14 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E6=9D=BF=E6=89=93=E5=BC=80=E9=80=9F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mobile/AppFitPreviewPane.java | 21 ++++++++++--------- .../com/fr/design/constants/UIConstants.java | 13 +++++++++++- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java b/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java index bbb44f612..8ee6ebe93 100644 --- a/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java +++ b/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java @@ -1,5 +1,6 @@ package com.fr.design.report.mobile; +import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; @@ -31,16 +32,16 @@ public class AppFitPreviewPane extends BasicPane{ } private void initCacheImage() { - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V0.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V1.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V2.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V3.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V4.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H0.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H1.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H2.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H3.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H4.png"))); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V0)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V1)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V2)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V3)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V4)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H0)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H1)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H2)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H3)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H4)); } private void initComponents() { diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 3df47f30a..c9ad2c6eb 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -18,8 +18,19 @@ import java.awt.image.BufferedImage; public interface UIConstants { public static final Icon CPT_ICON = BaseUtils.readIcon("/com/fr/base/images/oem/cpt.png"); - public static final Icon BLACK_ICON = BaseUtils.readIcon("/com/fr/base/images/cell/blank.gif"); + + public static final Image APPFIT_V0 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V0.png"); + public static final Image APPFIT_V1 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V1.png"); + public static final Image APPFIT_V2 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V2.png"); + public static final Image APPFIT_V3 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V3.png"); + public static final Image APPFIT_V4 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V4.png"); + public static final Image APPFIT_H0 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H0.png"); + public static final Image APPFIT_H1 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H1.png"); + public static final Image APPFIT_H2 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H2.png"); + public static final Image APPFIT_H3 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H3.png"); + public static final Image APPFIT_H4 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H4.png"); + public static final Border CELL_ATTR_ZEROBORDER = BorderFactory.createEmptyBorder(0, 0, 0, 0); public static final Border CELL_ATTR_EMPTYBORDER = BorderFactory.createEmptyBorder(0, 10, 0, 0); public static final Border CELL_ATTR_PRESENTBORDER = BorderFactory.createEmptyBorder(0, 5, 0, 0); From 89128da6c2031e23be7f33a74c9de8c50a8e3742 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 13 Nov 2017 15:39:20 +0800 Subject: [PATCH 4/7] =?UTF-8?q?REPORT-5491=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/FRFontPane.java | 11 +++++ .../widget/WidgetBoundsPaneFactory.java | 19 +++++--- .../widget/ui/designer/LabelDefinePane.java | 2 +- .../designer/component/PaddingBoundPane.java | 44 +++++++++++-------- 4 files changed, 49 insertions(+), 27 deletions(-) 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 6aa5338ae..d7d445ddc 100644 --- a/designer_base/src/com/fr/design/gui/style/FRFontPane.java +++ b/designer_base/src/com/fr/design/gui/style/FRFontPane.java @@ -16,6 +16,7 @@ import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.icombobox.UIComboBox; +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; @@ -41,6 +42,8 @@ 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 static final Dimension UNDER_LINE_SIZE = new Dimension(87, 20); + private static final Dimension HIDE_SIZE = new Dimension(0, 0); 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; @@ -104,9 +107,11 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse if (line == Constants.LINE_NONE) { underline.setSelected(false); cly.show(linePane, "none"); + linePane.setPreferredSize(HIDE_SIZE); } else { underline.setSelected(true); cly.show(linePane, "combobox"); + linePane.setPreferredSize(UNDER_LINE_SIZE); this.underlineCombo.setSelectedLineStyle(line); } // effects @@ -297,8 +302,14 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse public void stateChanged(ChangeEvent e) { CardLayout cly = (CardLayout) linePane.getLayout(); cly.show(linePane, underline.isSelected() ? "combobox" : "none"); + if(underline.isSelected()){ + linePane.setPreferredSize(UNDER_LINE_SIZE); + }else{ + linePane.setPreferredSize(HIDE_SIZE); + } } }); + return linePane; } diff --git a/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java index bd3612d11..8092fc5e8 100644 --- a/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -28,7 +28,7 @@ public class WidgetBoundsPaneFactory { double[] rowSize = {p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}}; - final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); return new UIExpandablePane(Inter.getLocText("FR-Designer_Coords_And_Size"), 280, 24, boundsPane); @@ -49,19 +49,24 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - Component[][] components = new Component[][]{ + Component[][] northComponents = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Position")), createRightPane(x, y)}, new Component[]{null, createRightPane(new UILabel(Inter.getLocText("FR-Designer_X_Coordinate"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer_Y_Coordinate"), SwingConstants.CENTER))}, + }; + Component[][] centerComponents = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Size")), createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer-Tree_Height"), SwingConstants.CENTER))}, }; - double[] rowSize = {p, p, p, p}; + double[] rowSize = {p, p}; double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; - final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + int[][] rowCount = {{1, 1}, {1, 1}}; + final JPanel northPanel = TableLayoutHelper.createGapTableLayoutPane(northComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); + final JPanel centerPanel = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - boundsPane.add(panel); + northPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + boundsPane.add(northPanel, BorderLayout.NORTH); + boundsPane.add(centerPanel, BorderLayout.CENTER); return new UIExpandablePane(Inter.getLocText("FR-Designer_Coords_And_Size"), 230, 24, boundsPane); } } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java index 549f4266f..02c47c41e 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -75,7 +75,7 @@ public class LabelDefinePane extends AbstractDataModify