From 4eda8b556646482f41b9ecf11138ee0a2021c7d5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 09:59:41 +0800 Subject: [PATCH 1/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E5=BC=B9=E7=AA=97=E7=9A=84=E7=95=8C=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 baef0d069..97d6cc28b 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 2/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=8F=AF=E8=B0=83=E6=95=B4=E9=AB=98?= =?UTF-8?q?=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 97d6cc28b..1db206f5d 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 c5e83b3b132246af4094ba465eb257c6fe20d9c5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 17 Jul 2017 16:31:47 +0800 Subject: [PATCH 3/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BC=B9=E7=AA=97bug=EF=BC=9A1=E3=80=81=E5=A4=B1=E7=84=A6?= =?UTF-8?q?=E5=90=8E=E8=A2=AB=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=A6=86=E7=9B=96?= =?UTF-8?q?=EF=BC=9B2=E3=80=81=E5=BC=B9=E5=87=BA=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=B8=8D=E5=90=8C=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=EF=BC=8C=E9=9D=A2=E6=9D=BF=E6=B2=A1=E6=9C=89=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=EF=BC=9B3=E3=80=81=E5=BC=B9=E5=87=BA=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=B8=8D=E5=90=8C=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=EF=BC=8C=E5=BC=B9=E5=9B=9E=EF=BC=8C=E9=9D=A2=E6=9D=BF=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=EF=BC=9B4=E3=80=81=E5=88=87=E6=8D=A2=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=97=B6=EF=BC=8C=E5=86=85=E5=AE=B9=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=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 1db206f5d..27a012783 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 4/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=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 3c6d79d4d..9365dec33 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 1d11d02d1..de3112979 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 5b7316040..e17d249f5 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 43c9eb1bc..dfa6a7d32 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 9e5a80bfa..8060abc14 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 313e86740..6eea2a1fe 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 27a012783..73c1d9631 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 5/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E7=BA=A2=E8=89=B2?= =?UTF-8?q?=E6=A0=87=E5=87=BA=E5=8F=AF=E6=8B=96=E5=8A=A8=E5=8C=BA=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 73c1d9631..3b23f293a 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 6/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BA=A4=E6=8D=A2?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E5=B7=A5=E5=85=B7=E6=9D=A1=E7=9A=84=E4=B8=8A?= =?UTF-8?q?=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 3b23f293a..983ddffa8 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 7/7] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E6=89=80=E6=9C=89ta?= =?UTF-8?q?b=E5=BC=B9=E5=87=BA=E5=90=8E=EF=BC=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E2=80=9C=E6=97=A0=E5=8F=AF=E7=94=A8=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=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 9365dec33..cf38d99b5 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 de3112979..83ac59ba1 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 e17d249f5..3d037b05e 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 dfa6a7d32..a561e99a6 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 8060abc14..c487655cb 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 6eea2a1fe..848b2f05e 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 983ddffa8..c787ed959 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);