|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.asset.AbstractAssetEngine
inetsoft.report.internal.StyleCore
inetsoft.report.ReportSheet
public abstract class ReportSheet
ReportSheet is the main class for report generation. Each report is represented as a ReportSheet object. Conceptually, a ReportSheet is a runtime report template that layout the formatting of a report. The actuall data in a concrete report can either be embedded in the report or be supplied with a lens object (e.g. TableLens, ChartLens...).
Creating a report involved a series of insertions of report elements into the report. During this process, a set of global report attributes can be set and consequently being adopted by the report elements inserted thereafter.
There are two types of properties in the ReportSheet. One is the regular property that affect all elements and settings. The other is the property that affect all elements added after the property is set. Any elements added before the call to set property are not affected by the new setting. The second group properties are always set by a method starts with 'setCurrent'.
There are two types of reports: StyleSheet and TabularSheet. ReportSheet defines the common API between this two types of reports. StyleSheet provides a purely flow based layout model. TabularSheet provides a grid based layout model. A report is divided into a tabular grid, and layout is done per grid cell.
Please refer to the Style Report Programming Guide for more details on the concepts and features of the ReportSheet.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class inetsoft.report.internal.StyleCore |
|---|
inetsoft.report.internal.StyleCore.ActionScriptable |
| Nested classes/interfaces inherited from class inetsoft.uql.asset.AbstractAssetEngine |
|---|
AbstractAssetEngine.ReportSheetDependencyFinder, AbstractAssetEngine.SheetTransformListener, AbstractAssetEngine.StorageChangeListener |
| Field Summary | |
|---|---|
static int |
BODY
Flag to indicate the main report body section. |
static int |
DEFAULT_FOOTER
Flag to indicate the default page footer. |
static int |
DEFAULT_HEADER
Flag to indicate the default page header. |
static int |
DOWN
Flag to indicate element moving down direction. |
static int |
EVEN_PAGE_FOOTER
Flag to indicate the even page footer. |
static int |
EVEN_PAGE_HEADER
Flag to indicate the even page header. |
static int |
FIRST_PAGE_FOOTER
Flag to indicate the first page footer. |
static int |
FIRST_PAGE_HEADER
Flag to indicate the first page header. |
static int |
ODD_PAGE_FOOTER
Flag to indicate the odd page footer. |
static int |
ODD_PAGE_HEADER
Flag to indicate the odd page header. |
static int |
PAINTER_BREAKABLE
Painter layout policy. |
static int |
PAINTER_NON_BREAK
Painter layout policy. |
static int |
TABLE_EQUAL_WIDTH
Table layout policy. |
static int |
TABLE_FIT_CONTENT
Table layout policy. |
static int |
TABLE_FIT_CONTENT_1PP
Table layout policy. |
static int |
TABLE_FIT_CONTENT_PAGE
Table layout policy. |
static int |
TABLE_FIT_PAGE
Table layout policy. |
static int |
UP
Flag to indictate element moving up direction. |
static int |
WRAP_BOTH
Wrapping at both left and right. |
static int |
WRAP_LEFT
Wrapping at the left of the element. |
static int |
WRAP_NONE
No wrapping. |
static int |
WRAP_RIGHT
Wrapping at the right of the element. |
static int |
WRAP_TOP_BOTTOM
ReportElement occupies whole row. |
| Fields inherited from class inetsoft.report.internal.StyleCore |
|---|
advanceLine, alignment, anchor, autosize, background, bg, bgimage, bglayout, bgsize, burstInfo, chartinfo, cmargin, COMPLETED, contexts, current, currFooter, currFrame, currHeader, DESIGN_MODE, elemFooter, elemHeader, evenFooter, evenHeader, firstFooter, firstHeader, font, footerElements, footerFromEdge, foreground, formatmap, frames, g_pmargin, header, headerElements, headerFromEdge, headingCnt, headingMap, hfFmt, hindent, horFlow, idmap, indent, initCalled, initCmd, initScript, justify, lastHead, lineH, LIVE_MODE, loadCmd, loadScript, locale, margin, MORE_ELEM, MORE_FLOW, nextOrient, npframes, nplayout, numHeadingMap, oddFooter, oddHeader, orphan, overrideFooter, overrideFooterContinue, overrideHeader, overrideHeaderContinue, padding, pageBox, pagebreakCmd, pagebreakScript, painterLayout, painterMargin, parameters, parentElem, pglayout, pgStart, pgTotal, pmargin, presentermap, printBox, printCmd, printHead, printMode, printScript, prop, psheet, queries, reportmode, rewinded, RUN_MODE, runningScript, runningTotals, scriptenv, secHeadingMap, secNumHeadingMap, sepadv, spacing, tableadv, tableorphan, tableW, tabStops, textadv, wrapping |
| Fields inherited from class inetsoft.uql.asset.AbstractAssetEngine |
|---|
admin, catalog, editing, istore, LOCAL, parent, scopes |
| Fields inherited from interface inetsoft.uql.XQueryRepository |
|---|
GLOBAL_SCOPE, LOCAL_QUERY, LOCAL_SCOPE, NORMAL_QUERY |
| Fields inherited from interface inetsoft.report.internal.ParameterSheetRepository |
|---|
EMBED_PARAMETER_SHEET, EMBED_SECTION |
| Fields inherited from interface inetsoft.uql.asset.AssetRepository |
|---|
ASSET_ERRORS, COMPONENT_SCOPE, GLOBAL_SCOPE, IGNORE_PERM, LOCAL_QUERY, QUERY_SCOPE, REPORT_SCOPE, REPORT_WORKSHEET, REPOSITORY_SCOPE, TEMPORARY_SCOPE, USER_SCOPE |
| Constructor Summary | |
|---|---|
ReportSheet()
|
|
| Method Summary | |
|---|---|
void |
addExecuteListener(ExecuteListener listener)
Add an execute listener. |
String |
addFooterBreak()
Add a break to the document footer. |
String |
addFooterElement(ReportElement e)
Add an element to the document footer. |
String |
addFooterImage(Image image)
Add an image to the document footer. |
String |
addFooterImage(Image image,
double winch,
double hinch)
This is same as addFooterImage() exception an explicit size of the painter area is specified. |
String |
addFooterImage(URL image)
Add an image to the document footer. |
String |
addFooterNewline(int n)
Add one or more newline to the document footer. |
String |
addFooterObject(Object obj)
Add an object to the document footer. |
String |
addFooterPainter(Painter area)
Add a pinter element to the document footer. |
String |
addFooterPainter(Painter area,
double winch,
double hinch)
This is same as addFooterPainter() exception an explicit size of the painter area is specified. |
String |
addFooterRightTab()
Add a right aligned tab. |
String |
addFooterSection(SectionLens section)
Add a section element to the document footer. |
String |
addFooterSection(SectionLens section,
TableLens table)
Add a section element to the document footer. |
String |
addFooterSeparator(int style)
Add a separator to footer. |
String |
addFooterSpace(int pixels)
Add horizontal space to the document footer. |
String |
addFooterTab(int fill)
Add a tab. |
String |
addFooterTable(TableLens table)
Add a table to the document footer. |
String |
addFooterText(String text)
Add a text string to the document footer. |
String |
addFooterText(TextLens text)
Add a text element to the document footer. |
String |
addFooterTextBox(TextLens text)
Add a text box to the document footer. |
String |
addFooterTextBox(TextLens text,
int border,
double winch,
double hinch,
int talign)
Add a text box to the document footer. |
void |
addFormat(Class type,
Format p)
Register a format for the specified class. |
void |
addFormat(String id,
Class type,
Format format)
Add a format to a table element. |
void |
addFormula(inetsoft.report.internal.binding.FormulaInfo info)
Add a formula from the repository. |
String |
addHeaderBreak()
Add a break to the document header. |
String |
addHeaderElement(ReportElement e)
Add an element to the document header. |
String |
addHeaderImage(Image image)
Add an image to the document header. |
String |
addHeaderImage(Image image,
double winch,
double hinch)
This is same as addHeaderImage() exception an explicit size of the painter area is specified. |
String |
addHeaderImage(URL image)
Add an image to the document header. |
String |
addHeaderNewline(int n)
Add one or more newline to the document header. |
String |
addHeaderObject(Object obj)
Add an object to the document header. |
String |
addHeaderPainter(Painter area)
Add a pinter element to the document header. |
String |
addHeaderPainter(Painter area,
double winch,
double hinch)
This is same as addHeaderPainter() exception an explicit size of the painter area is specified. |
String |
addHeaderRightTab()
Add a right aligned tab. |
String |
addHeaderSection(SectionLens section)
Add a section element to the document header. |
String |
addHeaderSection(SectionLens section,
TableLens table)
Add a section element to the document header. |
String |
addHeaderSeparator(int style)
Add a separator to header. |
String |
addHeaderSpace(int pixels)
Add horizontal space to the document header. |
String |
addHeaderTab(int fill)
Add a tab. |
String |
addHeaderTable(TableLens table)
Add a table to the document header. |
String |
addHeaderText(String text)
Add a text string to the document header. |
String |
addHeaderText(TextLens text)
Add a text element to the document header. |
String |
addHeaderTextBox(TextLens text)
Add a text box to the document header. |
String |
addHeaderTextBox(TextLens text,
int border,
double winch,
double hinch,
int talign)
Add a text box to the document header. |
void |
addPageBreakListener(PageBreakListener l)
Add a pagebreak listener. |
void |
addParameter(int index,
UserVariable param)
Add a new parameter to the report. |
void |
addParameter(UserVariable param)
Add a new parameter to the report. |
void |
addPresenter(Class type,
Presenter p)
Register a presenter for the specified class. |
void |
addPresenter(String id,
Class type,
Presenter presenter)
Add a presenter to a table element. |
void |
addRefreshListener(ActionListener listener)
Add the refresh listener for local query. |
void |
addRunningTotal(RunningTotal total)
Add a new running total to the report. |
void |
clear()
Remove all report elements. |
void |
clearFormat()
Clear the format registry. |
void |
clearPresenter()
Clear the presenter registry. |
Object |
clone()
Make a copy of this report. |
Object |
clone(boolean deep)
Make a copy of this report. |
boolean |
containsFormula(inetsoft.report.internal.binding.FormulaInfo info)
Check if an attribute or expression is already defined in the selection. |
void |
copyFormulas(ReportSheet report)
Copy formulas. |
protected void |
copyReportSheet(ReportSheet report,
boolean flag)
Copy report sheet to report |
protected void |
copyReportSheet(ReportSheet report,
boolean flag,
boolean deep)
Copy report sheet to report |
void |
exportQueries(boolean overwrite)
Export the queries. |
void |
fireExecuteEvent(ExecuteEvent event)
Fire an execute event. |
void |
firePageBreakEvent(StylePage pg,
boolean more)
Fire a pagebreak event. |
int |
getAllFooterElementCount()
Return the number of the elements in the document footer, include the elements in a section which in the document footer. |
int |
getAllHeaderElementCount()
Return the number of the elements in the document header, include the elements in a section which in the document header. |
Object |
getBackground()
Get the report background. |
int |
getBackgroundLayout()
Get the background layout of the page. |
Dimension |
getBackgroundSize()
Get the background image size. |
String |
getContextName()
Get the context name. |
String |
getCSSLocation()
Get the location of the css style sheet used by this report. |
int |
getCurrentAlignment()
Get the current setting of the alignment. |
Color |
getCurrentBackground()
Get the current document background color. |
Insets |
getCurrentCellPadding()
Get the current table cell padding. |
Font |
getCurrentFont()
Get the current font setting. |
Color |
getCurrentForeground()
Get the current document foreground color. |
double |
getCurrentIndent()
Get the current indentation in inches. |
short |
getCurrentLineId()
Get the current line id. |
int |
getCurrentLineSpacing()
Get the current line spacing setting. |
Margin |
getCurrentMargin()
Get the margin of the current page in inches. |
int |
getCurrentPainterLayout()
Get the current painter layout policy. |
Insets |
getCurrentPainterMargin()
Get the fixed size element external space. |
int |
getCurrentSeparatorAdvance()
Get the separator vertical trailing advance. |
int |
getCurrentTableAdvance()
Get the advance of table elements. |
int |
getCurrentTableLayout()
Get the current table layout mode. |
double |
getCurrentTableWidth()
Get the current table width setting. |
double[] |
getCurrentTabStops()
Return the current tab stop setting. |
int |
getCurrentTextAdvance()
Get the advance of text elements. |
int |
getCurrentWrapping()
Get the current wrapping style. |
DataSet |
getDataSet(String id)
Get the chart of the specified chart element. |
String |
getDirectory()
Get the current directory of this report. |
ReportElement |
getElement(String id)
Find the index of the specified element. |
Vector |
getElements(int type)
Get the elements of the specified type. |
Enumeration |
getExecuteListeners()
Get all registered execute listeners. |
List |
getExportInfo()
Get the export query info. |
Rectangle |
getFooterBounds(Dimension pgsize)
Get the page footer bounds. |
ReportElement |
getFooterElement(int idx)
Get the specified element in the footer. |
int |
getFooterElementCount()
Return the number of elements in the document footer. |
int |
getFooterElementIndex(ReportElement e)
Get the index of the specified element. |
double |
getFooterFromEdge()
Get the page footer position from the bottom of the page. |
FormLens |
getForm(String id)
Get the form lens of the specified form element. |
Format |
getFormat(Class type)
Get the format object registered for this class or one of it's super classes. |
inetsoft.report.internal.binding.FormulaInfo |
getFormula(String source,
String fname)
Get a formula matches a formula name. |
inetsoft.report.internal.binding.FormulaInfo[] |
getFormulas()
Get all the formulas. |
inetsoft.report.internal.binding.FormulaInfo[] |
getFormulas(String source,
int stype)
Get formula infos according the source. |
Rectangle |
getHeaderBounds(Dimension pgsize)
Get the page header bounds. |
ReportElement |
getHeaderElement(int idx)
Get the specified element in the header. |
int |
getHeaderElementCount()
Return the number of elements in the document header. |
int |
getHeaderElementIndex(ReportElement e)
Get the index of the specified element. |
double |
getHeaderFromEdge()
Get the page header position from the top of the page. |
List |
getImportInfo()
Get the import query info. |
Locale |
getLocale()
Get the locale used in this report. |
Margin |
getMargin()
Get the page margin in inches. |
int |
getMaxPages()
Get the max pages. |
int |
getMaxPages(boolean isUsedGlobal)
Get the max pages. |
String |
getMetaTemplate()
Get the meta template name. |
Integer |
getNextOrientation()
Get the page orientation for the next page. |
String |
getOnInit()
Get the report initialization Javascript handler. |
String |
getOnLoad()
Get the report creation Javascript handler. |
String |
getOnPageBreak()
Get the page break Javascript handler. |
String |
getOnPrint()
Get the onPrint script handler. |
int |
getOrientation()
Get the orientation of current report. |
int |
getPageNumberingStart()
Get the page numbering start index. |
Size |
getPageSize()
Get the page size of current report. |
UserVariable |
getParameter(int idx)
Get a report parameter definition. |
int |
getParameterCount()
Get the number of parameters defined in this report. |
Vector |
getParameters()
Get the report parmaters. |
inetsoft.report.parameter.ParameterSheetFlow |
getParameterSheetFlow()
Get parameter sheet flow which contains parameter sheet information and parameter sheet link information. |
String[] |
getParameterSheets()
Deprecated. use getParameterSheetFlow instead. |
ReportSheet |
getParentReport()
Get parent report. |
Presenter |
getPresenter(Class type)
Get the presenter object registered for this class or one of it's super classes. |
static Margin |
getPrinterMargin()
Get the current printer margin. |
String |
getProperty(String name)
Get a property value. |
Enumeration |
getQueries()
Get all the queries. |
XQuery |
getQuery(String qname)
Get an embedded query definition. |
Enumeration |
getQueryNames()
Get the names of embedded queries. |
int |
getQueryType()
Get query type in the query repository. |
RunningTotal |
getRunningTotal(int idx)
Get a report running total definition. |
int |
getRunningTotalCount()
Get the number of running totals defined in this report. |
SharedFilter |
getSharedFilter()
Gets the shared filter mappings defined for this report. |
TableLens |
getTable(String id)
Get the table lens object for the specified table. |
inetsoft.report.style.TableStyle |
getTableStyle(String id)
Get the table style object for the specified table. |
String |
getText(String id)
Get the text contents of a text or text box element. |
String |
getVersion()
Get the Style Report version. |
void |
importQueries(boolean overwrite)
Import the queries. |
void |
insertFooterElement(int idx,
ReportElement e)
Insert the element at specified position (before). |
void |
insertHeaderElement(int idx,
ReportElement e)
Insert the element at specified position (before). |
boolean |
isCurrentJustify()
Check if text is justified. |
boolean |
isCurrentOrphanControl()
Check the current widow/orphan control setting. |
boolean |
isCurrentTableOrphanControl()
Check the current widow/orphan control setting. |
boolean |
isExportSinglePage()
Check the top report is export in single page or not. |
boolean |
isFromMetaTemplate()
Check if the report is created from a meta template. |
boolean |
isHorizontalWrap()
Check the horizontal flow option. |
boolean |
isLandscape()
Check if the page of this report is set to landscape. |
boolean |
isParameterPrompting()
Get parameter prompting option. |
boolean |
isSinglePageForTopReport()
Check the top report is single page report or not. |
boolean |
isVisible()
Check if the local query repository is visible. |
void |
keepWithNext(StylePage pg,
int ocurrent,
Vector elements)
Handle keep with next. |
void |
mergeInto(String id,
TableLens table)
Merge a table into an existing table element. |
void |
moveAnchor(Position anchor)
Move the anchor to the new position. |
abstract void |
moveElement(String id,
int direction)
Move element up or down. |
protected void |
moveHeaderFooterElement(ReportElement elem,
int direction)
Move header or footer element up or down. |
void |
print()
Print this report with the PrintJob. |
void |
print(PrintJob job)
Print this document to the printer. |
protected void |
printHeaderFooter(StylePage pg)
Print the header and footer of the page. |
abstract boolean |
printNext(StylePage pg)
Print one page. |
boolean |
printNextArea(StylePage pg,
Vector elements,
boolean flow)
Print the next page area. |
protected boolean |
printNextLine(StylePage pg,
Vector elements,
boolean flow)
Print the next line or next block element. |
abstract boolean |
printNextPage(StylePage pg)
Print the next page. |
protected void |
printNonFlowAreas(StylePage pg,
PageArea[] areas,
boolean first)
Print the content of non-flow areas and area borders. |
void |
refreshFormats()
Refresh all formats. |
void |
removeAllParameters()
Removes all the parameters from the report parameter list. |
protected abstract void |
removeContents()
Remove all elements from the contents area. |
void |
removeContext(String name)
Removed the named context from the repository. |
abstract void |
removeElement(String id)
Remove the specified element. |
protected void |
removeElementHeaderFooter(String id)
Remove specified element from element header/footer list. |
void |
removeExecuteListener(ExecuteListener listener)
Remove an execute listener. |
void |
removeExecuteListeners()
Remove all the execute listeners. |
void |
removeFooterElement(int idx)
Remove the specified element. |
void |
removeFormat(Class type)
Remove the specified format from the registry. |
void |
removeFormula(inetsoft.report.internal.binding.FormulaInfo info)
Remove a formula from the repository. |
void |
removeHeaderElement(int idx)
Remove the specified element. |
protected void |
removeHeaderFooterElement(ReportElement elem)
Remove the specified header or footer element. |
void |
removePageBreakListener(PageBreakListener l)
Remove a pagebreak listener. |
void |
removeParameter(int idx)
Remove a parameter from the report parameter list. |
void |
removePresenter(Class type)
Remove the specified presenter from the registry. |
void |
removeQuery(String qname)
Remove the named embedded query. |
void |
removeRunningTotal(int idx)
Remove a running total from the report running total list. |
protected abstract void |
replaceElement(String id,
ReportElement elem)
replace a element. |
void |
replaceFooterElement(int idx,
ReportElement e)
Replace the specified element. |
void |
replaceFormulaInfo(inetsoft.report.internal.binding.FormulaInfo ninfo,
inetsoft.report.internal.binding.FormulaInfo oinfo)
Replace formula info. |
void |
replaceHeaderElement(int idx,
ReportElement e)
Replace the specified element. |
protected void |
replaceHeaderFooterElement(ReportElement elem,
ReportElement nelem)
Replace the specified header or footer element. |
void |
reset()
Reset the printing. |
protected abstract void |
resetContents()
Reset all elemnts in the contents. |
void |
resetPageNumbering()
Reset the page numbering so the numbering and count starts from beginning. |
void |
saveContext(String name)
Save the current report context in the context repository. |
void |
selectContext(String name)
Retrieve the context values from the named context and set the values in the report. |
void |
setBackground(Object bg)
Set the background of this report. |
void |
setBackgroundLayout(int layout)
Set the background layout of the page. |
void |
setBackgroundSize(Dimension d)
Set the background image size. |
void |
setBackgroundSize(int width,
int height)
Set the background size of the page. |
void |
setContextName(String name)
Set the context name. |
void |
setCSSLocation(String cssLoc)
Set the location of a css style sheet to be applied to the report. |
void |
setCurrentAlignment(int align)
Set the current alignment of the report elements. |
void |
setCurrentBackground(Color bg)
Set the current document background color. |
void |
setCurrentCellPadding(Insets padding)
Set the cell padding space around the cell contents. |
void |
setCurrentFont(Font font)
Set the current font of the document. |
void |
setCurrentFooter(int hflag)
Set the currently worked on footer. |
void |
setCurrentFooter(String eid)
Set the currently worked on footer. |
void |
setCurrentForeground(Color fg)
Set the current document foreground color. |
void |
setCurrentHeader(int hflag)
Set the currently worked on header. |
void |
setCurrentHeader(String eid)
Set the currently worked on header. |
void |
setCurrentIndent(double inch)
Set the current indentation level. |
void |
setCurrentJustify(boolean justify)
If justify is set to true, text lines are fully justified. |
void |
setCurrentLineId(short id)
Set the current line id. |
void |
setCurrentLineSpacing(int spacing)
Set the current line spacing in pixels. |
void |
setCurrentOrphanControl(boolean orphan)
Set the widow/orphan line control option. |
void |
setCurrentPainterLayout(int policy)
Set the layout policy for painter. |
void |
setCurrentPainterMargin(Insets margin)
Set the space around the painter elements. |
void |
setCurrentSeparatorAdvance(int adv)
Set the amount to advance below a separator element. |
void |
setCurrentTableAdvance(int tableadv)
Set the amount to advance following each table element. |
void |
setCurrentTableLayout(int autosize)
Set the current table layout mode. |
void |
setCurrentTableOrphanControl(boolean orphan)
Set the table widow/orphan control option. |
void |
setCurrentTableWidth(double inch)
Set the width of the table in inches. |
void |
setCurrentTabStops(double[] pos)
Set the tab stops. |
void |
setCurrentTextAdvance(int textadv)
Set the amount to advance following each text element. |
void |
setCurrentWrapping(int wrapping)
Set the current wrapping style. |
void |
setDirectory(String dir)
Set the directory where this template is saved. |
void |
setElement(String id,
Object data)
This method can be used the set the data source/content of elements already in the report. |
void |
setFooterFromEdge(double inch)
Set the page footer position from the bottom of the page. |
void |
setFormulaInfos(ArrayList infos)
Set formula infos. |
void |
setHeaderFromEdge(double inch)
Set the page header position from the top of the page. |
void |
setHorizontalWrap(boolean hor)
Set the flow direction to horizontal. |
void |
setLocale(Locale locale)
Set the locale used in this report. |
void |
setMargin(Margin margin)
Set the page margin. |
void |
setMaxPages(int pages)
Set the max pages. |
void |
setMetaTemplate(String meta)
Set the meta template name. |
void |
setOnInit(String cmd)
Set the initialization Javascript handler. |
void |
setOnLoad(String cmd)
Set the creation Javascript handler. |
void |
setOnPageBreak(String cmd)
Set the page break Javascript handler. |
void |
setOnPrint(String cmd)
Set the onPrint script handler. |
void |
setOrientation(int orient)
Set the orientation of the report page. |
void |
setPageNumberingStart(int idx)
Set the page index where the page numbering starts. |
void |
setPageSize(Size size)
Set the report page size. |
void |
setParameterPrompting(boolean prompting)
Set parameter prompting option. |
void |
setParameterSheet(ParameterSheet paraSheet)
Set the embeded paramter sheet. |
void |
setParameterSheetFlow(inetsoft.report.parameter.ParameterSheetFlow pflow)
Set parameter sheet flow which contains parameter sheet information and parameter sheet link information. |
void |
setParameterSheets(String[] sheets)
Deprecated. use setParameterSheetFlow instead. |
void |
setParentReport(ReportSheet preport)
Set parent report. |
static void |
setPrinterMargin(Margin pmargin)
This method is provided to work around the jdk 1.1 win32 bug. |
void |
setProperty(String name,
String val)
Set a property. |
void |
setQuery(String qname,
XQuery query)
Add or remove an embedded query to the report. |
void |
setSharedFilter(SharedFilter sharedFilter)
Sets the shared filter mappings defined for this report. |
void |
setTableStyle(String id,
inetsoft.report.style.TableStyle style)
Set the table style object for the specified table. |
void |
setVersion(String version)
Set the Style Report version. |
void |
setVisible(String id,
boolean vis)
Set the visibility of an element. |
void |
syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo,
inetsoft.uql.util.XSourceInfo ninfo)
Synchronize the source info. |
void |
syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo,
inetsoft.uql.util.XSourceInfo ninfo,
boolean syncSource)
Synchronize the source info. |
void |
updateQuery(XQuery dx,
String oname)
Add or replace a query in the repository. |
| Methods inherited from class inetsoft.report.internal.StyleCore |
|---|
addChangeListener, addr, addScriptObject, advance, alignLine, append, append, calcGrid, checkDataSourceFolderPermission, checkDataSourcePermission, checkQueryFolderPermission, checkQueryPermission, cloneElements, cloneElements, complete, completeElement, copyQueries, copyStyleCore, createFinder, createFormatMap, createPresenterMap, deleteScriptEnv, fireEvent, format, format, getActionScriptable, getAllElements, getAllFooterElements, getAllHeaderElements, getBackgroundImageLocation, getBuildNumber, getBurstInfo, getCompositeElement, getDefaultFooter, getDefaultHeader, getDependencyFile, getDependencyFileName, getElementFooters, getElementHeaders, getElementWidth, getElemInfoBoundsMap, getElemInfoMap, getFinder, getFormat, getFormats, getFrames, getHeadingNumberArray, getHFTextFormatter, getLocalQueryRepository, getNextHeadingNumberArray, getNextID, getNumHeadingMap, getOnLoadResult, getOutputType, getPageTotalStart, getPagingLock, getParameterSheet, getParentScope, getPresenter, getProperties, getQueryManager, getReportManager, getReportMode, getScriptEnv, getScriptObject, getSecNumHeadingMap, getSheet, getTextSize, getTopReport, getVariableTable, hasOnPrint, isDesignTime, isLimited, isPrintMode, isReusePages, isRunTime, isSubreport, parseAssetRepository, printFixedContainer, printFixedContainer, processHF, processHF, putElemWarnings, removeChangeListener, renameQuery, renameQuery, resetCache, resetHeadingNumberArray, resetOnLoad, resetScriptEnv, restoreHeadingNumberArray, runOnInit, runOnLoad, runOnPrint, setBackgroundImageLocation, setBurstInfo, setDesignTime, setElemInfoBoundsMap, setFooterContinue, setHeaderContinue, setHeadingNumberArray, setHFTextFormatter, setHindent, setOverrideFooter, setOverrideHeader, setPageTotalStart, setParentScope, setPrintMode, setReportMode, setReportMode, setReusePages, setScriptEnv, setSubreport, setValue, setVariableTable, skip, toString, updateParameterSheet, writeAssetRepository |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TABLE_FIT_CONTENT
public static final int TABLE_FIT_PAGE
public static final int TABLE_EQUAL_WIDTH
public static final int TABLE_FIT_CONTENT_1PP
public static final int TABLE_FIT_CONTENT_PAGE
public static final int PAINTER_NON_BREAK
public static final int PAINTER_BREAKABLE
public static final int DEFAULT_HEADER
public static final int FIRST_PAGE_HEADER
public static final int EVEN_PAGE_HEADER
public static final int ODD_PAGE_HEADER
public static final int DEFAULT_FOOTER
public static final int FIRST_PAGE_FOOTER
public static final int EVEN_PAGE_FOOTER
public static final int ODD_PAGE_FOOTER
public static final int BODY
public static final int WRAP_NONE
public static final int WRAP_LEFT
public static final int WRAP_RIGHT
public static final int WRAP_BOTH
public static final int WRAP_TOP_BOTTOM
public static final int UP
public static final int DOWN
| Constructor Detail |
|---|
public ReportSheet()
| Method Detail |
|---|
public Locale getLocale()
public void setLocale(Locale locale)
public int getBackgroundLayout()
public void setBackgroundLayout(int layout)
StyleConstants
StyleConstants.BACKGROUND_TILED or
StyleConstants.BACKGROUND_CENTER
layout - background layout.public Dimension getBackgroundSize()
public void setBackgroundSize(Dimension d)
d - background imae size.
public void setBackgroundSize(int width,
int height)
width - background width.height - background height.public int getParameterCount()
public Vector getParameters()
public UserVariable getParameter(int idx)
idx - parameter index.
public void addParameter(UserVariable param)
public void addParameter(int index,
UserVariable param)
public void removeAllParameters()
public void removeParameter(int idx)
public void setParameterPrompting(boolean prompting)
prompting - true if use parameter prompting dialog to gather
parameters, false if use parameter sheet to gather parameters.public boolean isParameterPrompting()
public void setParameterSheetFlow(inetsoft.report.parameter.ParameterSheetFlow pflow)
pflow - the specified parameter sheet flow.public inetsoft.report.parameter.ParameterSheetFlow getParameterSheetFlow()
public void setParameterSheets(String[] sheets)
public String[] getParameterSheets()
public void addRefreshListener(ActionListener listener)
addRefreshListener in interface XLocalQueryRepositorypublic boolean isVisible()
isVisible in interface XLocalQueryRepositorypublic void exportQueries(boolean overwrite)
exportQueries in interface XLocalQueryRepositorypublic void importQueries(boolean overwrite)
importQueries in interface XLocalQueryRepositorypublic List getExportInfo()
getExportInfo in interface XLocalQueryRepositorypublic List getImportInfo()
getImportInfo in interface XLocalQueryRepository
public void syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo,
inetsoft.uql.util.XSourceInfo ninfo)
syncSourceInfo in interface XLocalQueryRepository
public void syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo,
inetsoft.uql.util.XSourceInfo ninfo,
boolean syncSource)
public int getQueryType()
getQueryType in interface XQueryRepositorypublic Enumeration getQueryNames()
public XQuery getQuery(String qname)
getQuery in interface XQueryRepositoryqname - the specified query name.
public Enumeration getQueries()
getQueries in interface XQueryRepository
public void setQuery(String qname,
XQuery query)
public void updateQuery(XQuery dx,
String oname)
throws Exception
updateQuery in interface XQueryRepositorydx - new query.oname - old name of the query, if the name has been changed.
Otherwise it should be null.
Exceptionpublic void removeQuery(String qname)
removeQuery in interface XQueryRepositorypublic void removeFormula(inetsoft.report.internal.binding.FormulaInfo info)
removeFormula in interface XFormulaRepositorypublic void addFormula(inetsoft.report.internal.binding.FormulaInfo info)
addFormula in interface XFormulaRepository
public void replaceFormulaInfo(inetsoft.report.internal.binding.FormulaInfo ninfo,
inetsoft.report.internal.binding.FormulaInfo oinfo)
ninfo - the new FormulaInfo.oinfo - the old FormulaInfo.public void setFormulaInfos(ArrayList infos)
public inetsoft.report.internal.binding.FormulaInfo[] getFormulas()
getFormulas in interface XFormulaRepository
public inetsoft.report.internal.binding.FormulaInfo getFormula(String source,
String fname)
getFormula in interface XFormulaRepositoryfname - the specified formula name.
public inetsoft.report.internal.binding.FormulaInfo[] getFormulas(String source,
int stype)
getFormulas in interface XFormulaRepositorypublic void copyFormulas(ReportSheet report)
report - the specified report to copy formulas from.public boolean containsFormula(inetsoft.report.internal.binding.FormulaInfo info)
containsFormula in interface XFormulaRepositorypublic int getRunningTotalCount()
public RunningTotal getRunningTotal(int idx)
idx - running total index.
public void addRunningTotal(RunningTotal total)
public void removeRunningTotal(int idx)
public void setMargin(Margin margin)
margin - page margin.public Margin getMargin()
public Object getBackground()
public void setBackground(Object bg)
bg - report background.public void setHeaderFromEdge(double inch)
inch - header position.public double getHeaderFromEdge()
public void setFooterFromEdge(double inch)
inch - footer position.public double getFooterFromEdge()
public Rectangle getHeaderBounds(Dimension pgsize)
pgsize - page size in pixels.
public Rectangle getFooterBounds(Dimension pgsize)
pgsize - page size in pixels.
public Margin getCurrentMargin()
public void setPageNumberingStart(int idx)
idx - the page index where the page numbering starts. The
page would be page one.public int getPageNumberingStart()
public void setHorizontalWrap(boolean hor)
public boolean isHorizontalWrap()
public void saveContext(String name)
name - context name.public void selectContext(String name)
name - context name.public void removeContext(String name)
name - context name.public void setCurrentAlignment(int align)
align - alignment flag, a bitwise OR of the H_LEFT, H_CENTER,
H_RIGHT, and V_TOP, V_CENTER, V_BOTTOM.public int getCurrentAlignment()
public short getCurrentLineId()
public void setCurrentLineId(short id)
public void setCurrentIndent(double inch)
inch - indentation size.public double getCurrentIndent()
public void setCurrentTabStops(double[] pos)
pos - tab stops in inches.public double[] getCurrentTabStops()
public void setCurrentWrapping(int wrapping)
wrapping - one of the WRAP_NONE, WRAP_LEFT, WRAP_RIGHT,
WRAP_BOTH, and WRAP_TOP_BOTTOM.public int getCurrentWrapping()
public void moveAnchor(Position anchor)
anchor - anchor position.public void setCurrentLineSpacing(int spacing)
spacing - line spacing.public int getCurrentLineSpacing()
public void setCurrentFont(Font font)
font - current document font.public Font getCurrentFont()
public void setCurrentForeground(Color fg)
fg - foreground color.public Color getCurrentForeground()
public void setCurrentBackground(Color bg)
bg - background color.public Color getCurrentBackground()
public void setCurrentTableLayout(int autosize)
If the layout is set to TABLE_FIT_PAGE, the width of the table is set to the width of the page, or to the table width explicitly set by the user. The space is distributed to the columns proportional to the preferred width of the columns. The preferred width of a column is returned by the TableLens, or if it's -1, calculated by the ReportSheet based on the contents in the column cells.
If the layout is set to TABLE_EQUAL_WIDTH, the width of the table is set to the width of the page, or to the table width explicitly set by the user. All columns are set to equal width.
If the layout is set to TABLE_FIT_CONTENT, the widht of the columns are determined by the TableLens.getColWidth() return value, or if it's -1, calculated by the ReportSheet based on the contents in the column cells. If a row is wider than the page width, the rows are wrapped. When rows are wrapped, the header columns (determined by TableLens' getHeaderColCount() function) are always drawn at each table segment. When table is wrapped, the ReportSheet tries to fit as many table regions on a page as possible. It can be forced to print one table region per page by using TABLE_FIT_CONTENT_1PP as the table layout.
autosize - layout mode.public int getCurrentTableLayout()
public void setCurrentPainterLayout(int policy)
policy - painter layout policy.public int getCurrentPainterLayout()
public void setCurrentPainterMargin(Insets margin)
margin - painter external space.public Insets getCurrentPainterMargin()
public void setCurrentCellPadding(Insets padding)
padding - cell padding space.public Insets getCurrentCellPadding()
public void setCurrentTableWidth(double inch)
inch - table width.public double getCurrentTableWidth()
public void setCurrentJustify(boolean justify)
justify - text justification.public boolean isCurrentJustify()
public void setCurrentTextAdvance(int textadv)
textadv - text element advance pixels.public int getCurrentTextAdvance()
public void setCurrentSeparatorAdvance(int adv)
adv - advance in pixels.public int getCurrentSeparatorAdvance()
public void setCurrentTableAdvance(int tableadv)
tableadv - table element advance pixels.public int getCurrentTableAdvance()
public void setCurrentTableOrphanControl(boolean orphan)
orphan - true to eliminate widow/orphan rows.public boolean isCurrentTableOrphanControl()
public void setCurrentOrphanControl(boolean orphan)
orphan - true to eliminate widow/orphan lines.public boolean isCurrentOrphanControl()
public void addPresenter(Class type,
Presenter p)
type - type of the values to present.p - presenter object.public Presenter getPresenter(Class type)
type - class to search for.
public void removePresenter(Class type)
type - object type.public void clearPresenter()
public void addFormat(Class type,
Format p)
type - type of the values to present.p - format object.public Format getFormat(Class type)
getFormat in class inetsoft.report.internal.StyleCoretype - class to search for.
public void removeFormat(Class type)
type - object type.public void clearFormat()
public void setCurrentHeader(int hflag)
hflag - header flag.public void setCurrentHeader(String eid)
eid - element ID.public void setCurrentFooter(int hflag)
hflag - footer flag.public void setCurrentFooter(String eid)
eid - element ID.public String addHeaderObject(Object obj)
If there is no presenter registered at the document for this type of object, the ReportSheet then check if a Format is register for this class. If there is a Format, it's used to format the object into string and treated as a regular text.
If there is no format registered for this object type, the object is converted to a string (toString()). The string is process in the same way as the addHeaderText() string.
obj - object value.
public String addHeaderText(String text)
text - text string.
public String addHeaderText(TextLens text)
text - text content lens.
public String addHeaderTextBox(TextLens text)
text - text content.
public String addHeaderTextBox(TextLens text,
int border,
double winch,
double hinch,
int talign)
text - text content.border - border line style. One of the line styles defined in
the StyleConstants class.winch - area width in inches.hinch - area height in inches.talign - text alignment
public String addHeaderPainter(Painter area)
area - the painter element.
public String addHeaderPainter(Painter area,
double winch,
double hinch)
area - the painter element.winch - area width in inches.hinch - area height in inches.
public String addHeaderImage(Image image)
image - image object.
public String addHeaderImage(Image image,
double winch,
double hinch)
image - image to paint.winch - area width in inches.hinch - area height in inches.
public String addHeaderImage(URL image)
image - image URL.
public String addHeaderSpace(int pixels)
pixels - space in pixels.
public String addHeaderNewline(int n)
n - number of newline.
public String addHeaderBreak()
public String addHeaderSeparator(int style)
style - the line style (defined in StyleConstants).
public String addHeaderTab(int fill)
fill - a line style defined in StyleConstants.
public String addHeaderRightTab()
public String addHeaderTable(TableLens table)
table - table lens.
public String addHeaderSection(SectionLens section)
section - section lens.
public String addHeaderSection(SectionLens section,
TableLens table)
section - section lens.table - table lens.
public String addFooterObject(Object obj)
If there is no presenter registered at the document for this type of object, the ReportSheet then check if a Format is register for this class. If there is a Format, it's used to format the object into string and treated as a regular text.
If there is no format registered for this object type, the object is converted to a string (toString()). The string is process in the same way as the addFooterText() string.
obj - object value.
public String addFooterText(String text)
text - text string.
public String addFooterText(TextLens text)
text - text content lens.
public String addFooterTextBox(TextLens text)
text - text content.
public String addFooterTextBox(TextLens text,
int border,
double winch,
double hinch,
int talign)
text - text content.border - border line style. One of the line styles defined in
the StyleConstants class.winch - area width in inches.hinch - area height in inches.talign - text alignment.
public String addFooterPainter(Painter area)
area - the painter element.
public String addFooterPainter(Painter area,
double winch,
double hinch)
area - the painter element.winch - area width in inches.hinch - area height in inches.
public String addFooterImage(Image image)
image - image object.
public String addFooterImage(Image image,
double winch,
double hinch)
image - image to paint.winch - area width in inches.hinch - area height in inches.
public String addFooterImage(URL image)
image - image URL.
public String addFooterSpace(int pixels)
pixels - space in pixels.
public String addFooterNewline(int n)
n - number of newline.
public String addFooterBreak()
public String addFooterSeparator(int style)
style - the line style (defined in StyleConstants).
public String addFooterTab(int fill)
fill - a line style defined in StyleConstants.
public String addFooterRightTab()
public String addFooterTable(TableLens table)
table - table lens.
public String addFooterSection(SectionLens section)
section - section lens.
public String addFooterSection(SectionLens section,
TableLens table)
section - section lens.table - table lens.
public ReportElement getElement(String id)
id - element ID.
public String addHeaderElement(ReportElement e)
e - document element.
public int getHeaderElementCount()
public int getAllHeaderElementCount()
public ReportElement getHeaderElement(int idx)
idx - element index.
public int getHeaderElementIndex(ReportElement e)
e - element.
public void removeHeaderElement(int idx)
idx - element index.
public void replaceHeaderElement(int idx,
ReportElement e)
idx - element index.
public void insertHeaderElement(int idx,
ReportElement e)
idx - position to insert.e - element.public String addFooterElement(ReportElement e)
e - document element.
public int getFooterElementCount()
public int getAllFooterElementCount()
public ReportElement getFooterElement(int idx)
idx - element index.
public int getFooterElementIndex(ReportElement e)
e - element.
public void removeFooterElement(int idx)
idx - element index.
public void replaceFooterElement(int idx,
ReportElement e)
idx - element index.
public void insertFooterElement(int idx,
ReportElement e)
idx - position to insert.e - element.
protected void moveHeaderFooterElement(ReportElement elem,
int direction)
elem - the element.direction - the moving direction. ReportSheet.UP or
ReportSheet.DOWN.protected void removeHeaderFooterElement(ReportElement elem)
elem - the element being removed.protected void removeElementHeaderFooter(String id)
id -
protected void replaceHeaderFooterElement(ReportElement elem,
ReportElement nelem)
elem - the element being removed.public Vector getElements(int type)
type - element type.
public int getMaxPages()
public int getMaxPages(boolean isUsedGlobal)
isUsedGlobal - get global max pages if max pages is undefine.
public void setMaxPages(int pages)
pages - the specified max pages.
public void print()
throws Exception
Exceptionpublic void print(PrintJob job)
job - print job to print document to.
public void setElement(String id,
Object data)
throws NoSuchElementException,
IllegalArgumentException
The acceptable type of data depends on the type of the element identified by the ID. The following table lists the element type and data types.
| Table | TableLens, Object[][] |
| Section | TableLens, Object[][] |
| Form | FormLens |
| Chart | ChartLens, TableLens |
| Text, TextBox | String, TextLens, Object |
| Painter (or Image, Component) | Image, Component, Painter |
| Composite | ElementContainer |
| Button | String |
| CheckBox | String |
| Choice | Object or Object[] |
| TextField | String |
| TextArea | String |
If an element is not found for the specified ID, a NoSuchElementException if thrown. If the data type does not match the element type, an IllegalArgumentException is thrown.
id - element ID.data - element content/data source.
NoSuchElementException
IllegalArgumentException
protected abstract void replaceElement(String id,
ReportElement elem)
public void mergeInto(String id,
TableLens table)
throws NoSuchElementException,
IllegalArgumentException
Only table data is merged. All cell attributes are ignored. This is primarily used by a program to supply data to a table on a template that has static header and attributes entered using the designer.
id - element ID.table - data table.
NoSuchElementException
IllegalArgumentExceptionpublic inetsoft.report.style.TableStyle getTableStyle(String id)
id - table element ID.
public void setTableStyle(String id,
inetsoft.report.style.TableStyle style)
id - table element ID.style - new table style.public TableLens getTable(String id)
id - table element ID.
public DataSet getDataSet(String id)
id - chart element ID.
public FormLens getForm(String id)
id - form element ID.
public String getText(String id)
id - element ID.
public void addPresenter(String id,
Class type,
Presenter presenter)
id - table element ID.type - data type.presenter - presenter for the data type.
public void addFormat(String id,
Class type,
Format format)
id - table element ID.type - data type.format - format for the data type.public void setDirectory(String dir)
dir - directory full path.public String getDirectory()
public abstract boolean printNext(StylePage pg)
A StylePage contains information on how to print a particular page. Its print() method can be used to perform the actual printing of the page contents to a printer graphics.
pg - style page.public abstract boolean printNextPage(StylePage pg)
public Integer getNextOrientation()
public boolean printNextArea(StylePage pg,
Vector elements,
boolean flow)
printNextArea in class inetsoft.report.internal.StyleCorepg - page to print.flow - true to flow the next page if full.
protected boolean printNextLine(StylePage pg,
Vector elements,
boolean flow)
flow - true to flow the next page if full.
public void setParameterSheet(ParameterSheet paraSheet)
setParameterSheet in class inetsoft.report.internal.StyleCoreprotected void printHeaderFooter(StylePage pg)
pg - a style page.
protected void printNonFlowAreas(StylePage pg,
PageArea[] areas,
boolean first)
first - true if the page area is printed at first timepublic void addExecuteListener(ExecuteListener listener)
public void removeExecuteListener(ExecuteListener listener)
public Enumeration getExecuteListeners()
public void removeExecuteListeners()
public void fireExecuteEvent(ExecuteEvent event)
public void addPageBreakListener(PageBreakListener l)
public void removePageBreakListener(PageBreakListener l)
public String getOnPageBreak()
public void setOnPageBreak(String cmd)
public String getOnPrint()
public void setOnPrint(String cmd)
public String getOnLoad()
public void setOnLoad(String cmd)
public String getOnInit()
public void setOnInit(String cmd)
public void firePageBreakEvent(StylePage pg,
boolean more)
protected abstract void removeContents()
public abstract void removeElement(String id)
id - element id in string format.
public abstract void moveElement(String id,
int direction)
id - element id in string format.direction - move direction, can be one of ReportSheet.UP or
ReportSheet.DOWN.public void clear()
protected abstract void resetContents()
public void reset()
reset in class inetsoft.report.internal.StyleCorepublic void resetPageNumbering()
public void setVisible(String id,
boolean vis)
id - element id.vis - true to show element and false to hide it.public String getProperty(String name)
name - property name.
public void setProperty(String name,
String val)
report.title report.subject report.author report.keywords report.comments report.created report.modified date.format time.format date.time.format
name - property name.val - property value.public void refreshFormats()
refreshFormats in class inetsoft.report.internal.StyleCorepublic Size getPageSize()
public void setPageSize(Size size)
size - page size in inches.public int getOrientation()
public void setOrientation(int orient)
public boolean isLandscape()
public void keepWithNext(StylePage pg,
int ocurrent,
Vector elements)
pg - the page that is printed.ocurrent - element index before cell is printed.elements - the list of elements used to print the page.public static void setPrinterMargin(Margin pmargin)
Since the same bug reappeared in jdk1.2 after being fixed in jdk1.1.7, it is reactivated and will probably be needed (unfortunately) much longer than its original anticipated usage.
public static Margin getPrinterMargin()
public String getVersion()
public void setVersion(String version)
public void setCSSLocation(String cssLoc)
cssLoc - a url, a resource path or a file path.public String getCSSLocation()
public boolean isFromMetaTemplate()
public String getMetaTemplate()
public void setMetaTemplate(String meta)
public String getContextName()
public void setContextName(String name)
public Object clone()
clone in class inetsoft.report.internal.StyleCorepublic Object clone(boolean deep)
protected void copyReportSheet(ReportSheet report,
boolean flag)
report - the report copied to.flag - if true flag all copied elements as from template.
protected void copyReportSheet(ReportSheet report,
boolean flag,
boolean deep)
report - the report copied to.flag - if true flag all copied elements as from template.public void setParentReport(ReportSheet preport)
public ReportSheet getParentReport()
public boolean isSinglePageForTopReport()
public boolean isExportSinglePage()
public SharedFilter getSharedFilter()
public void setSharedFilter(SharedFilter sharedFilter)
sharedFilter - the shared filter.
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||