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