xiaoxia 8 years ago
parent
commit
f68ae9af64
  1. 27
      designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java

27
designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -82,16 +82,7 @@ public class FormWidgetDetailPane extends FormDockView{
if (elCaseBindInfoList == null) { if (elCaseBindInfoList == null) {
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList();
} }
downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); initReuWidgetPanel();
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));
esp.add(reuWidgetPanel, BorderLayout.CENTER); esp.add(reuWidgetPanel, BorderLayout.CENTER);
UIButton button = new UIButton(); UIButton button = new UIButton();
button.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/download.png")); 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() { private void initComboBoxSelectedListener() {
comboBox.addItemListener(new ItemListener() { comboBox.addItemListener(new ItemListener() {
@Override @Override

Loading…
Cancel
Save