|
|
|
@ -740,9 +740,6 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
public void refreshRoot() { |
|
|
|
|
// 撤销恢复操作都会refreshRoot,这时候的target.getContainer里的widget会和之前不一样,所以不用root判断来取
|
|
|
|
|
XLayoutContainer formLayoutContainer = (XLayoutContainer) XCreatorUtils.createXCreator(this.getTarget().getContainer()); |
|
|
|
|
if(ExtraClassManager.getInstance().getDebugLogProviders().length != 0){ |
|
|
|
|
formDesignerDebug(); |
|
|
|
|
} |
|
|
|
|
// 布局默认都是1,底层的border改为0,不然没意义
|
|
|
|
|
this.getTarget().getContainer().setMargin(new PaddingMargin(0,0,0,0)); |
|
|
|
|
formLayoutContainer.setBorder(null); |
|
|
|
@ -799,9 +796,6 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
// 再次打开时,layout下root,有内边距的话组件加上
|
|
|
|
|
LayoutUtils.layoutContainer(centerContainer); |
|
|
|
|
formLayoutContainer.add(rootComponent, WBorderLayout.CENTER); |
|
|
|
|
if(ExtraClassManager.getInstance().getDebugLogProviders().length != 0){ |
|
|
|
|
formDesignerDebug(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1069,30 +1063,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
*/ |
|
|
|
|
public void refreshDesignerUI() { |
|
|
|
|
LayoutUtils.layoutRootContainer(getRootComponent()); |
|
|
|
|
if(ExtraClassManager.getInstance().getDebugLogProviders().length != 0){ |
|
|
|
|
formDesignerDebug(); |
|
|
|
|
} |
|
|
|
|
repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void formDesignerDebug() { |
|
|
|
|
if(this.getTarget().getContainer() instanceof WBorderLayout){ |
|
|
|
|
Widget widget= ((WBorderLayout) this.getTarget().getContainer()).getLayoutWidget(WBorderLayout.CENTER); |
|
|
|
|
if(widget != null){ |
|
|
|
|
ExtraClassManager.getInstance().sendDebugLog(widget.getClass().getName()+"@"+Integer.toHexString(widget.hashCode())); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
ExtraClassManager.getInstance().sendDebugLog("Target.center is null"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(this.getRootComponent() != null && this.getRootComponent().toData() != null){ |
|
|
|
|
ExtraClassManager.getInstance().sendDebugLog(this.getRootComponent().toData().getClass().getName()+"@"+Integer.toHexString(this.getRootComponent().toData().getClass().hashCode())); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
ExtraClassManager.getInstance().sendDebugLog("RootComponent or rootComponent.data is null"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 返回复制粘贴删除等动作 |
|
|
|
|
* @return 同上 |
|
|
|
|