|
|
|
@ -47,8 +47,6 @@ import com.fr.design.i18n.Toolkit;
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.mainframe.form.FormECCompositeProvider; |
|
|
|
|
import com.fr.design.mainframe.form.FormECDesignerProvider; |
|
|
|
|
import com.fr.design.mainframe.share.collect.ComponentCollector; |
|
|
|
|
import com.fr.design.mainframe.share.util.ShareComponentUtils; |
|
|
|
|
import com.fr.design.mainframe.template.info.JFormProcessInfo; |
|
|
|
|
import com.fr.design.mainframe.template.info.TemplateProcessInfo; |
|
|
|
|
import com.fr.design.mainframe.toolbar.ToolBarMenuDock; |
|
|
|
@ -79,10 +77,8 @@ import com.fr.form.ui.Widget;
|
|
|
|
|
import com.fr.form.ui.container.WBorderLayout; |
|
|
|
|
import com.fr.form.ui.container.WLayout; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.json.JSONArray; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.page.PaperSettingProvider; |
|
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
|
import com.fr.report.cell.Elem; |
|
|
|
|
import com.fr.report.cell.cellattr.CellImage; |
|
|
|
|
import com.fr.report.worksheet.FormElementCase; |
|
|
|
@ -93,6 +89,8 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
|
import com.fr.web.controller.ViewRequestConstants; |
|
|
|
|
|
|
|
|
|
import java.awt.event.ContainerAdapter; |
|
|
|
|
import java.awt.event.ContainerEvent; |
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
@ -135,18 +133,36 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
//FORM_TAB代表是否点击编辑,用于点击编辑前后菜单的显示
|
|
|
|
|
protected int index = FORM_TAB; |
|
|
|
|
|
|
|
|
|
private PluginEventListener pluginListener; |
|
|
|
|
private ContainerAdapter containerAdapter = new ContainerAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void componentRemoved(ContainerEvent e) { |
|
|
|
|
// 当前jfrom未在tab中显示时
|
|
|
|
|
if (formDesign != null) { |
|
|
|
|
XCreator[] creators = formDesign.getSelectionModel().getSelection().getSelectedCreators(); |
|
|
|
|
for (XCreator creator : creators) { |
|
|
|
|
creator.hidePopup(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
public JForm() { |
|
|
|
|
super(new Form(new WBorderLayout("form")), "Form"); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JForm(Form form, FILE file, Parameter[] parameters) { |
|
|
|
|
super(form, file, parameters); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JForm(Form form, FILE file) { |
|
|
|
|
super(form, file); |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void init() { |
|
|
|
|
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().addContainerListener(containerAdapter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -1114,6 +1130,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
public void whenClose() { |
|
|
|
|
super.whenClose(); |
|
|
|
|
this.releaseResources(); |
|
|
|
|
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().removeContainerListener(this.containerAdapter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|