|
|
|
@ -419,8 +419,8 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description: 为了不覆盖以前的组件,所以要计算可以添加组件的区域 |
|
|
|
|
* @param layoutContainer |
|
|
|
|
* @Description: 为了不覆盖以前的组件,所以要计算可以添加组件的区域 |
|
|
|
|
* @return: |
|
|
|
|
* @Author: Henry.Wang |
|
|
|
|
* @date: 2020/7/15 15:12 |
|
|
|
@ -604,14 +604,15 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
|
|
|
|
|
label.setWidgetName("Label" + name); |
|
|
|
|
label.setWidgetValue(new WidgetValue(name + ":")); |
|
|
|
|
XCreator xCreator = XCreatorUtils.createXCreator(label); |
|
|
|
|
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) |
|
|
|
|
+ FIRST_H_LOCATION, addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { |
|
|
|
|
int x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + FIRST_H_LOCATION; |
|
|
|
|
int y = addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE); |
|
|
|
|
if (!(this.autoAddComponent(xCreator, x, y))) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
EditorHolder editor = new EditorHolder(parameter); |
|
|
|
|
xCreator = XCreatorUtils.createXCreator(editor); |
|
|
|
|
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) |
|
|
|
|
+ SECOND_H_LOCATION, addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { |
|
|
|
|
x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + SECOND_H_LOCATION; |
|
|
|
|
if (!(this.autoAddComponent(xCreator, x, y))) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
@ -667,16 +668,17 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
|
|
|
|
|
label.setWidgetValue(new WidgetValue(parameterArray[i].getName() + ":")); |
|
|
|
|
XCreator xCreator = XCreatorUtils.createXCreator(label); |
|
|
|
|
|
|
|
|
|
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) |
|
|
|
|
+ FIRST_H_LOCATION, addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { |
|
|
|
|
int x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + FIRST_H_LOCATION; |
|
|
|
|
int y = addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE); |
|
|
|
|
if (!(this.autoAddComponent(xCreator, x, y))) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// 每行显示5组
|
|
|
|
|
EditorHolder editor = new EditorHolder(parameterArray[i]); |
|
|
|
|
editor.setWidgetName(parameterArray[i].getName()); |
|
|
|
|
xCreator = XCreatorUtils.createXCreator(editor); |
|
|
|
|
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) |
|
|
|
|
+ SECOND_H_LOCATION, addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { |
|
|
|
|
x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + SECOND_H_LOCATION; |
|
|
|
|
if (!(this.autoAddComponent(xCreator, x, y))) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
currentIndex++; |
|
|
|
|