Browse Source

REPORT-57551 设计器显示,自适应布局下body背景设置以后,画布中没有实时显示背景

【问题原因】
重命名组件样式预览效果的相关方法

【改动思路】
同标题
fix-lag
Starryi 3 years ago
parent
commit
1fbece9f3e
  1. 8
      designer-form/src/main/java/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java
  2. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java
  3. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java
  4. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java
  5. 8
      designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java
  6. 2
      designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java
  7. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java
  8. 10
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardLayout.java
  9. 2
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

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

@ -91,12 +91,12 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{
super.addToWrapper(parentPanel, width, minHeight);
// REPORT-53175: 新创建的图表组件默认显示标题 since 10.0.18
// 将当前对象添加到父容器后,初始化默认样式的效果
initStyle();
refreshStylePreviewEffect();
}
protected void initStyle() {
public void refreshStylePreviewEffect() {
BorderPacker style = toData().getBorderStyle();
initBorderAndBackgroundStyle();
refreshBorderAndBackgroundStylePreviewEffect();
if (ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE)) {
initTitleStyle(style);
} else {
@ -107,7 +107,7 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{
reshuffleBorderAndBackgroundPaintingEffectIfTitleExists();
}
protected void initBorderAndBackgroundStyle() {
public void refreshBorderAndBackgroundStylePreviewEffect() {
BorderPacker style = toData().getBorderStyle();
LineBorder DEFAULT_LINE_BORDER = (LineBorder) DEFALUTBORDER;

6
designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java

@ -122,7 +122,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
@Override
public void propertyChange() {
initStyle();
refreshStylePreviewEffect();
}
}),
};
@ -165,7 +165,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
@Override
protected void initXCreatorProperties() {
super.initXCreatorProperties();
initBorderAndBackgroundStyle();
refreshBorderAndBackgroundStylePreviewEffect();
BaseChartCollection collection = ((BaseChartEditor) data).getChartCollection();
isRefreshing = true;
((MiddleChartComponent) designerEditor.getEditorTarget()).populate(collection);
@ -344,7 +344,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
* data属性改变触发其他操作
*/
public void firePropertyChange() {
initStyle();
refreshStylePreviewEffect();
}
@Override

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

@ -58,7 +58,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
super.initXCreatorProperties();
// 报表块初始化时要加载对应的borderStyle
initBorderAndBackgroundStyle();
refreshBorderAndBackgroundStylePreviewEffect();
}
/**
@ -94,7 +94,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
@Override
public void propertyChange() {
initStyle();
refreshStylePreviewEffect();
}
}),
new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
@ -336,7 +336,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
*
*/
public void firePropertyChange() {
initStyle();
refreshStylePreviewEffect();
}
/**

6
designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java

@ -75,7 +75,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
@Override
public void propertyChange() {
initStyle();
refreshStylePreviewEffect();
}
}),
new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
@ -118,7 +118,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
@Override
protected void initXCreatorProperties() {
super.initXCreatorProperties();
initBorderAndBackgroundStyle();
refreshBorderAndBackgroundStylePreviewEffect();
this.initLayoutManager();
this.convert();
}
@ -547,7 +547,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
*
*/
public void firePropertyChange(){
initStyle();
refreshStylePreviewEffect();
}
/**

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

@ -78,7 +78,7 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
@Override
public void propertyChange() {
initStyle();
XWAbsoluteBodyLayout.this.refreshStylePreviewEffect();
}
})
};
@ -105,8 +105,8 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
}
@Override
protected void initStyle() {
initBorderAndBackgroundStyle();
public void refreshStylePreviewEffect() {
refreshBorderAndBackgroundStylePreviewEffect();
}
/**
@ -114,7 +114,7 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
*
*/
public void firePropertyChange(){
initStyle();
this.refreshStylePreviewEffect();
}
@Override

2
designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -305,7 +305,7 @@ public class XWAbsoluteLayout extends XLayoutContainer {
}
@Override
protected void initStyle() {
public void refreshStylePreviewEffect() {
// do nothing
}

6
designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java

@ -63,7 +63,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
}
@Override
protected void initBorderAndBackgroundStyle() {
public void refreshBorderAndBackgroundStylePreviewEffect() {
setBorder(null);
setBorderImage4Painting(null, 0.0);
setBackground4Painting(null, 0.0);
@ -76,7 +76,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
// 初始化后(如打开旧模版),需要重新调整组件/标题/边框的显示效果
XCreator xCreator = getBodyCreator();
if (xCreator instanceof XBorderStyleWidgetCreator) {
((XBorderStyleWidgetCreator) xCreator).initStyle();
((XBorderStyleWidgetCreator) xCreator).refreshStylePreviewEffect();
}
}
@ -237,7 +237,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
}
// 刷新时重置下样式
if (bodyCreator != null) {
bodyCreator.initStyle();
bodyCreator.refreshStylePreviewEffect();
}
isRefreshing = false;
}

10
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardLayout.java

@ -160,7 +160,7 @@ public class XWCardLayout extends XLayoutContainer {
*/
@Override
protected XLayoutContainer getCreatorWrapper(String widgetName) {
initStyle();
refreshStylePreviewEffect();
Dimension dimension = new Dimension();
//主结构是一个borderlayout, 标签部分是north, card部分为center
WCardMainBorderLayout border = new WCardMainBorderLayout();
@ -389,7 +389,7 @@ public class XWCardLayout extends XLayoutContainer {
@Override
public void propertyChange() {
initStyle();
refreshStylePreviewEffect();
}
})
};
@ -397,10 +397,10 @@ public class XWCardLayout extends XLayoutContainer {
//初始化样式
@Override
protected void initStyle() {
public void refreshStylePreviewEffect() {
BorderPacker style = toData().getBorderStyle();
initBorderTitleStyle(style);
initBorderAndBackgroundStyle();
refreshBorderAndBackgroundStylePreviewEffect();
clearOrShowTitleLayout(ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE));
}
@ -479,7 +479,7 @@ public class XWCardLayout extends XLayoutContainer {
*/
@Override
public void firePropertyChange() {
initStyle();
refreshStylePreviewEffect();
}
public void resetTabBackground(TemplateStyle templateStyle) {

2
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -417,7 +417,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout {
public void firePropertyChange(){
XWCardLayout cardLayout = this.getCardPart();
if (cardLayout != null && cardLayout.toData() != null) {
cardLayout.initStyle();
cardLayout.refreshStylePreviewEffect();
}
}

Loading…
Cancel
Save