Browse Source

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

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

【改动思路】
同标题
research/11.0
Starryi 3 years ago
parent
commit
ca8aa83094
  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); super.addToWrapper(parentPanel, width, minHeight);
// REPORT-53175: 新创建的图表组件默认显示标题 since 10.0.18 // REPORT-53175: 新创建的图表组件默认显示标题 since 10.0.18
// 将当前对象添加到父容器后,初始化默认样式的效果 // 将当前对象添加到父容器后,初始化默认样式的效果
initStyle(); refreshStylePreviewEffect();
} }
protected void initStyle() { public void refreshStylePreviewEffect() {
BorderPacker style = toData().getBorderStyle(); BorderPacker style = toData().getBorderStyle();
initBorderAndBackgroundStyle(); refreshBorderAndBackgroundStylePreviewEffect();
if (ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE)) { if (ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE)) {
initTitleStyle(style); initTitleStyle(style);
} else { } else {
@ -107,7 +107,7 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{
reshuffleBorderAndBackgroundPaintingEffectIfTitleExists(); reshuffleBorderAndBackgroundPaintingEffectIfTitleExists();
} }
protected void initBorderAndBackgroundStyle() { public void refreshBorderAndBackgroundStylePreviewEffect() {
BorderPacker style = toData().getBorderStyle(); BorderPacker style = toData().getBorderStyle();
LineBorder DEFAULT_LINE_BORDER = (LineBorder) DEFALUTBORDER; 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 @Override
public void propertyChange() { public void propertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
}), }),
}; };
@ -165,7 +165,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
@Override @Override
protected void initXCreatorProperties() { protected void initXCreatorProperties() {
super.initXCreatorProperties(); super.initXCreatorProperties();
initBorderAndBackgroundStyle(); refreshBorderAndBackgroundStylePreviewEffect();
BaseChartCollection collection = ((BaseChartEditor) data).getChartCollection(); BaseChartCollection collection = ((BaseChartEditor) data).getChartCollection();
isRefreshing = true; isRefreshing = true;
((MiddleChartComponent) designerEditor.getEditorTarget()).populate(collection); ((MiddleChartComponent) designerEditor.getEditorTarget()).populate(collection);
@ -345,7 +345,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
* data属性改变触发其他操作 * data属性改变触发其他操作
*/ */
public void firePropertyChange() { public void firePropertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
@Override @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(); super.initXCreatorProperties();
// 报表块初始化时要加载对应的borderStyle // 报表块初始化时要加载对应的borderStyle
initBorderAndBackgroundStyle(); refreshBorderAndBackgroundStylePreviewEffect();
} }
/** /**
@ -94,7 +94,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
@Override @Override
public void propertyChange() { public void propertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
}), }),
new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
@ -344,7 +344,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
* *
*/ */
public void firePropertyChange() { public void firePropertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
/** /**

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

@ -77,7 +77,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
@Override @Override
public void propertyChange() { public void propertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
}), }),
new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
@ -120,7 +120,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
@Override @Override
protected void initXCreatorProperties() { protected void initXCreatorProperties() {
super.initXCreatorProperties(); super.initXCreatorProperties();
initBorderAndBackgroundStyle(); refreshBorderAndBackgroundStylePreviewEffect();
this.initLayoutManager(); this.initLayoutManager();
this.convert(); this.convert();
} }
@ -549,7 +549,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
* *
*/ */
public void firePropertyChange(){ 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 @Override
public void propertyChange() { public void propertyChange() {
initStyle(); XWAbsoluteBodyLayout.this.refreshStylePreviewEffect();
} }
}) })
}; };
@ -105,8 +105,8 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
} }
@Override @Override
protected void initStyle() { public void refreshStylePreviewEffect() {
initBorderAndBackgroundStyle(); refreshBorderAndBackgroundStylePreviewEffect();
} }
/** /**
@ -114,7 +114,7 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
* *
*/ */
public void firePropertyChange(){ public void firePropertyChange(){
initStyle(); this.refreshStylePreviewEffect();
} }
@Override @Override

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

@ -305,7 +305,7 @@ public class XWAbsoluteLayout extends XLayoutContainer {
} }
@Override @Override
protected void initStyle() { public void refreshStylePreviewEffect() {
// do nothing // 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 @Override
protected void initBorderAndBackgroundStyle() { public void refreshBorderAndBackgroundStylePreviewEffect() {
setBorder(null); setBorder(null);
setBorderImage4Painting(null, 0.0); setBorderImage4Painting(null, 0.0);
setBackground4Painting(null, 0.0); setBackground4Painting(null, 0.0);
@ -76,7 +76,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
// 初始化后(如打开旧模版),需要重新调整组件/标题/边框的显示效果 // 初始化后(如打开旧模版),需要重新调整组件/标题/边框的显示效果
XCreator xCreator = getBodyCreator(); XCreator xCreator = getBodyCreator();
if (xCreator instanceof XBorderStyleWidgetCreator) { if (xCreator instanceof XBorderStyleWidgetCreator) {
((XBorderStyleWidgetCreator) xCreator).initStyle(); ((XBorderStyleWidgetCreator) xCreator).refreshStylePreviewEffect();
} }
} }
@ -237,7 +237,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
} }
// 刷新时重置下样式 // 刷新时重置下样式
if (bodyCreator != null) { if (bodyCreator != null) {
bodyCreator.initStyle(); bodyCreator.refreshStylePreviewEffect();
} }
isRefreshing = false; 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 @Override
protected XLayoutContainer getCreatorWrapper(String widgetName) { protected XLayoutContainer getCreatorWrapper(String widgetName) {
initStyle(); refreshStylePreviewEffect();
Dimension dimension = new Dimension(); Dimension dimension = new Dimension();
//主结构是一个borderlayout, 标签部分是north, card部分为center //主结构是一个borderlayout, 标签部分是north, card部分为center
WCardMainBorderLayout border = new WCardMainBorderLayout(); WCardMainBorderLayout border = new WCardMainBorderLayout();
@ -389,7 +389,7 @@ public class XWCardLayout extends XLayoutContainer {
@Override @Override
public void propertyChange() { public void propertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
}) })
}; };
@ -397,10 +397,10 @@ public class XWCardLayout extends XLayoutContainer {
//初始化样式 //初始化样式
@Override @Override
protected void initStyle() { public void refreshStylePreviewEffect() {
BorderPacker style = toData().getBorderStyle(); BorderPacker style = toData().getBorderStyle();
initBorderTitleStyle(style); initBorderTitleStyle(style);
initBorderAndBackgroundStyle(); refreshBorderAndBackgroundStylePreviewEffect();
clearOrShowTitleLayout(ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE)); clearOrShowTitleLayout(ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE));
} }
@ -479,7 +479,7 @@ public class XWCardLayout extends XLayoutContainer {
*/ */
@Override @Override
public void firePropertyChange() { public void firePropertyChange() {
initStyle(); refreshStylePreviewEffect();
} }
public void resetTabBackground(TemplateStyle templateStyle) { public void resetTabBackground(TemplateStyle templateStyle) {

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

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

Loading…
Cancel
Save