|
|
|
@ -6,7 +6,6 @@ import com.fr.design.designer.beans.models.NewFormModel;
|
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.dialog.DialogActionListener; |
|
|
|
|
import com.fr.design.dialog.UIDialog; |
|
|
|
|
import com.fr.design.fit.NewJForm; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
@ -254,26 +253,21 @@ public class NewFormPane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void newForm(String path) { |
|
|
|
|
if (StringUtils.isEmpty(path)) { |
|
|
|
|
newEmptyForm(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BaseJForm jForm; |
|
|
|
|
try { |
|
|
|
|
Form form = new Form(); |
|
|
|
|
form.readStream(NewFormPane.class.getResourceAsStream(path)); |
|
|
|
|
NewJForm newJForm = new NewJForm(form); |
|
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate(newJForm); |
|
|
|
|
if (StringUtils.isNotEmpty(path)) { |
|
|
|
|
Form form = new Form(); |
|
|
|
|
form.readStream(NewFormPane.class.getResourceAsStream(path)); |
|
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class); |
|
|
|
|
} else { |
|
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class); |
|
|
|
|
} |
|
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jForm); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void newEmptyForm() { |
|
|
|
|
BaseJForm jform = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class); |
|
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jform); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setSelectedLayoutPane(PredefinedLayoutPane layoutPane) { |
|
|
|
|
if (selectedLayoutPane != layoutPane) { |
|
|
|
|
if (selectedLayoutPane != null) { |
|
|
|
|