|
|
|
@ -31,6 +31,7 @@ import com.fr.design.designer.creator.XWParameterLayout;
|
|
|
|
|
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; |
|
|
|
|
import com.fr.design.event.TargetModifiedEvent; |
|
|
|
|
import com.fr.design.event.TargetModifiedListener; |
|
|
|
|
import com.fr.design.fun.FormAdaptiveConfigUIProcessor; |
|
|
|
|
import com.fr.design.fun.PreviewProvider; |
|
|
|
|
import com.fr.design.fun.PropertyItemPaneProvider; |
|
|
|
|
import com.fr.design.gui.frpane.HyperlinkGroupPane; |
|
|
|
@ -129,20 +130,20 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
|
|
|
|
|
public JForm() { |
|
|
|
|
super(new Form(new WBorderLayout("form")), "Form"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initPluginPane(); |
|
|
|
|
startListenPlugin(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JForm(Form form, FILE file) { |
|
|
|
|
super(form, file); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initPluginPane(); |
|
|
|
|
startListenPlugin(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void startListenPlugin() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PluginFilter filter = new PluginFilter() { |
|
|
|
|
@Override |
|
|
|
|
public boolean accept(PluginContext context) { |
|
|
|
@ -162,25 +163,25 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initPluginPane() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExtraDesignClassManager classManager = PluginModule.getAgent(PluginModule.ExtraDesign); |
|
|
|
|
Set<PropertyItemPaneProvider> providers = classManager.getArray(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
addPane(provider); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addPane(PropertyItemPaneProvider provider) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PaneHolder<FormDesigner> holder = provider.getPaneHolder(FormDesigner.class); |
|
|
|
|
if (holder != null) { |
|
|
|
|
JPanel panel = holder.getInstance(formDesign); |
|
|
|
|
EastRegionContainerPane.getInstance().replaceKeyPane(provider.key(), panel); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void refreshEastPropertiesPane() { |
|
|
|
|
// 暂时用不到,遇到的时候再加刷新右侧tab面板的代码
|
|
|
|
@ -561,12 +562,21 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
@Override |
|
|
|
|
public ShortCut[] shortcut4TemplateMenu() { |
|
|
|
|
if (this.index == FORM_TAB) { |
|
|
|
|
return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new FormMobileAttrAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]); |
|
|
|
|
return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new FormMobileAttrAction(this), getReportFitAttrAction()}, new ShortCut[0]); |
|
|
|
|
} else { |
|
|
|
|
return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new FormMobileAttrAction(this), new ReportFitAttrAction(this)}, this.elementCaseDesign.shortcut4TemplateMenu()); |
|
|
|
|
return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new FormMobileAttrAction(this), getReportFitAttrAction()}, this.elementCaseDesign.shortcut4TemplateMenu()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ShortCut getReportFitAttrAction() { |
|
|
|
|
FormAdaptiveConfigUIProcessor adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUIProcessor.MARK_STRING); |
|
|
|
|
if (adaptiveConfigUI != null) { |
|
|
|
|
return adaptiveConfigUI.getConfigShortCut(this); |
|
|
|
|
} |
|
|
|
|
return new ReportFitAttrAction(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 权限细粒度模板菜单 |
|
|
|
|
* 表单中去掉此菜单项 |
|
|
|
@ -825,7 +835,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
|
|
|
|
|
refreshWidgetLibPane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void refreshWidgetLibPane() { |
|
|
|
|
if (EastRegionContainerPane.getInstance().getWidgetLibPane() == null) { |
|
|
|
|
new Thread() { |
|
|
|
|