From 7fa55dda36df7ec2845d568d8b476495fdf2f175 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 14 Nov 2017 11:48:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-5489=20@Plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=3D>?= =?UTF-8?q?=E2=80=9C=E6=B7=BB=E5=8A=A0...=E2=80=9D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=98=BE=E7=A4=BA=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/controlpane/UIControlPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 66ce1865cf..bc37a2549d 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -40,6 +40,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH protected BasePlot plot; private static final int TOP_TOOLBAR_HEIGHT = 20; private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常 + private static final int TOP_TOOLBAR_WIDTH_SHORT = 76; public UIControlPane() { this.initComponentPane(); @@ -209,7 +210,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH protected JPanel getLeftTopPane (UIToolbar topToolBar) { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = { p, f, TOP_TOOLBAR_WIDTH}; + double[] columnSize = { p, f, isNewStyle() ? TOP_TOOLBAR_WIDTH : TOP_TOOLBAR_WIDTH_SHORT}; double[] rowSize = {TOP_TOOLBAR_HEIGHT}; Component[][] components = new Component[][]{ new Component[]{new UILabel(getAddItemText()), new JPanel(), topToolBar}, From fa6105a7b43dde8fa060fc7cb42fa6deac9b203b Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 14 Nov 2017 14:50:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-5489=20@Plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=3D>?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=9D=A2=E6=9D=BF=E4=B8=AD=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=A9=BA=E7=99=BD=E5=8C=BA=E5=9F=9F=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E6=9C=80=E5=90=8E=E4=B8=80=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/controlpane/UIListControlPane.java | 19 +++++++++--- .../com/fr/design/gui/ilist/UINameEdList.java | 30 ++++++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-) 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 cd8b48d417..d6c1a34324 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -37,10 +37,7 @@ import javax.swing.event.ListDataListener; 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.awt.event.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; @@ -805,6 +802,20 @@ public abstract class UIListControlPane extends UIControlPane { evt.getY() - 1); } + @Override + public void mouseClicked(MouseEvent e) { + JList list = (JList) e.getSource(); + if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown() + && !isMenuShortcutKeyDown(e)) { + list.clearSelection(); + } + } + + private boolean isMenuShortcutKeyDown(InputEvent event) { + return (event.getModifiers() & Toolkit.getDefaultToolkit() + .getMenuShortcutKeyMask()) != 0; + } + @Override public void mouseMoved(MouseEvent e) { 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 3ab1a58c61..6ce1855064 100644 --- a/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java +++ b/designer_base/src/com/fr/design/gui/ilist/UINameEdList.java @@ -12,10 +12,7 @@ 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.awt.event.*; import java.util.ArrayList; import java.util.Vector; @@ -352,6 +349,17 @@ public class UINameEdList extends UIList implements CellEditorListener { repaint(cellRect); } + @Override + public int locationToIndex(Point location) { + int index = super.locationToIndex(location); + if (index != -1 && !getCellBounds(index, index).contains(location)) { + return -1; + } + else { + return index; + } + } + /** * 主函数 * @@ -375,6 +383,20 @@ public class UINameEdList extends UIList implements CellEditorListener { list.editItemAt(list.getSelectedIndex()); } } + + @Override + public void mouseClicked(MouseEvent e) { + JList list = (JList) e.getSource(); + if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown() + && !isMenuShortcutKeyDown(e)) { + list.clearSelection(); + } + } + + private boolean isMenuShortcutKeyDown(InputEvent event) { + return (event.getModifiers() & Toolkit.getDefaultToolkit() + .getMenuShortcutKeyMask()) != 0; + } }) ; From d5096ac133f301b6cb0606a3efd8f1fac44896d2 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 14 Nov 2017 16:08:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-5489=20@Plough=EF=BC=9A9.0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=3D>?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=82=AC=E5=81=9C=E9=A2=9C=E8=89=B2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/constants/UIConstants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 21d7bcf3a6..5a35c98d44 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -128,8 +128,8 @@ public interface UIConstants { public static final Color UI_MENU_BACKGOURND = LOG_MESSAGE_BAR_BACKGROUND; public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd); - public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235); - public static final Color TAB_BUTTON_HOVER_SELECTED = new Color(239, 238, 243); + public static final Color TAB_BUTTON_HOVER = new Color(248, 248, 248); + public static final Color TAB_BUTTON_HOVER_SELECTED = new Color(239, 239, 241); public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232); public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238); public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); From c6064212893505f3154ebe10bcffd0054d414bbf Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 14 Nov 2017 17:10:16 +0800 Subject: [PATCH 4/4] =?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=3D>?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E8=A7=84=E8=8C=83=E7=9A=84=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=8B=B1=E6=96=87=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_en_US.properties | 126 +++++++++--------- 1 file changed, 63 insertions(+), 63 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 736d53e7c0..e4cf219fbd 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 @@ -256,7 +256,7 @@ FR-Designer_Datasource-Parameter=Datasource Parameter FR-Designer_Tree-ComboBox=Tree Combobox FR-Designer_Form-Iframe=Iframe FR-Designer_Type=Type -FR-Designer_User-defined=User_defined +FR-Designer_User-defined=User defined FR-Designer_Simple_general_forV6=Simple general for Version6+ FR-Designer_Import=Import FR-Designer_Export=Export @@ -446,8 +446,8 @@ FR-Designer_Form-Frozen-Tip=When use Frozen, suggest install FR-Designer_Form-Forzen-Speed=, use bidirectional and horizontal adaption to improve the speed. FR-Designer_Attention=Attention FR-Designer_Forbid_Widgets_Intersects=Forbid component overlap -FR-Designer_Widget_Scaling_Mode_Fit=Area-Fit -FR-Designer_Widget_Scaling_Mode_Fixed=Area-Fixed +FR-Designer_Widget_Scaling_Mode_Fit=Area Fit +FR-Designer_Widget_Scaling_Mode_Fixed=Area Fixed FR-Designer-Widget_Area_Scaling=Component area scaling FR-Designer-Widget_Scaling_Mode=Scaling mode FR-Designer-QQLogin-Determine=Determine @@ -1025,7 +1025,7 @@ Skip=skip FR-Designer_PageSetup-Vertically=Vertically revert=revert PageSetup-Predefined=Predefine -Border-Style-Radius=Border-radius +Border-Style-Radius=Border radius IntPart=Integer part ExpandD-Data_Column=Data Column Sort-Ascending=Ascending @@ -1294,7 +1294,7 @@ FormulaD-Most_Recently_Used=Rencently used FormulaD-Input_formula_in_the_text_area_below=Input formula in the text area below Build-Way=Build Way M_Edit-Undo=Undo -Line-Style=Line-Style +Line-Style=Line Style Datasource-Other_Attributes=Other Attributes M_Server-Global_Parameters=Global Parameters Suffix=Suffix @@ -1305,7 +1305,7 @@ BackgroundTexture-Granite=Granite DataList=Data Link Recursion=Recursion BarStyle=Bar -FR-Designer-Min_Width=Min-Width +FR-Designer-Min_Width=Min Width Utils-Report-Env_Directory=Report working directory D-ChartArea=Chart Area Only=Only @@ -1542,7 +1542,7 @@ HyperLink_Must_Alone_Reset=Multiple hyperlink ExpandD-Expand_Direction=Extension Direction Include=Include Export-Excel-Page=Page Break -FR-Designer-Min_Height=Min-Height +FR-Designer-Min_Height=Min Height Filed=Field ReportServerP-Import_Css=Reference Css M_Insert-Formula=Insert Formula @@ -1588,7 +1588,7 @@ Utils-Are_you_sure_to_remove_the_selected_item=Are you sure to remove the select Face_Write=Filling Poly-Report_Block=Report type aggregation block Vgap=Vertical gap -FR-Designer_HyperLink_Must_Alone_Reset=HyperLink_Must_Alone_Reset +FR-Designer_HyperLink_Must_Alone_Reset=HyperLink Must Alone Reset DS-Class=Class FR-Hyperlink_Please_Select_Reportlet=Please select webreport FS_Report_Type=Report Type @@ -2006,7 +2006,8 @@ 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 PreviewFR-Designer_Double=Decimal +FR-Designer_Write_Enhance_Preview=Write Enhance Preview +FR-Designer_Double=Double FR-Designer_Query=Query FR-Designer_Font=Font FR-Designer_Confirm=OK @@ -2046,64 +2047,63 @@ 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_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 +FR-Designer_Read_failure=Read failure FR-Designer_Add_Hyperlink=Add Hyperlink FR-Designer-StyleAlignment_Style_PartSpacing=PartSpacing -FR-Designer_Image_Layout=Image_Layout -FR-Designer_StyleAlignment_Text_Style=Text_Style -FR-Designer_StyleAlignment_Text_Rotation=Text_Rotation -FR-Designer_Style_Left_Indent=Left_Indent -FR-Designer_Style_Right_Indent=Right_Indent -FR-Designer_Style_Spacing_Before=Spacing_Before -FR-Designer_Style_Spacing_After=Spacing_After -FR-Designer_Style_Line_Spacing=Line_Spacing +FR-Designer_Image_Layout=Image Layout +FR-Designer_StyleAlignment_Text_Style=Text Style +FR-Designer_StyleAlignment_Text_Rotation=Text Rotation +FR-Designer_Style_Left_Indent=Left Indent +FR-Designer_Style_Right_Indent=Right Indent +FR-Designer_Style_Spacing_Before=Spacing Before +FR-Designer_Style_Spacing_After=Spacing After +FR-Designer_Style_Line_Spacing=Line Spacing FR-Designer_Left=Left FR-Designer_Right=Right FR-Designer_Front=Front FR-Designer_Behind=Behind -FR-Designer_StyleAlignment_Wrap_Text=Wrap_Text -FR-Designer_StyleAlignment_Single_Line=Single_Line -FR-Designer_StyleAlignment_Single_Line(Adjust_Font)=Single_Line(Adjust_Font) -FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)=Multi_Line(Adjust_Font) -FR-Designer_Auto_Adjust_Height=Auto_Adjust_Height -FR-Designer_Auto_Adjust_Wdith=Auto_Adjust_Wdith -FR-Designer_Type_Set=Type_Set -FR-Designer_Dic_Data_Query=Data_Query -FR-Designer_Dictionary_Dynamic_SQL=Dictionary_Dynamic_SQL -FR-Designer_Datasource_From_Database=Datasource_From_Database -FR-Designer_CellWrite_InsertRow_NULL=InsertRow_NULL -FR-Designer_CellWrite_InsertRow_COPY=InsertRow_COPY -FR-Designer_CellWrite_InsertRow_Policy=InsertRow_Policy -FR-Designer_CellWrite_Page_Before_Row=Page_Before_Row -FR-Designer_CellWrite_Page_After_Row=Page_After_Row -FR-Designer_CellWrite_Page_Before_Column=Page_Before_Column -FR-Designer_CellWrite_Page_After_Column=Page_After_Column -FR-Designer_CellPage_Can_Break_On_Paginate=Can_Break_On_Paginate -FR-Designer_CellPage_Repeat_Content_When_Paging=Repeat_Content_When_Paging -FR-Designer_CellWrite_Preview_Cell_Content=Preview_Cell_Content -FR-Designer_CellWrite_Print_Content=CellWrite_Print_Content -FR-Designer_CellWrite_Print_Background=CellWrite_Print_Background -FR-Designer_CellWrite_Show_As_Image=CellWrite_Show_As_Image -FR-Designer_CellWrite_Show_As_HTML=CellWrite_Show_As_HTML -FR-Designer_Datasource_Other_Attributes=Other_Attributes -FR-Designer_Not_use_a_cell_attribute_table_editing=Not_use_a_cell_attribute_table_editing -FR-Designer_CellElement_Property_Table=CellElement_Property_Table -FR-Designer_T_Insert_Float=Insert_Float -FR-Designer_Add_FloatElement=Add_FloatElement -FR-Designer_Insert_Image=Insert_Image -FR-Designer_Insert_Chart=Insert-Chart -FR-Designer_Insert_Text=Insert-Text -FR-Designer_Insert_Formula=Insert_Formula -FR-Designer_Double=Double -FR-Designer_Scale_Down=Scale_Down -FR-Designer_Scale_Up=Scale_Up -FR-Designer_Scale_Slider=Scale_Slider -FR-Designer_Scale_Grade=Scale_Grade +FR-Designer_StyleAlignment_Wrap_Text=Wrap Text +FR-Designer_StyleAlignment_Single_Line=Single Line +FR-Designer_StyleAlignment_Single_Line(Adjust_Font)=Single Line(Adjust Font) +FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)=Multi Line(Adjust Font) +FR-Designer_Auto_Adjust_Height=Auto Adjust Height +FR-Designer_Auto_Adjust_Wdith=Auto Adjust Wdith +FR-Designer_Type_Set=Type Set +FR-Designer_Dic_Data_Query=Data Query +FR-Designer_Dictionary_Dynamic_SQL=Dictionary Dynamic SQL +FR-Designer_Datasource_From_Database=Datasource From Database +FR-Designer_CellWrite_InsertRow_NULL=InsertRow NULL +FR-Designer_CellWrite_InsertRow_COPY=InsertRow COPY +FR-Designer_CellWrite_InsertRow_Policy=InsertRow Policy +FR-Designer_CellWrite_Page_Before_Row=Page Before Row +FR-Designer_CellWrite_Page_After_Row=Page After Row +FR-Designer_CellWrite_Page_Before_Column=Page Before Column +FR-Designer_CellWrite_Page_After_Column=Page After Column +FR-Designer_CellPage_Can_Break_On_Paginate=Can Break On Paginate +FR-Designer_CellPage_Repeat_Content_When_Paging=Repeat Content When Paging +FR-Designer_CellWrite_Preview_Cell_Content=Preview Cell Content +FR-Designer_CellWrite_Print_Content=CellWrite Print Content +FR-Designer_CellWrite_Print_Background=CellWrite Print Background +FR-Designer_CellWrite_Show_As_Image=CellWrite Show As Image +FR-Designer_CellWrite_Show_As_HTML=CellWrite Show As HTML +FR-Designer_Datasource_Other_Attributes=Other Attributes +FR-Designer_Not_use_a_cell_attribute_table_editing=Not use a cell attribute table editing +FR-Designer_CellElement_Property_Table=CellElement Property Table +FR-Designer_T_Insert_Float=Insert Float +FR-Designer_Add_FloatElement=Add FloatElement +FR-Designer_Insert_Image=Insert Image +FR-Designer_Insert_Chart=Insert Chart +FR-Designer_Insert_Text=Insert Text +FR-Designer_Insert_Formula=Insert Formula +FR-Designer_Scale_Down=Scale Down +FR-Designer_Scale_Up=Scale Up +FR-Designer_Scale_Slider=Scale Slider +FR-Designer_Scale_Grade=Scale Grade FR-Designer_Add_Event=Add Event FR-Designer_Not_Support_Authority_Edit=this element does not support authority edit FR-Designer_Dynamic_Parameter=Dynamic Parameter @@ -2113,13 +2113,13 @@ FR-Designer_Widget_Error_Tip=error tip FR-Designer_Widget_Return_Leaf=return leaf FR-Designer_Widget_Return_Path=return path FR-Designer_Widget_Display_Position=Display Position -FR-Designer_Size_Limit=Size_Limit +FR-Designer_Size_Limit=Size Limit FR-Designer_Widget_Name=Widget Name FR-Designer_Coords_And_Size=Coords & Size -FR-Designer_Barcode_Size=Barcode_Size -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_Barcode_Size=Barcode Size +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=The chart needs to download the latest resource file. Is it installed? FR-Designer_Select_Color=Select Color