From 865d0adadcde5fdd60169fa3f812add9eb5830f7 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 5 Sep 2017 14:06:43 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4363=20=E8=A1=A8=E5=8D=95=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=9B=BE=E8=A1=A8=E5=92=8C=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=89=A9=E5=B1=95=E6=8C=89=E9=92=AE=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=90=8E=EF=BC=8C=E6=89=A9=E5=B1=95=E7=9A=84=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BD=8D=E7=BD=AE=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/FormParaWidgetPane.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java index a5b39ae88..d28233d05 100644 --- a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.design.ExtraDesignClassManager; +import com.fr.design.constants.UIConstants; import com.fr.design.designer.beans.events.DesignerEditListener; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreatorUtils; @@ -152,6 +153,7 @@ public class FormParaWidgetPane extends JPanel { widgetPane.add(eastScrollPane); widgetTypePopupMenu = new UIPopupMenu(); + widgetTypePopupMenu.setBackground(UIConstants.SELECT_TAB); widgetTypePopupMenu.add(widgetPane); } } @@ -167,6 +169,7 @@ public class FormParaWidgetPane extends JPanel { int y = (int) Math.ceil(chartOptions.length / ((double) COMMON_CHAR_NUM)) * (widgetButtonHeight + smallGAP); componentsPara.setPreferredSize(new Dimension(x, y)); chartTypePopupMenu = new UIPopupMenu(); + chartTypePopupMenu.setBackground(UIConstants.SELECT_TAB); chartTypePopupMenu.add(componentsPara); } } @@ -284,8 +287,8 @@ public class FormParaWidgetPane extends JPanel { public void mouseClicked(MouseEvent e) { initChartTypePopUp(); chartTypePopupMenu.show(FormParaWidgetPane.this, - (int) jSeparatorChart.getLocation().getX() + BORDER, - (int) jSeparatorChart.getLocation().getY()); + (int) jSeparatorLayout.getLocation().getX() + BORDER, + (int) jSeparatorLayout.getLocation().getY()); } }); labelPane.add(chartPopUpButton, BorderLayout.EAST); @@ -304,8 +307,8 @@ public class FormParaWidgetPane extends JPanel { public void mouseClicked(MouseEvent e) { initWidgetTypePopUp(); widgetTypePopupMenu.show(FormParaWidgetPane.this, - (int) jSeparatorLayout.getLocation().getX() + BORDER, - (int) jSeparatorLayout.getLocation().getY()); + (int) jSeparatorChart.getLocation().getX() + BORDER, + (int) jSeparatorChart.getLocation().getY()); } }); @@ -316,7 +319,9 @@ public class FormParaWidgetPane extends JPanel { private int calculateWidgetWindowRowNum() { //ε‘δΈŠε–ζ•΄ - int rowNum = (int) Math.ceil((double) predifinedwidgeList.size() / (double) preWidgetShowMaxNum); + int eastRowNum = (int) Math.ceil((double) predifinedwidgeList.size() / (double) preWidgetShowMaxNum); + int westRowNum = (int) Math.ceil((double) loadWidgetOptions().length / (double) commonWidgetNum); + int rowNum = Math.max(eastRowNum, westRowNum); rowNum = Math.max(rowNum, 2); rowNum = Math.min(rowNum, preWidgetShowMaxRow); return rowNum;