Browse Source

导出开关

research/10.0
yaoh.wu 6 years ago
parent
commit
197a34a26c
  1. 21
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  2. 24
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

21
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -5,9 +5,9 @@ import com.fr.base.PaperSize;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction;
import com.fr.design.actions.TemplateParameterAction; import com.fr.design.actions.TemplateParameterAction;
import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction;
import com.fr.design.cell.FloatElementsProvider; import com.fr.design.cell.FloatElementsProvider;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.designer.beans.actions.CopyAction; import com.fr.design.designer.beans.actions.CopyAction;
@ -118,7 +118,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override @Override
public void refreshEastPropertiesPane() { public void refreshEastPropertiesPane() {
// 暂时用不到,遇到的时候再加刷新右侧tab面板的代码 // 暂时用不到,遇到的时候再加刷新右侧tab面板的代码
return;
} }
@Override @Override
@ -152,7 +151,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override @Override
public void setJTemplateResolution(int resolution) { public void setJTemplateResolution(int resolution) {
return;
} }
@Override @Override
@ -195,7 +193,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
} }
public void setAuthorityMode(boolean isUpMode) { public void setAuthorityMode(boolean isUpMode) {
return;
} }
public int getToolBarHeight() { public int getToolBarHeight() {
@ -208,7 +205,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
* @return 菜单数组 * @return 菜单数组
*/ */
public ShortCut[] shortcut4FileMenu() { public ShortCut[] shortcut4FileMenu() {
return (ShortCut[]) ArrayUtils.addAll( return ArrayUtils.addAll(
super.shortcut4FileMenu(), super.shortcut4FileMenu(),
DesignerMode.isVcsMode() ? new ShortCut[0] : new ShortCut[]{this.createWorkBookExportMenu()} DesignerMode.isVcsMode() ? new ShortCut[0] : new ShortCut[]{this.createWorkBookExportMenu()}
); );
@ -226,7 +223,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
* 取消格式 * 取消格式
*/ */
public void cancelFormat() { public void cancelFormat() {
return;
} }
/** /**
@ -292,30 +288,25 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
* 去除选择 * 去除选择
*/ */
public void removeTemplateSelection() { public void removeTemplateSelection() {
return;
} }
public void setSheetCovered(boolean isCovered) { public void setSheetCovered(boolean isCovered) {
return;
} }
/** /**
* 刷新容器 * 刷新容器
*/ */
public void refreshContainer() { public void refreshContainer() {
return;
} }
/** /**
* 去除参数面板选择 * 去除参数面板选择
*/ */
public void removeParameterPaneSelection() { public void removeParameterPaneSelection() {
return;
} }
@Override @Override
public void setScale(int resolution) { public void setScale(int resolution) {
return;
} }
@Override @Override
@ -478,8 +469,8 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override @Override
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
return this.index == FORM_TAB ? return this.index == FORM_TAB ?
(MenuDef[]) ArrayUtils.addAll(super.menus4Target(), this.formDesign.menus4Target()) : ArrayUtils.addAll(super.menus4Target(), this.formDesign.menus4Target()) :
(MenuDef[]) ArrayUtils.addAll(super.menus4Target(), this.elementCaseDesign.menus4Target()); ArrayUtils.addAll(super.menus4Target(), this.elementCaseDesign.menus4Target());
} }
@ -504,9 +495,9 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override @Override
public ShortCut[] shortcut4TemplateMenu() { public ShortCut[] shortcut4TemplateMenu() {
if (this.index == FORM_TAB) { if (this.index == FORM_TAB) {
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]); return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]);
} else { } else {
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, this.elementCaseDesign.shortcut4TemplateMenu()); return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, this.elementCaseDesign.shortcut4TemplateMenu());
} }
} }

