xiaoxia 8 years ago
parent
commit
c84679f246
  1. 4
      designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java
  2. 6
      designer_form/src/com/fr/design/mainframe/ShareWidgetPane.java

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

@ -33,7 +33,7 @@ public class FormWidgetDetailPane extends FormDockView{
private JScrollPane downPanel;
private JPanel reuWidgetPanel;
private UIComboBox comboBox;
private List<ElCaseBindInfo> elCaseBindInfoList;
private ElCaseBindInfo[] elCaseBindInfoList;
public static FormWidgetDetailPane getInstance() {
if (HOLDER.singleton == null) {
@ -107,7 +107,7 @@ public class FormWidgetDetailPane extends FormDockView{
* 初始化组件共享和复用面板
*/
private void initReuWidgetPanel() {
int rowCount = (elCaseBindInfoList.size() + 1)/2;
int rowCount = (elCaseBindInfoList.length + 1)/2;
downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList));
downPanel.setPreferredSize(new Dimension(236, rowCount * 82));
reuWidgetPanel = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();

6
designer_form/src/com/fr/design/mainframe/ShareWidgetPane.java

@ -15,15 +15,15 @@ import java.util.List;
*/
public class ShareWidgetPane extends JPanel {
public ShareWidgetPane(List<ElCaseBindInfo> elCaseBindInfoList) {
public ShareWidgetPane(ElCaseBindInfo[] elCaseBindInfoList) {
this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));// 设置面板的边框 ,距离上、左、下、右 的距离
int rowCount = (elCaseBindInfoList.size() + 1)/2;
int rowCount = (elCaseBindInfoList.length + 1)/2;
this.setLayout(new GridLayout(rowCount, 2, 10, 10));
for (ElCaseBindInfo rbModuleInfo : elCaseBindInfoList) {
ShareWidgetButton widgetButton = new ShareWidgetButton(rbModuleInfo);
this.add(widgetButton);
}
if (elCaseBindInfoList.size() == 1) {
if (elCaseBindInfoList.length == 1) {
this.add(new JPanel());
}

Loading…
Cancel
Save