Browse Source

REPORT-58626 新自适应-报表块-旧模板设为横向自适应,切换成新模板后图片背景不见了

zheng-1641779399395
Henry.Wang 3 years ago
parent
commit
414415bcf1
  1. 8
      designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java
  2. 21
      designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java

8
designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java

@ -33,7 +33,7 @@ import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.util.Set;
public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider , Releasable {
public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider, Releasable {
private UILabel imageLable;
private FormDesigner designer;
private static BufferedImage DEFAULT_BACKGROUND;
@ -269,6 +269,12 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
return toData().getElementCase();
}
@Override
public void doLayout() {
super.doLayout();
this.updateECImage();
}
public String getElementCaseContainerName() {
return toData().getWidgetName();
}

21
designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java

@ -294,7 +294,6 @@ public class FormSelection {
creator.setBackupBound(backupBounds);
}
layoutAdapter.fix(creator);
resetElementCaseImage(creator);
}
i++;
}
@ -322,26 +321,6 @@ public class FormSelection {
return false;
}
/**
* @Description 重置报表块缩略图
* @param: creator
* @return void
* @Author Henry.Wang
* @Date 2021/5/21 14:59
**/
public void resetElementCaseImage(XCreator creator) {
if (creator instanceof XWTitleLayout) {
XWTitleLayout xwTitleLayout = (XWTitleLayout) creator;
for (int i = 0; i < xwTitleLayout.getComponentCount(); i++) {
Component component = xwTitleLayout.getComponent(i);
if (component instanceof XElementCase) {
XElementCase xElementCase = (XElementCase) component;
xElementCase.updateECImage();
}
}
}
}
/**
* 检查下有没有参数面板如果存在处理下参数面板造成的偏移量
* @param rectangle

Loading…
Cancel
Save