24
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -41,7 +41,6 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIModeControlContainer; import com.fr.design.gui.icontainer.UIModeControlContainer;
import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.report.fit.menupane.ReportFitAttrAction;
import com.fr.design.mainframe.templateinfo.JWorkBookProcessInfo; import com.fr.design.mainframe.templateinfo.JWorkBookProcessInfo;
import com.fr.design.mainframe.templateinfo.TemplateProcessInfo; import com.fr.design.mainframe.templateinfo.TemplateProcessInfo;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
@ -58,6 +57,7 @@ import com.fr.design.preview.PagePreview;
import com.fr.design.preview.ViewPreview; import com.fr.design.preview.ViewPreview;
import com.fr.design.preview.WriteEnhancePreview; import com.fr.design.preview.WriteEnhancePreview;
import com.fr.design.preview.WritePreview; import com.fr.design.preview.WritePreview;
import com.fr.design.report.fit.menupane.ReportFitAttrAction;
import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.selection.QuickEditor; import com.fr.design.selection.QuickEditor;
@ -68,7 +68,6 @@ import com.fr.file.FILE;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.grid.GridUtils; import com.fr.grid.GridUtils;
@ -96,7 +95,9 @@ import com.fr.stable.project.ProjectConstants;
import com.fr.web.controller.ViewRequestConstants; import com.fr.web.controller.ViewRequestConstants;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import javax.swing.*; import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -351,7 +352,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
return parameterPane.getParaDesigner().getEastUpPane(); return parameterPane.getParaDesigner().getEastUpPane();
} }
if (delegate4ToolbarMenuAdapter() instanceof PolyDesigner) { if (delegate4ToolbarMenuAdapter() instanceof PolyDesigner) {
return ((PolyDesigner) delegate4ToolbarMenuAdapter()).getEastUpPane(); return delegate4ToolbarMenuAdapter().getEastUpPane();
} else { } else {
ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane; ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane;
if (casePane != null) { if (casePane != null) {
@ -370,7 +371,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
if (((PolyDesigner) delegate4ToolbarMenuAdapter()).getSelectionType() == PolyDesigner.SelectionType.NONE) { if (((PolyDesigner) delegate4ToolbarMenuAdapter()).getSelectionType() == PolyDesigner.SelectionType.NONE) {
return new JPanel(); return new JPanel();
} else { } else {
return ((PolyDesigner) delegate4ToolbarMenuAdapter()).getEastDownPane(); return delegate4ToolbarMenuAdapter().getEastDownPane();
} }
} else { } else {
ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane; ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane;
@ -634,11 +635,10 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
@Override @Override
public ShortCut[] shortcut4FileMenu() { public ShortCut[] shortcut4FileMenu() {
boolean showWorkBookExportMenu = DesignerMode.isVcsMode() boolean hideWorkBookExportMenu = DesignerMode.isVcsMode()
|| DesignerMode.isAuthorityEditing(); || DesignerMode.isAuthorityEditing();
// || !WorkContext.getCurrent().isLocal(); return ArrayUtils.addAll(super.shortcut4FileMenu(),
return (ShortCut[]) ArrayUtils.addAll(super.shortcut4FileMenu(), hideWorkBookExportMenu ? new ShortCut[0] : new ShortCut[]{this.createWorkBookExportMenu()}
showWorkBookExportMenu ? new ShortCut[0] : new ShortCut[]{this.createWorkBookExportMenu()}
); );
} }
@ -649,7 +649,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
@Override @Override
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
return (MenuDef[]) ArrayUtils.addAll( return ArrayUtils.addAll(
super.menus4Target(), this.delegate4ToolbarMenuAdapter().menus4Target() super.menus4Target(), this.delegate4ToolbarMenuAdapter().menus4Target()
); );
} }
@ -695,7 +695,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
@Override @Override
public ShortCut[] shortcut4TemplateMenu() { public ShortCut[] shortcut4TemplateMenu() {
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{ return ArrayUtils.addAll(new ShortCut[]{
new ReportWebAttrAction(this), new ReportWebAttrAction(this),
new ReportExportAttrAction(this), new ReportExportAttrAction(this),
new ReportParameterAction(this), new ReportParameterAction(this),
@ -925,7 +925,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
@Override @Override
public void previewMenuActionPerformed(PreviewProvider provider) { public void previewMenuActionPerformed(PreviewProvider provider) {
super.previewMenuActionPerformed(provider); super.previewMenuActionPerformed(provider);
} }
/** /**

Loading…
Cancel
Save