|
|
@ -57,11 +57,16 @@ import com.fr.grid.GridUtils; |
|
|
|
import com.fr.io.exporter.EmbeddedTableDataExporter; |
|
|
|
import com.fr.io.exporter.EmbeddedTableDataExporter; |
|
|
|
import com.fr.main.TemplateWorkBook; |
|
|
|
import com.fr.main.TemplateWorkBook; |
|
|
|
import com.fr.main.impl.WorkBook; |
|
|
|
import com.fr.main.impl.WorkBook; |
|
|
|
|
|
|
|
import com.fr.main.impl.WorkBookAdapter; |
|
|
|
|
|
|
|
import com.fr.main.impl.WorkBookX; |
|
|
|
import com.fr.main.parameter.ReportParameterAttr; |
|
|
|
import com.fr.main.parameter.ReportParameterAttr; |
|
|
|
import com.fr.poly.PolyDesigner; |
|
|
|
import com.fr.poly.PolyDesigner; |
|
|
|
import com.fr.poly.creator.BlockCreator; |
|
|
|
import com.fr.poly.creator.BlockCreator; |
|
|
|
import com.fr.privilege.finegrain.WorkSheetPrivilegeControl; |
|
|
|
import com.fr.privilege.finegrain.WorkSheetPrivilegeControl; |
|
|
|
import com.fr.report.ReportHelper; |
|
|
|
import com.fr.report.ReportHelper; |
|
|
|
|
|
|
|
import com.fr.report.cell.Elem; |
|
|
|
|
|
|
|
import com.fr.report.cell.cellattr.CellImage; |
|
|
|
|
|
|
|
import com.fr.report.cell.painter.CellImagePainter; |
|
|
|
import com.fr.report.elementcase.TemplateElementCase; |
|
|
|
import com.fr.report.elementcase.TemplateElementCase; |
|
|
|
import com.fr.report.poly.PolyWorkSheet; |
|
|
|
import com.fr.report.poly.PolyWorkSheet; |
|
|
|
import com.fr.report.worksheet.WorkSheet; |
|
|
|
import com.fr.report.worksheet.WorkSheet; |
|
|
@ -85,6 +90,9 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
|
|
|
|
|
|
|
|
private static final String SHARE_SUFFIX = "_share"; |
|
|
|
private static final String SHARE_SUFFIX = "_share"; |
|
|
|
private static final String SHARE_FOLDER = "share"; |
|
|
|
private static final String SHARE_FOLDER = "share"; |
|
|
|
|
|
|
|
private static final String DEFAULT_WBX_FILE_PREFIX = "WorkBookX"; |
|
|
|
|
|
|
|
private static final String DEFAULT_WB_FILE_PREFIX = "WorkBook"; |
|
|
|
|
|
|
|
|
|
|
|
private static final int TOOLBARPANEDIMHEIGHT = 26; |
|
|
|
private static final int TOOLBARPANEDIMHEIGHT = 26; |
|
|
|
private static final double MIN_TIME = 0.4; |
|
|
|
private static final double MIN_TIME = 0.4; |
|
|
|
|
|
|
|
|
|
|
@ -94,7 +102,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
private int resolution = ScreenResolution.getScreenResolution(); |
|
|
|
private int resolution = ScreenResolution.getScreenResolution(); |
|
|
|
|
|
|
|
|
|
|
|
public JWorkBook() { |
|
|
|
public JWorkBook() { |
|
|
|
super(new WorkBook(new WorkSheet()), "WorkBook"); |
|
|
|
super(new WorkBook(new WorkSheet()), DEFAULT_WB_FILE_PREFIX); |
|
|
|
|
|
|
|
populateReportParameterAttr(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JWorkBook(WorkBookX workBookX) { |
|
|
|
|
|
|
|
super(new WorkBookAdapter(workBookX), DEFAULT_WBX_FILE_PREFIX); |
|
|
|
populateReportParameterAttr(); |
|
|
|
populateReportParameterAttr(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -166,6 +179,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
return centerPane; |
|
|
|
return centerPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public TemplateProcessInfo getProcessInfo() { |
|
|
|
public TemplateProcessInfo getProcessInfo() { |
|
|
|
if (processInfo == null) { |
|
|
|
if (processInfo == null) { |
|
|
|
processInfo = new JWorkBookProcessInfo(template); |
|
|
|
processInfo = new JWorkBookProcessInfo(template); |
|
|
@ -188,6 +202,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rolsName 角色 |
|
|
|
* @param rolsName 角色 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void judgeSheetAuthority(String rolsName) { |
|
|
|
public void judgeSheetAuthority(String rolsName) { |
|
|
|
boolean isCovered = reportComposite.getEditingTemplateReport().getWorkSheetPrivilegeControl().checkInvisible(rolsName); |
|
|
|
boolean isCovered = reportComposite.getEditingTemplateReport().getWorkSheetPrivilegeControl().checkInvisible(rolsName); |
|
|
|
centerPane.setSheeetCovered(isCovered); |
|
|
|
centerPane.setSheeetCovered(isCovered); |
|
|
@ -197,6 +212,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 在编辑的面板是被参考的面板时,取消格式刷 |
|
|
|
* 在编辑的面板是被参考的面板时,取消格式刷 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void doConditionCancelFormat() { |
|
|
|
public void doConditionCancelFormat() { |
|
|
|
if (ComparatorUtils.equals(reportComposite.centerCardPane.editingComponet.elementCasePane, DesignerContext.getReferencedElementCasePane())) { |
|
|
|
if (ComparatorUtils.equals(reportComposite.centerCardPane.editingComponet.elementCasePane, DesignerContext.getReferencedElementCasePane())) { |
|
|
|
cancelFormat(); |
|
|
|
cancelFormat(); |
|
|
@ -207,6 +223,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 无条件取消格式刷 |
|
|
|
* 无条件取消格式刷 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void cancelFormat() { |
|
|
|
public void cancelFormat() { |
|
|
|
DesignerContext.setFormatState(DesignerContext.FORMAT_STATE_NULL); |
|
|
|
DesignerContext.setFormatState(DesignerContext.FORMAT_STATE_NULL); |
|
|
|
reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setCursor(UIConstants.CELL_DEFAULT_CURSOR); |
|
|
|
reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setCursor(UIConstants.CELL_DEFAULT_CURSOR); |
|
|
@ -217,6 +234,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
this.repaint(); |
|
|
|
this.repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public int getEditingReportIndex() { |
|
|
|
public int getEditingReportIndex() { |
|
|
|
return reportComposite.getEditingIndex(); |
|
|
|
return reportComposite.getEditingIndex(); |
|
|
|
} |
|
|
|
} |
|
|
@ -226,6 +244,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 返回权限细粒度面板 |
|
|
|
* @return 返回权限细粒度面板 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public AuthorityEditPane createAuthorityEditPane() { |
|
|
|
public AuthorityEditPane createAuthorityEditPane() { |
|
|
|
if (centerPane.isUpEditMode()) { |
|
|
|
if (centerPane.isUpEditMode()) { |
|
|
|
return parameterPane.getParaDesigner().getAuthorityEditPane(); |
|
|
|
return parameterPane.getParaDesigner().getAuthorityEditPane(); |
|
|
@ -241,6 +260,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public ToolBarMenuDockPlus getToolBarMenuDockPlus() { |
|
|
|
public ToolBarMenuDockPlus getToolBarMenuDockPlus() { |
|
|
|
if (this.getEditingElementCasePane() == null) { |
|
|
|
if (this.getEditingElementCasePane() == null) { |
|
|
|
return JWorkBook.this; |
|
|
|
return JWorkBook.this; |
|
|
@ -274,6 +294,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
reportComposite.setComponents(); |
|
|
|
reportComposite.setComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public JPanel getEastUpPane() { |
|
|
|
public JPanel getEastUpPane() { |
|
|
|
if (BaseUtils.isAuthorityEditing()) { |
|
|
|
if (BaseUtils.isAuthorityEditing()) { |
|
|
|
return allowAuthorityUpPane(); |
|
|
|
return allowAuthorityUpPane(); |
|
|
@ -318,6 +339,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
return new JPanel(); |
|
|
|
return new JPanel(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public JPanel getEastDownPane() { |
|
|
|
public JPanel getEastDownPane() { |
|
|
|
if (centerPane.isUpEditMode()) { |
|
|
|
if (centerPane.isUpEditMode()) { |
|
|
|
return parameterPane.getParaDesigner().getEastDownPane(); |
|
|
|
return parameterPane.getParaDesigner().getEastDownPane(); |
|
|
@ -340,10 +362,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 移除选择 |
|
|
|
* 移除选择 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void removeTemplateSelection() { |
|
|
|
public void removeTemplateSelection() { |
|
|
|
this.reportComposite.removeSelection(); |
|
|
|
this.reportComposite.removeSelection(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void setSheetCovered(boolean isCovered) { |
|
|
|
public void setSheetCovered(boolean isCovered) { |
|
|
|
centerPane.setSheeetCovered(isCovered); |
|
|
|
centerPane.setSheeetCovered(isCovered); |
|
|
|
} |
|
|
|
} |
|
|
@ -351,6 +375,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 刷新容器 |
|
|
|
* 刷新容器 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void refreshContainer() { |
|
|
|
public void refreshContainer() { |
|
|
|
centerPane.refreshContainer(); |
|
|
|
centerPane.refreshContainer(); |
|
|
|
} |
|
|
|
} |
|
|
@ -358,6 +383,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 移除参数面板选择 |
|
|
|
* 移除参数面板选择 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void removeParameterPaneSelection() { |
|
|
|
public void removeParameterPaneSelection() { |
|
|
|
parameterPane.getParaDesigner().removeSelection(); |
|
|
|
parameterPane.getParaDesigner().removeSelection(); |
|
|
|
} |
|
|
|
} |
|
|
@ -456,6 +482,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
return this.resolution; |
|
|
|
return this.resolution; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public int getToolBarHeight() { |
|
|
|
public int getToolBarHeight() { |
|
|
|
return TOOLBARPANEDIMHEIGHT; |
|
|
|
return TOOLBARPANEDIMHEIGHT; |
|
|
|
} |
|
|
|
} |
|
|
@ -516,6 +543,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 复制 |
|
|
|
* 复制 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void copy() { |
|
|
|
public void copy() { |
|
|
|
this.delegate4ToolbarMenuAdapter().copy(); |
|
|
|
this.delegate4ToolbarMenuAdapter().copy(); |
|
|
|
} |
|
|
|
} |
|
|
@ -525,6 +553,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 剪切成功返回true |
|
|
|
* @return 剪切成功返回true |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean cut() { |
|
|
|
public boolean cut() { |
|
|
|
return this.delegate4ToolbarMenuAdapter().cut(); |
|
|
|
return this.delegate4ToolbarMenuAdapter().cut(); |
|
|
|
} |
|
|
|
} |
|
|
@ -534,6 +563,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 黏贴成功返回true |
|
|
|
* @return 黏贴成功返回true |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean paste() { |
|
|
|
public boolean paste() { |
|
|
|
return this.delegate4ToolbarMenuAdapter().paste(); |
|
|
|
return this.delegate4ToolbarMenuAdapter().paste(); |
|
|
|
} |
|
|
|
} |
|
|
@ -541,6 +571,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 停止编辑 |
|
|
|
* 停止编辑 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void stopEditing() { |
|
|
|
public void stopEditing() { |
|
|
|
reportComposite.stopEditing(); |
|
|
|
reportComposite.stopEditing(); |
|
|
|
if (!this.isSaved()) { |
|
|
|
if (!this.isSaved()) { |
|
|
@ -550,12 +581,23 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 后缀 |
|
|
|
* 保存文件的后缀名 |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 后缀的字符串 |
|
|
|
* @return 后缀的字符串 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public String suffix() { |
|
|
|
public String suffix() { |
|
|
|
return ".cpt"; |
|
|
|
return template.suffix(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void setPictureElem(Elem elem, CellImage cellImage) { |
|
|
|
|
|
|
|
WorkBook workBook = this.getTarget(); |
|
|
|
|
|
|
|
if (workBook instanceof WorkBookAdapter) { |
|
|
|
|
|
|
|
elem.setValue(new CellImagePainter(cellImage)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
elem.setValue(cellImage.getImage()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -568,6 +610,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 子菜单 |
|
|
|
* @return 子菜单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public ShortCut[] shortcut4FileMenu() { |
|
|
|
public ShortCut[] shortcut4FileMenu() { |
|
|
|
return (ShortCut[]) ArrayUtils.addAll( |
|
|
|
return (ShortCut[]) ArrayUtils.addAll( |
|
|
|
super.shortcut4FileMenu(), |
|
|
|
super.shortcut4FileMenu(), |
|
|
@ -580,12 +623,14 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 菜单 |
|
|
|
* @return 菜单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public MenuDef[] menus4Target() { |
|
|
|
public MenuDef[] menus4Target() { |
|
|
|
return (MenuDef[]) ArrayUtils.addAll( |
|
|
|
return (MenuDef[]) ArrayUtils.addAll( |
|
|
|
super.menus4Target(), this.delegate4ToolbarMenuAdapter().menus4Target() |
|
|
|
super.menus4Target(), this.delegate4ToolbarMenuAdapter().menus4Target() |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public int getMenuState() { |
|
|
|
public int getMenuState() { |
|
|
|
return this.delegate4ToolbarMenuAdapter().getMenuState(); |
|
|
|
return this.delegate4ToolbarMenuAdapter().getMenuState(); |
|
|
|
} |
|
|
|
} |
|
|
@ -610,6 +655,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 子菜单 |
|
|
|
* @return 子菜单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public ShortCut[] shortCuts4Authority() { |
|
|
|
public ShortCut[] shortCuts4Authority() { |
|
|
|
return new ShortCut[]{ |
|
|
|
return new ShortCut[]{ |
|
|
|
new NameSeparator(Inter.getLocText("FR-Designer_Permissions_Edition")), |
|
|
|
new NameSeparator(Inter.getLocText("FR-Designer_Permissions_Edition")), |
|
|
@ -623,6 +669,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 子菜单 |
|
|
|
* @return 子菜单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public ShortCut[] shortcut4TemplateMenu() { |
|
|
|
public ShortCut[] shortcut4TemplateMenu() { |
|
|
|
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{ |
|
|
|
return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{ |
|
|
|
new ReportWebAttrAction(this), |
|
|
|
new ReportWebAttrAction(this), |
|
|
@ -638,6 +685,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 工具 |
|
|
|
* @return 工具 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public ToolBarDef[] toolbars4Target() { |
|
|
|
public ToolBarDef[] toolbars4Target() { |
|
|
|
return this.delegate4ToolbarMenuAdapter().toolbars4Target(); |
|
|
|
return this.delegate4ToolbarMenuAdapter().toolbars4Target(); |
|
|
|
} |
|
|
|
} |
|
|
@ -699,6 +747,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 请求焦点 |
|
|
|
* 请求焦点 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void requestFocus() { |
|
|
|
public void requestFocus() { |
|
|
|
super.requestFocus(); |
|
|
|
super.requestFocus(); |
|
|
|
ReportComponent reportComponent = reportComposite.getEditingReportComponent(); |
|
|
|
ReportComponent reportComponent = reportComposite.getEditingReportComponent(); |
|
|
@ -745,6 +794,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 恢复 |
|
|
|
* 恢复 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void revert() { |
|
|
|
public void revert() { |
|
|
|
ElementCasePane epane = reportComposite.getEditingReportComponent().elementCasePane; |
|
|
|
ElementCasePane epane = reportComposite.getEditingReportComponent().elementCasePane; |
|
|
|
if (epane == null) { |
|
|
|
if (epane == null) { |
|
|
@ -773,6 +823,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 表单工具栏 |
|
|
|
* @return 表单工具栏 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public JPanel[] toolbarPanes4Form() { |
|
|
|
public JPanel[] toolbarPanes4Form() { |
|
|
|
if (centerPane.isUpEditMode() && hasParameterPane()) { |
|
|
|
if (centerPane.isUpEditMode() && hasParameterPane()) { |
|
|
|
return parameterPane.toolbarPanes4Form(); |
|
|
|
return parameterPane.toolbarPanes4Form(); |
|
|
@ -785,6 +836,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 工具按钮 |
|
|
|
* @return 工具按钮 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public JComponent[] toolBarButton4Form() { |
|
|
|
public JComponent[] toolBarButton4Form() { |
|
|
|
centerPane.needToShowCoverAndHidPane(); |
|
|
|
centerPane.needToShowCoverAndHidPane(); |
|
|
|
if (centerPane.isUpEditMode() && hasParameterPane()) { |
|
|
|
if (centerPane.isUpEditMode() && hasParameterPane()) { |
|
|
@ -799,6 +851,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 工具面板 |
|
|
|
* @return 工具面板 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public JComponent toolBar4Authority() { |
|
|
|
public JComponent toolBar4Authority() { |
|
|
|
return new AuthorityToolBarPane(); |
|
|
|
return new AuthorityToolBarPane(); |
|
|
|
} |
|
|
|
} |
|
|
@ -808,6 +861,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 预览接口 |
|
|
|
* @return 预览接口 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public PreviewProvider[] supportPreview() { |
|
|
|
public PreviewProvider[] supportPreview() { |
|
|
|
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); |
|
|
|
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); |
|
|
|
return ArrayUtils.addAll(new PreviewProvider[]{ |
|
|
|
return ArrayUtils.addAll(new PreviewProvider[]{ |
|
|
@ -820,6 +874,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 预览菜单项 |
|
|
|
* @return 预览菜单项 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public UIMenuItem[] createMenuItem4Preview() { |
|
|
|
public UIMenuItem[] createMenuItem4Preview() { |
|
|
|
List<UIMenuItem> menuItems = new ArrayList<UIMenuItem>(); |
|
|
|
List<UIMenuItem> menuItems = new ArrayList<UIMenuItem>(); |
|
|
|
PreviewProvider[] previewProviders = supportPreview(); |
|
|
|
PreviewProvider[] previewProviders = supportPreview(); |
|
|
@ -841,6 +896,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @param provider 预览接口 |
|
|
|
* @param provider 预览接口 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void previewMenuActionPerformed(PreviewProvider provider) { |
|
|
|
public void previewMenuActionPerformed(PreviewProvider provider) { |
|
|
|
setPreviewType(provider); |
|
|
|
setPreviewType(provider); |
|
|
|
WebPreviewUtils.actionPerformed(this, provider.parametersForPreview(), ParameterConstants.REPORTLET); |
|
|
|
WebPreviewUtils.actionPerformed(this, provider.parametersForPreview(), ParameterConstants.REPORTLET); |
|
|
@ -851,6 +907,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 是则返回true |
|
|
|
* @return 是则返回true |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isJWorkBook() { |
|
|
|
public boolean isJWorkBook() { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -865,6 +922,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
return ReportHyperlinkGroupPaneNoPop.getInstance(hyperlinkGroupPaneActionProvider); |
|
|
|
return ReportHyperlinkGroupPaneNoPop.getInstance(hyperlinkGroupPaneActionProvider); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void setAuthorityMode(boolean isUpMode) { |
|
|
|
public void setAuthorityMode(boolean isUpMode) { |
|
|
|
centerPane.setAuthorityMode(isUpMode); |
|
|
|
centerPane.setAuthorityMode(isUpMode); |
|
|
|
} |
|
|
|
} |
|
|
@ -874,6 +932,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 是则返回true |
|
|
|
* @return 是则返回true |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isUpMode() { |
|
|
|
public boolean isUpMode() { |
|
|
|
return centerPane.isUpEditMode(); |
|
|
|
return centerPane.isUpEditMode(); |
|
|
|
} |
|
|
|
} |
|
|
@ -881,6 +940,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 刷新参数和工具区域 |
|
|
|
* 刷新参数和工具区域 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void refreshToolArea() { |
|
|
|
public void refreshToolArea() { |
|
|
|
populateReportParameterAttr(); |
|
|
|
populateReportParameterAttr(); |
|
|
|
if (centerPane.isUpEditMode()) { |
|
|
|
if (centerPane.isUpEditMode()) { |
|
|
@ -933,6 +993,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public Parameter[] getParameters() { |
|
|
|
public Parameter[] getParameters() { |
|
|
|
Parameter[] ps = this.parameterPane.getParameterArray(); |
|
|
|
Parameter[] ps = this.parameterPane.getParameterArray(); |
|
|
|
Parameter[] curPs = this.parameterPane.getAllParameters(); |
|
|
|
Parameter[] curPs = this.parameterPane.getAllParameters(); |
|
|
@ -949,6 +1010,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 请求单元格区域的焦点 |
|
|
|
* 请求单元格区域的焦点 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void requestGridFocus() { |
|
|
|
public void requestGridFocus() { |
|
|
|
reportComposite.centerCardPane.requestGrifFocus(); |
|
|
|
reportComposite.centerCardPane.requestGrifFocus(); |
|
|
|
} |
|
|
|
} |
|
|
@ -960,6 +1022,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* @return 内置sql提交的pane |
|
|
|
* @return 内置sql提交的pane |
|
|
|
* @date 2014-10-14-下午7:39:27 |
|
|
|
* @date 2014-10-14-下午7:39:27 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public DBManipulationPane createDBManipulationPane() { |
|
|
|
public DBManipulationPane createDBManipulationPane() { |
|
|
|
ElementCasePane<TemplateElementCase> epane = this.getEditingElementCasePane(); |
|
|
|
ElementCasePane<TemplateElementCase> epane = this.getEditingElementCasePane(); |
|
|
|
return new SmartInsertDBManipulationPane(epane); |
|
|
|
return new SmartInsertDBManipulationPane(epane); |
|
|
@ -971,11 +1034,13 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* @return 内置sql提交的pane |
|
|
|
* @return 内置sql提交的pane |
|
|
|
* @date 2014-10-14-下午7:39:27 |
|
|
|
* @date 2014-10-14-下午7:39:27 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public DBManipulationPane createDBManipulationPaneInWidget() { |
|
|
|
public DBManipulationPane createDBManipulationPaneInWidget() { |
|
|
|
ElementCasePane<TemplateElementCase> epane = this.getEditingElementCasePane(); |
|
|
|
ElementCasePane<TemplateElementCase> epane = this.getEditingElementCasePane(); |
|
|
|
return new SmartInsertDBManipulationInWidgetEventPane(epane); |
|
|
|
return new SmartInsertDBManipulationInWidgetEventPane(epane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Icon getIcon() { |
|
|
|
public Icon getIcon() { |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/newcpts.png"); |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/newcpts.png"); |
|
|
|
} |
|
|
|
} |
|
|
@ -996,6 +1061,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 是否另存成功 |
|
|
|
* @return 是否另存成功 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean saveShareFile() { |
|
|
|
public boolean saveShareFile() { |
|
|
|
FILE newFile = createNewEmptyFile(); |
|
|
|
FILE newFile = createNewEmptyFile(); |
|
|
|
//如果文件已经打开, 那么就覆盖关闭掉他
|
|
|
|
//如果文件已经打开, 那么就覆盖关闭掉他
|
|
|
@ -1057,6 +1123,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 分享模板按钮 |
|
|
|
* @return 分享模板按钮 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public UIButton[] createShareButton() { |
|
|
|
public UIButton[] createShareButton() { |
|
|
|
return new UIButton[0]; |
|
|
|
return new UIButton[0]; |
|
|
|
//产品想要重新设计下, 1现在的分享多列数据集很麻烦, 2想做成自动上传附件.
|
|
|
|
//产品想要重新设计下, 1现在的分享多列数据集很麻烦, 2想做成自动上传附件.
|
|
|
|