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