From b8fbd2ecc0ad1b3f0717b637e8c58441af2dee02 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 31 May 2017 13:59:30 +0800 Subject: [PATCH] use UIPopupMenu --- .../src/com/fr/design/actions/help/AboutPane.java | 2 +- .../com/fr/design/mainframe/FormParaWidgetPane.java | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index 1155f4e92..9c8953597 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -47,7 +47,7 @@ public class AboutPane extends JPanel { BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane( getBuildTitle(), - GeneralUtils.readFullBuildNO(), + GeneralUtils.readBuildNO(), new String[]{ Inter.getLocText("FR-Designer-Basic_Copy_Build_NO"), Inter.getLocText("FR-Designer-Basic_Copy_Build_NO_OK") diff --git a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java index ae7cefc5c..929e10110 100644 --- a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.module.DesignModuleFactory; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.*; @@ -31,8 +32,8 @@ public class FormParaWidgetPane extends JPanel { private List predifinedwidgeList = new ArrayList(); - private JPopupMenu chartTypePopupMenu; - private JPopupMenu widgetTypePopupMenu; + private UIPopupMenu chartTypePopupMenu; + private UIPopupMenu widgetTypePopupMenu; private WidgetOption[] widgetOptions = null; private WidgetOption[] chartOptions = null; private WidgetOption[] layoutOptions = null; @@ -120,7 +121,7 @@ public class FormParaWidgetPane extends JPanel { widgetPane.add(createJSeparator(height)); widgetPane.add(eastScrollPane); - widgetTypePopupMenu = new JPopupMenu(); + widgetTypePopupMenu = new UIPopupMenu(); widgetTypePopupMenu.add(widgetPane); } } @@ -135,7 +136,7 @@ public class FormParaWidgetPane extends JPanel { int x = COMMON_CHAR_NUM * (widgetButtonWidth + smallGAP); int y = (int) Math.ceil(chartOptions.length / ((double) COMMON_CHAR_NUM)) * (widgetButtonHeight + smallGAP); componentsPara.setPreferredSize(new Dimension(x, y)); - chartTypePopupMenu = new JPopupMenu(); + chartTypePopupMenu = new UIPopupMenu(); chartTypePopupMenu.add(componentsPara); } } @@ -254,7 +255,7 @@ public class FormParaWidgetPane extends JPanel { initChartTypePopUp(); chartTypePopupMenu.show(FormParaWidgetPane.this, (int) jSeparatorLayout.getLocation().getX() + BORDER, - (int) jSeparatorLayout.getLocation().getY() - BORDER); + (int) jSeparatorLayout.getLocation().getY()); } }); labelPane.add(chartPopUpButton, BorderLayout.EAST); @@ -274,7 +275,7 @@ public class FormParaWidgetPane extends JPanel { initWidgetTypePopUp(); widgetTypePopupMenu.show(FormParaWidgetPane.this, (int) jSeparatorChart.getLocation().getX() + BORDER, - (int) jSeparatorChart.getLocation().getY() - BORDER); + (int) jSeparatorChart.getLocation().getY()); } });