|
|
@ -15,6 +15,7 @@ import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.form.main.Form; |
|
|
|
import com.fr.form.main.Form; |
|
|
|
|
|
|
|
import com.fr.form.ui.container.WBorderLayout; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
@ -264,13 +265,12 @@ public class NewFormPane extends BasicPane { |
|
|
|
private void newForm(String path) { |
|
|
|
private void newForm(String path) { |
|
|
|
BaseJForm jForm; |
|
|
|
BaseJForm jForm; |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
Form form = new Form(new WBorderLayout("form")); |
|
|
|
if (StringUtils.isNotEmpty(path)) { |
|
|
|
if (StringUtils.isNotEmpty(path)) { |
|
|
|
Form form = new Form(); |
|
|
|
|
|
|
|
form.readStream(NewFormPane.class.getResourceAsStream(path)); |
|
|
|
form.readStream(NewFormPane.class.getResourceAsStream(path)); |
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class); |
|
|
|
form = (Form) form.cloneAsLayoutTemplate(); |
|
|
|
} else { |
|
|
|
|
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class); |
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jForm); |
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jForm); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|