|
|
|
@ -2,12 +2,10 @@ package com.fr.design.form.util;
|
|
|
|
|
|
|
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
|
import com.fr.design.mainframe.FormDesigner; |
|
|
|
|
import com.fr.design.mainframe.JForm; |
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.form.ui.container.WFitLayout; |
|
|
|
|
|
|
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
|
|
public class FormDesignerUtils { |
|
|
|
|
/** |
|
|
|
@ -34,17 +32,12 @@ public class FormDesignerUtils {
|
|
|
|
|
|
|
|
|
|
public static void addWidgetProcessInfo(Widget widget) { |
|
|
|
|
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
if (jTemplate instanceof JForm) { |
|
|
|
|
widget.setWidgetID(UUID.randomUUID().toString()); |
|
|
|
|
((JForm) jTemplate).addWidgetProcessInfo(widget); |
|
|
|
|
} |
|
|
|
|
jTemplate.addWidgetProcessInfo(widget); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void removeWidgetProcessInfo(Widget widget) { |
|
|
|
|
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
if (jTemplate instanceof JForm) { |
|
|
|
|
((JForm) jTemplate).removeWidgetProcessInfo(widget); |
|
|
|
|
} |
|
|
|
|
jTemplate.removeWidgetProcessInfo(widget); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|