From f68ae9af64a520dcc02a40a200b16e15eab04592 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 17 Oct 2016 16:49:28 +0800 Subject: [PATCH] rt --- .../mainframe/FormWidgetDetailPane.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 54bd31cc9f..a293d1f0d4 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -82,16 +82,7 @@ public class FormWidgetDetailPane extends FormDockView{ if (elCaseBindInfoList == null) { elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); } - downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); - downPanel.setPreferredSize(new Dimension(236, 480)); - reuWidgetPanel = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); - comboBox = new UIComboBox(getCategories()); - comboBox.setPreferredSize(new Dimension(236, 30)); - initComboBoxSelectedListener(); - - reuWidgetPanel.add(comboBox, BorderLayout.NORTH); - reuWidgetPanel.add(downPanel, BorderLayout.CENTER); - reuWidgetPanel.setBorder(new LineBorder(Color.gray)); + initReuWidgetPanel(); esp.add(reuWidgetPanel, BorderLayout.CENTER); UIButton button = new UIButton(); button.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/download.png")); @@ -112,6 +103,22 @@ public class FormWidgetDetailPane extends FormDockView{ } + /** + * 初始化组件共享和复用面板 + */ + private void initReuWidgetPanel() { + int rowCount = (elCaseBindInfoList.size() + 1)/2; + downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); + downPanel.setPreferredSize(new Dimension(236, rowCount * 82)); + reuWidgetPanel = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); + comboBox = new UIComboBox(getCategories()); + comboBox.setPreferredSize(new Dimension(236, 30)); + initComboBoxSelectedListener(); + reuWidgetPanel.add(comboBox, BorderLayout.NORTH); + reuWidgetPanel.add(downPanel, BorderLayout.CENTER); + reuWidgetPanel.setBorder(new LineBorder(Color.gray)); + } + private void initComboBoxSelectedListener() { comboBox.addItemListener(new ItemListener() { @Override