Style Intelligence v12.0

inetsoft.report
Class StyleSheet

java.lang.Object
  extended by inetsoft.uql.asset.AbstractAssetEngine
      extended by inetsoft.report.internal.StyleCore
          extended by inetsoft.report.ReportSheet
              extended by inetsoft.report.StyleSheet
All Implemented Interfaces:
inetsoft.report.internal.ParameterSheetRepository, StyleConstants, AssetRepository, XConstants, XFormulaRepository, XLocalQueryRepository, XQueryRepository, Serializable, Cloneable
Direct Known Subclasses:
BeanSheet, MetaStyleSheet

public class StyleSheet
extends ReportSheet

StyleSheet is one of the two report types in Style Report. It uses a flow layout model. Report contents are laid out in one flow. The flow can be across pages, or through page areas defined by page layout. Its conceptual model is very close to regular word processors.

ReportSheet contains the common API for report generation. Please refer to the Style Report Programming Guide for more details on the concepts and features of the StyleSheet.

See Also:
Serialized Form

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
protected  Hashtable areamap
           
protected  Vector elements
           
protected  boolean newPage
           
 
Fields inherited from class inetsoft.report.ReportSheet
BODY, DEFAULT_FOOTER, DEFAULT_HEADER, DOWN, EVEN_PAGE_FOOTER, EVEN_PAGE_HEADER, FIRST_PAGE_FOOTER, FIRST_PAGE_HEADER, ODD_PAGE_FOOTER, ODD_PAGE_HEADER, PAINTER_BREAKABLE, PAINTER_NON_BREAK, TABLE_EQUAL_WIDTH, TABLE_FIT_CONTENT, TABLE_FIT_CONTENT_1PP, TABLE_FIT_CONTENT_PAGE, TABLE_FIT_PAGE, UP, WRAP_BOTH, WRAP_LEFT, WRAP_NONE, WRAP_RIGHT, WRAP_TOP_BOTTOM
 
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.StyleConstants
ARROW_LINE_1, ARROW_LINE_2, ARROW_LINE_3, BACKGROUND_CENTER, BACKGROUND_TILED, BOX_RECTANGLE, BOX_ROUNDED_RECTANGLE, CENTER, CHART_3D_BAR, CHART_3D_BAR_3D, CHART_3D_PIE, CHART_3D_STACK_BAR, CHART_AREA, CHART_BAR, CHART_BUBBLE, CHART_CANDLE, CHART_CURVE, CHART_FILL_RADAR, CHART_GANTT, CHART_INV_BAR, CHART_INV_CURVE, CHART_INV_LINE, CHART_INV_POINT, CHART_INV_STACK_BAR, CHART_LINE, CHART_MAX_USER, CHART_PARETO, CHART_PIE, CHART_PIE_EXPLODED_ALL, CHART_PIE_EXPLODED_FIRST, CHART_PIE_EXPLODED_NONE, CHART_POINT, CHART_RADAR, CHART_RIBBON, CHART_SCATTER, CHART_SPEEDOMETER, CHART_STACK_AREA, CHART_STACK_BAR, CHART_STICK, CHART_STOCK, CHART_SURFACE, CHART_USER, CHART_VOLUME, CHART_WATERFALL, CHART_XY_LINE, CIRCLE, CROSS, CURRENCY, DASH_LINE, DASH_MASK, DEFAULT_PAGE_SIZE, DIAMOND, DOT_LINE, DOUBLE_3D_LOWERED, DOUBLE_3D_RAISED, DOUBLE_LINE, DOUBLE_MASK, FILL, FILLED_CIRCLE, FILLED_DIAMOND, FILLED_SQUARE, FILLED_TRIANGLE, FRACTION_WIDTH_MASK, H_ALIGN_MASK, H_CENTER, H_CURRENCY, H_LEFT, H_LINE, H_RIGHT, LANDSCAPE, LARGE_DASH, LEFT, LINECAP_BUTT, LINECAP_ROUND, LINECAP_SQUARE, LINEJOIN_BEVEL, LINEJOIN_MITER, LINEJOIN_ROUND, LOWERED_3D, LOWERED_MASK, LT_ANGLE, MEDIUM_DASH, MEDIUM_LINE, NIL, NO_BORDER, NONE, PAPER_10X11, PAPER_10X14, PAPER_11X17, PAPER_15X11, PAPER_9X11, PAPER_A_PLUS, PAPER_A2, PAPER_A3, PAPER_A3_EXTRA, PAPER_A3_EXTRA_TRANSVERSE, PAPER_A3_TRANSVERSE, PAPER_A4, PAPER_A4_EXTRA, PAPER_A4_PLUS, PAPER_A4_TRANSVERSE, PAPER_A4SMALL, PAPER_A5, PAPER_A5_EXTRA, PAPER_A5_TRANSVERSE, PAPER_B_PLUS, PAPER_B4, PAPER_B5, PAPER_B5_EXTRA, PAPER_B5_TRANSVERSE, PAPER_CSHEET, PAPER_DSHEET, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_ENV_14, PAPER_ENV_9, PAPER_ENV_B4, PAPER_ENV_B5, PAPER_ENV_B6, PAPER_ENV_C3, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65, PAPER_ENV_DL, PAPER_ENV_INVITE, PAPER_ENV_ITALY, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL, PAPER_ESHEET, PAPER_EXECUTIVE, PAPER_FANFOLD_LGL_GERMAN, PAPER_FANFOLD_STD_GERMAN, PAPER_FANFOLD_US, PAPER_FOLIO, PAPER_ISO_B4, PAPER_JAPANESE_POSTCARD, PAPER_LEDGER, PAPER_LEGAL, PAPER_LEGAL_EXTRA, PAPER_LETTER, PAPER_LETTER_EXTRA, PAPER_LETTER_EXTRA_TRANSVERSE, PAPER_LETTER_PLUS, PAPER_LETTER_TRANSVERSE, PAPER_LETTERSMALL, PAPER_NOTE, PAPER_QUARTO, PAPER_STATEMENT, PAPER_TABLOID, PAPER_TABLOID_EXTRA, PATTERN_0, PATTERN_1, PATTERN_10, PATTERN_11, PATTERN_12, PATTERN_13, PATTERN_14, PATTERN_15, PATTERN_16, PATTERN_17, PATTERN_18, PATTERN_19, PATTERN_2, PATTERN_3, PATTERN_4, PATTERN_5, PATTERN_6, PATTERN_7, PATTERN_8, PATTERN_9, PATTERN_NONE, PORTRAIT, RAISED_3D, RAISED_MASK, REMAINDER, RIGHT, RIGHT_ANGLE, SOLID_MASK, SQUARE, STAR, THICK_LINE, THIN_LINE, THIN_THIN_LINE, TRAY_AUTO, TRAY_CASSETTE, TRAY_ENVELOPE, TRAY_ENVMANUAL, TRAY_FORMSOURCE, TRAY_LARGECAPACITY, TRAY_LARGEFMT, TRAY_LOWER, TRAY_MANUAL, TRAY_MIDDLE, TRAY_ONLYONE, TRAY_SMALLFMT, TRAY_TRACTOR, TRAY_UPPER, TRIANGLE, ULTRA_THIN_LINE, V_ALIGN_MASK, V_ANGLE, V_BASELINE, V_BOTTOM, V_CENTER, V_LINE, V_TOP, WIDTH_MASK, X
 
Fields inherited from interface inetsoft.uql.XConstants
AM_PM_DATE_GROUP, AM_PM_OF_DAY_DATE_GROUP, AVERAGE_FORMULA, CALC_FORMULA, COLUMN, CONCAT_FORMULA, CONDITION_EMPTY_STRING, CONDITION_NULL_STRING, CONDITION_NULL_VALUE, CONDITION_REAL_NULL, CORRELATION_FORMULA, COUNT_FORMULA, COVARIANCE_FORMULA, CURRENCY_FORMAT, CURRENT_REP_CHANGED, CURRENT_REP_WILL_CHANGE, DATE_FORMAT, DAY_DATE_GROUP, DAY_OF_MONTH_DATE_GROUP, DAY_OF_WEEK_DATE_GROUP, DAY_OF_YEAR_DATE_GROUP, DECIMAL_FORMAT, DISTINCTCOUNT_FORMULA, FIRST_FORMULA, FULL_JOIN, GREATER_EQUAL_JOIN, GREATER_JOIN, GROUP_OTHERS, HOUR_DATE_GROUP, HOUR_OF_DAY_DATE_GROUP, INNER_JOIN, JOIN, LAST_FORMULA, LEAVE_OTHERS, LEFT_JOIN, LESS_EQUAL_JOIN, LESS_JOIN, MAX_FORMULA, MEDIAN_FORMULA, MESSAGE_FORMAT, MILLISECOND_DATE_GROUP, MIN_FORMULA, MINUTE_DATE_GROUP, MODE_FORMULA, MONTH_DATE_GROUP, MONTH_OF_YEAR_DATE_GROUP, NONE_DATE_GROUP, NONE_FORMULA, NOT_EQUAL_JOIN, NTHLARGEST_FORMULA, NTHMOSTFREQUENT_FORMULA, NTHSMALLEST_FORMULA, PARAM_PREFIX, PART_DATE_GROUP, PERCENT_FORMAT, PERCENTAGE_BY_COL, PERCENTAGE_BY_ROW, PERCENTAGE_NONE, PERCENTAGE_OF_COL_GRANDTOTAL, PERCENTAGE_OF_COL_GROUP, PERCENTAGE_OF_GRANDTOTAL, PERCENTAGE_OF_GROUP, PERCENTAGE_OF_ROW_GRANDTOTAL, PERCENTAGE_OF_ROW_GROUP, POPULATIONSTANDARDDEVIATION_FORMULA, POPULATIONVARIANCE_FORMULA, PRODUCT_FORMULA, PTHPERCENTILE_FORMULA, QUARTER_DATE_GROUP, QUARTER_OF_YEAR_DATE_GROUP, RIGHT_JOIN, SECOND_DATE_GROUP, SET_FORMULA, SORT_ASC, SORT_DESC, SORT_NONE, SORT_ORIGINAL, SORT_SPECIFIC, SORT_VALUE_ASC, SORT_VALUE_DESC, STANDARDDEVIATION_FORMULA, SUB_QUERY_PARAM, SUM_FORMULA, SUMSQ_FORMULA, SUMWT_FORMULA, VARIANCE_FORMULA, WEEK_DATE_GROUP, WEEK_OF_MONTH_DATE_GROUP, WEEK_OF_YEAR_DATE_GROUP, WEIGHTEDAVERAGE_FORMULA, YEAR_DATE_GROUP
 
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
StyleSheet()
          Create an empty StyleSheet.
 
Method Summary
 String addAreaBreak()
          Add a area break to the document.
 String addBean(String name)
          Add a bean to the report.
 String addBreak()
          Add a break to the document.
 String addBullet()
          Add a bullet to the document.
 String addBullet(Image icon)
          Add a bullet with user specified image as bullet icon.
 String addButton(String form, String name, String text)
          Add a form button to the report.
 String addButton(String form, String name, String script, String text)
          Add a form button to the report.
 String addChart(DataSet chart)
          Add a chart to the report.
 String addChart(DataSet chart, double winch, double hinch)
          This is same as addChart() exception an explicit size of the chart area is specified.
 String addCheckBox(String form, String name, String text, boolean selected)
          Add a checkbox to the report.
 String addCheckBox(String form, String name, String script, String text, boolean selected)
          Add a checkbox to the report.
 String addChoiceElement(String form, String name, String selected, String[] choices)
          Add a choice field to the report.
 String addChoiceElement(String form, String name, String script, String selected, String[] choices)
          Add a choice field to the report.
 String addComponent(Component comp)
          Add an AWT component to the document.
 String addComponent(Component component, double winch, double hinch)
          This is same as addComponent() exception an explicit size of the painter area is specified.
 String addComposite(CompositeLens container)
          Add a composite element to the report.
 String addConditionalPageBreak(double inch)
          Add a conditional page break.
 String addConditionalPageBreak(int min)
          Add a conditional page break.
 String addDateCombo(String form, String name, Date date)
          Add a date combobox to a report.
 String addDateCombo(String form, String name, String script, Date date)
          Add a date combobox to a report.
 String addElement(ReportElement e)
          Add an element to the document.
 String addForm(FormLens form)
          Add a form to the document.
 String addImage(Image image)
          Add an image to the document.
 String addImage(Image image, double winch, double hinch)
          This is same as addImage() exception an explicit size of the painter area is specified.
 String addImage(URL image)
          Add an image to the document.
 String addImageButton(String form, String name, String resource)
          Add a form image button to the report.
 String addImageButton(String form, String name, String script, String resource)
          Add a form image button to the report.
 String addListElement(String form, String name, String[] selected, String[] choices)
          Add a list field to the report.
 String addListElement(String form, String name, String script, String[] selected, String[] choices)
          Add a list field to the report.
 String addNewline(int n)
          Add one or more newline to the document.
 String addObject(Object obj)
          Add an object to the document.
 String addPageBreak()
          Add a page break to the document.
 String addPainter(Painter area)
          Add a painter element to the document.
 String addPainter(Painter area, double winch, double hinch)
          This is same as addPainter() except an explicit size of the painter area is specified.
 String addRadioButton(String form, String name, String text, boolean selected, String group)
          Add a radio button to the report.
 String addRadioButton(String form, String name, String script, String text, boolean selected, String group)
          Add a radio button to the report.
 String addRightTab()
          Add a right aligned tab.
 String addSection(SectionLens section)
          Add a section element to the report.
 String addSection(SectionLens section, TableLens table)
          Add a section element to the report.
 String addSeparator(int style)
          Add a separator.
 String addSpace(int pixels)
          Add horizontal space to the document.
 String addTab(int fill)
          Add a tab.
 String addTable(TableLens table)
          Add a table to the document.
 String addText(String text)
          Add a text element to the document.
 String addText(TextLens text)
          Add a text element to the document.
 String addTextArea(String form, String name, String text, int rows, int cols)
          Add a textarea to a report.
 String addTextArea(String form, String name, String script, String text, int rows, int cols)
          Add a textarea to a report.
 String addTextBox(String text)
          Add a text box to the document.
 String addTextBox(String text, int border, double winch, double hinch, int textalign)
          Add a text box to the document.
 String addTextBox(TextLens text)
          Add a text box to the document.
 String addTextBox(TextLens text, int border, double winch, double hinch, int textalign)
          Add a text box to the document.
 String addTextField(String form, String name, String text, int cols)
          Add a textfield to a report.
 String addTextField(String form, String name, String script, String text, int cols)
          Add a textfield to a report.
 String addTOC(TOC toc)
          Add a table of contents section to the report.
 Object clone()
          Make a copy of this report.
 Object clone(boolean deep)
          Make a copy of this report.
protected  void copyStyleSheet(StyleSheet that, boolean flag)
          Copy this report to that report.
protected  void copyStyleSheet(StyleSheet that, boolean flag, boolean deep)
          Copy this report to that report.
static StyleSheet createStyleSheet()
          Deprecated. 4.1
 Vector getAllElements()
          Get all elements in the report, including body, and non-flow area elements.
 ReportElement getElement(int idx)
          Get the specified element.
 int getElementCount()
          Return the number of elements in the document.
 int getElementIndex(ReportElement e)
          Get the index of the specified element.
 Enumeration getElementPageLayouts()
          Get all page layout associated with elements.
 Enumeration getElementsWithPageLayout()
          Get elements with element associated page areas.
 Integer getNextOrientation()
          Get the page orientation for the next page.
 PageLayout getPageLayout(String id)
          Get the page layout associated with an element.
 String insertElement(int idx, ReportElement e)
          Insert the element at specified position (before).
 void moveElement(String id, int direction)
          Move element up or down.
 boolean printNext(StylePage pg)
          Print one page.
 boolean printNextPage(StylePage pg)
          Print the next page.
protected  void removeContents()
          Remove all elements from the contents.
 void removeElement(int idx)
          Remove the specified element.
 void removeElement(String id)
          Remove the specified element.
 void removePageLayout(String id)
          Remove an element associated page layout.
protected  void replaceElement(int idx, ReportElement e)
          Replace the specified element.
protected  void replaceElement(String id, ReportElement e)
          Replace the specified element.
 void requestNewPage()
          Request a new page.
protected  void resetContents()
          Reset all elemnts in the contents.
 String setPageColumns(int cols)
          Divide page in to number of columns.
 String setPageColumns(int cols, ReportElement top)
          Divide page in to number of columns.
 String setPageLayout(PageLayout layout)
          Change the page layout.
 String setPageLayout(PageLayout layout, ReportElement top)
          Change the page layout.
 void setPageLayout(PageLayout layout, String id)
          Associate a page layout with an element.
 String toString()
           
 
Methods inherited from class inetsoft.report.ReportSheet
addExecuteListener, addFooterBreak, addFooterElement, addFooterImage, addFooterImage, addFooterImage, addFooterNewline, addFooterObject, addFooterPainter, addFooterPainter, addFooterRightTab, addFooterSection, addFooterSection, addFooterSeparator, addFooterSpace, addFooterTab, addFooterTable, addFooterText, addFooterText, addFooterTextBox, addFooterTextBox, addFormat, addFormat, addFormula, addHeaderBreak, addHeaderElement, addHeaderImage, addHeaderImage, addHeaderImage, addHeaderNewline, addHeaderObject, addHeaderPainter, addHeaderPainter, addHeaderRightTab, addHeaderSection, addHeaderSection, addHeaderSeparator, addHeaderSpace, addHeaderTab, addHeaderTable, addHeaderText, addHeaderText, addHeaderTextBox, addHeaderTextBox, addPageBreakListener, addParameter, addParameter, addPresenter, addPresenter, addRefreshListener, addRunningTotal, clear, clearFormat, clearPresenter, containsFormula, copyFormulas, copyReportSheet, copyReportSheet, exportQueries, fireExecuteEvent, firePageBreakEvent, getAllFooterElementCount, getAllHeaderElementCount, getBackground, getBackgroundLayout, getBackgroundSize, getContextName, getCSSLocation, getCurrentAlignment, getCurrentBackground, getCurrentCellPadding, getCurrentFont, getCurrentForeground, getCurrentIndent, getCurrentLineId, getCurrentLineSpacing, getCurrentMargin, getCurrentPainterLayout, getCurrentPainterMargin, getCurrentSeparatorAdvance, getCurrentTableAdvance, getCurrentTableLayout, getCurrentTableWidth, getCurrentTabStops, getCurrentTextAdvance, getCurrentWrapping, getDataSet, getDirectory, getElement, getElements, getExecuteListeners, getExportInfo, getFooterBounds, getFooterElement, getFooterElementCount, getFooterElementIndex, getFooterFromEdge, getForm, getFormat, getFormula, getFormulas, getFormulas, getHeaderBounds, getHeaderElement, getHeaderElementCount, getHeaderElementIndex, getHeaderFromEdge, getImportInfo, getLocale, getMargin, getMaxPages, getMaxPages, getMetaTemplate, getOnInit, getOnLoad, getOnPageBreak, getOnPrint, getOrientation, getPageNumberingStart, getPageSize, getParameter, getParameterCount, getParameters, getParameterSheetFlow, getParameterSheets, getParentReport, getPresenter, getPrinterMargin, getProperty, getQueries, getQuery, getQueryNames, getQueryType, getRunningTotal, getRunningTotalCount, getSharedFilter, getTable, getTableStyle, getText, getVersion, importQueries, insertFooterElement, insertHeaderElement, isCurrentJustify, isCurrentOrphanControl, isCurrentTableOrphanControl, isExportSinglePage, isFromMetaTemplate, isHorizontalWrap, isLandscape, isParameterPrompting, isSinglePageForTopReport, isVisible, keepWithNext, mergeInto, moveAnchor, moveHeaderFooterElement, print, print, printHeaderFooter, printNextArea, printNextLine, printNonFlowAreas, refreshFormats, removeAllParameters, removeContext, removeElementHeaderFooter, removeExecuteListener, removeExecuteListeners, removeFooterElement, removeFormat, removeFormula, removeHeaderElement, removeHeaderFooterElement, removePageBreakListener, removeParameter, removePresenter, removeQuery, removeRunningTotal, replaceFooterElement, replaceFormulaInfo, replaceHeaderElement, replaceHeaderFooterElement, reset, resetPageNumbering, saveContext, selectContext, setBackground, setBackgroundLayout, setBackgroundSize, setBackgroundSize, setContextName, setCSSLocation, setCurrentAlignment, setCurrentBackground, setCurrentCellPadding, setCurrentFont, setCurrentFooter, setCurrentFooter, setCurrentForeground, setCurrentHeader, setCurrentHeader, setCurrentIndent, setCurrentJustify, setCurrentLineId, setCurrentLineSpacing, setCurrentOrphanControl, setCurrentPainterLayout, setCurrentPainterMargin, setCurrentSeparatorAdvance, setCurrentTableAdvance, setCurrentTableLayout, setCurrentTableOrphanControl, setCurrentTableWidth, setCurrentTabStops, setCurrentTextAdvance, setCurrentWrapping, setDirectory, setElement, setFooterFromEdge, setFormulaInfos, setHeaderFromEdge, setHorizontalWrap, setLocale, setMargin, setMaxPages, setMetaTemplate, setOnInit, setOnLoad, setOnPageBreak, setOnPrint, setOrientation, setPageNumberingStart, setPageSize, setParameterPrompting, setParameterSheet, setParameterSheetFlow, setParameterSheets, setParentReport, setPrinterMargin, setProperty, setQuery, setSharedFilter, setTableStyle, setVersion, setVisible, syncSourceInfo, syncSourceInfo, updateQuery
 
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, 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 inetsoft.uql.asset.AbstractAssetEngine
addAssetChangeListener, addFolder, allowsFolderScopeChange, allowsSheetScopeChange, changeFolder, changeFolder0, changeSheet, changeSheet0, checkAssetPermission, checkDependencyValidity, checkFolderRemoveable, checkPermission, clearCache, clearVSBookmark, closeStorages, containsEntry, createPhysicalEntry, dispose, finalize, fireEvent, getAssetPrefix, getDependencyFileKey, getDesignView, getEntries, getEntries, getEntryIdentifier, getParent, getParentFolder, getQueryEntries, getQuotaManager, getReportSheetDependencies, getReportStorage, getSession, getSheetDependencies, getStorage, getStorage, getStorages, getVSBookmark, getWorksheetEntries, initFinder, isEntryAvailable, removeAssetChangeListener, removeFolder, removeFolder0, removeSheet, removeSheet0, removeUser, renameUser, setParent, setSheet, setSheet, setVSBookmark, supportsScope
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

newPage

protected transient boolean newPage

elements

protected Vector elements

areamap

protected Hashtable areamap
Constructor Detail

StyleSheet

public StyleSheet()
Create an empty StyleSheet.

Method Detail

createStyleSheet

public static StyleSheet createStyleSheet()
Deprecated. 4.1

Create a StyleSheet instance according to the platform. If it's running in JDK1.2 or later, a StyleSheet2D is created. Otherwise a StyleSheet object is created.

Returns:
StyleSheet object.

setPageLayout

public String setPageLayout(PageLayout layout)
Change the page layout. The areas are used to divide pages into sections. The printing flows from one area to the next until all areas are full. This forces a new page.

Parameters:
layout - page areas.
Returns:
page layout element ID.

setPageLayout

public String setPageLayout(PageLayout layout,
                            ReportElement top)
Change the page layout. The areas are used to divide pages into sections. The printing flows from one area to the next until all areas are full.

Parameters:
layout - page areas.
top - the top element of this page. The page layout is changed before this element, which forces a new page. If the top element is null, the page layout is added to the end of the report.
Returns:
page layout element ID.

setPageLayout

public void setPageLayout(PageLayout layout,
                          String id)
Associate a page layout with an element. The page layout is used for the current page if the specified element is at the top of this page. The page area is used for the next page if the specified element is printed in the current page.

Parameters:
layout - page areas. If the value is null, the page areas setting for the element is removed.
id - element ID.

getElementsWithPageLayout

public Enumeration getElementsWithPageLayout()
Get elements with element associated page areas.

Returns:
IDs of elements with element associated layout.

getElementPageLayouts

public Enumeration getElementPageLayouts()
Get all page layout associated with elements.


getPageLayout

public PageLayout getPageLayout(String id)
Get the page layout associated with an element.

Parameters:
id - element ID.
Returns:
page layout associated with the element, or null if no page layout is associated with the element.

removePageLayout

public void removePageLayout(String id)
Remove an element associated page layout.

Parameters:
id - element ID.

setPageColumns

public String setPageColumns(int cols)
Divide page in to number of columns. The elements flow from one column to the next, from left to right. This forces a new page.

Parameters:
cols - number of columns.
Returns:
page layout element ID.

setPageColumns

public String setPageColumns(int cols,
                             ReportElement top)
Divide page in to number of columns. The elements flow from one column to the next, from left to right.

Parameters:
cols - number of columns.
top - the top element of this page. The page layout is changed before this element, which forces a new page. If the top element is null, the page layout is added to the end of the report.
Returns:
page layout element ID.

addObject

public String addObject(Object obj)
Add an object to the document. First the StyleSheet checks if a presenter is register for this type of object. If there is a presenter, a PresenterPainter is created to paint the object using the presenter.

If there is no presenter registered at the document for this type of object, the StyleSheet 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()) and treated as a regular text element.

Parameters:
obj - object value.
Returns:
element id.

addText

public String addText(String text)
Add a text element to the document. The text string can be a simple string, or contains multiple lines separated by the newline character.

Parameters:
text - text string.
Returns:
element id.

addText

public String addText(TextLens text)
Add a text element to the document. The TextLens provides an extra level of indirection. For example, it can be used to refer to a TextField on a GUI screen, the most up-to-date value in the text field will be used when printing the document. This way a StyleSheet can be created once, and don't need to be modified when the text contents change.

The inetsoft.report.lens package also contains a StreamTextLens, which allows retrieving text from a file, URL, or any input stream.

Parameters:
text - text content lens.
Returns:
element id.

addTextBox

public String addTextBox(TextLens text)
Add a text box to the document. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well.

Parameters:
text - text content.
Returns:
element id.

addTextBox

public String addTextBox(String text)
Add a text box to the document. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well.

Parameters:
text - text content.
Returns:
element id.

addTextBox

public String addTextBox(TextLens text,
                         int border,
                         double winch,
                         double hinch,
                         int textalign)
Add a text box to the document. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well.

Parameters:
text - text content.
border - border line style. One of the line styles defined in the StyleConstants class.
winch - area width in inches. Pass 0 to use default.
hinch - area height in inches. Pass 0 to use default.
textalign - text alignment within the box.
Returns:
element id.

addTextBox

public String addTextBox(String text,
                         int border,
                         double winch,
                         double hinch,
                         int textalign)
Add a text box to the document. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well.

Parameters:
text - text content.
border - border line style. One of the line styles defined in the StyleConstants class.
winch - area width in inches. Pass 0 to use default.
hinch - area height in inches. Pass 0 to use default.
textalign - text alignment within the box.
Returns:
element id.

addPainter

public String addPainter(Painter area)
Add a painter element to the document. A painter is a self contained object that can paint a document area. It can be used to add any content to the document, through which the program has full control on exact presentation on the document. Painter is the general mechanism used to support some of the more common data types. For example, Component and Image are handled internally by a painter object. The program is free to define its own painter.

Parameters:
area - the painter element.
Returns:
element id.

addPainter

public String addPainter(Painter area,
                         double winch,
                         double hinch)
This is same as addPainter() except an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
area - the painter element.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addChart

public String addChart(DataSet chart)
Add a chart to the report. The chart behaves like a painter. It reserves an area and paints a chart on the area. The current PainterLayout value is also applied to the chart.

Parameters:
chart - chart data model.
Returns:
element id.

addChart

public String addChart(DataSet chart,
                       double winch,
                       double hinch)
This is same as addChart() exception an explicit size of the chart area is specified. The specified size (in inches) is the preferred size of this chart on paper, where as the preferred size of the Chart object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Chart.getPreferredSize) to the area defined.

Parameters:
chart - the chart element.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addComponent

public String addComponent(Component comp)
Add an AWT component to the document. The onscreen image of the component is 'copied' on to the document.

Parameters:
comp - component.
Returns:
element id.

addComponent

public String addComponent(Component component,
                           double winch,
                           double hinch)
This is same as addComponent() exception an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The component is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
component - component to paint.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addImage

public String addImage(Image image)
Add an image to the document.

Parameters:
image - image object.
Returns:
element id.

addImage

public String addImage(Image image,
                       double winch,
                       double hinch)
This is same as addImage() exception an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
image - image to paint.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addImage

public String addImage(URL image)
                throws IOException
Add an image to the document.

Parameters:
image - image URL.
Returns:
element id.
Throws:
IOException

addBullet

public String addBullet()
Add a bullet to the document. A bullet can be used to create a bullet list. The default bullet is a round dot. The bullet has a special layout property. After a bullet is added, a hanging indent is created to just right of the bullet. If a Break is added, the cursor is advanced to the next line at the hanging indent position. If a newline element is added, the hanging indent is reset.

Returns:
element id.

addBullet

public String addBullet(Image icon)
Add a bullet with user specified image as bullet icon. The bullet is otherwise same as the default.

Parameters:
icon - icon to used for bullet.
Returns:
element id.

addSpace

public String addSpace(int pixels)
Add horizontal space to the document. The space is added after the current element.

Parameters:
pixels - space in pixels.
Returns:
element id.

addNewline

public String addNewline(int n)
Add one or more newline to the document.

Parameters:
n - number of newline.
Returns:
element id.

addBreak

public String addBreak()
Add a break to the document. The break is different from a newline in that the break does not reset the hanging indent which is set by a bullet.

Returns:
element id.

addPageBreak

public String addPageBreak()
Add a page break to the document. This causes the print to advance to a new page.

Returns:
element id.

addAreaBreak

public String addAreaBreak()
Add a area break to the document. This causes the print to advance to a new area. In the default case, each page is consisted of one area, so this is same as adding a page break.

Returns:
element id.

addConditionalPageBreak

public String addConditionalPageBreak(int min)
Add a conditional page break. The print advance to a new page if the remaining space in the current page is less than the specified minimum space.

Parameters:
min - minimu space in pixels.
Returns:
element id.

addConditionalPageBreak

public String addConditionalPageBreak(double inch)
Add a conditional page break. The print advance to a new page if the remaining space in the current page is less than the specified minimum space.

Parameters:
inch - minimu space in inches.
Returns:
element id.

addSeparator

public String addSeparator(int style)
Add a separator. A separator is a horizontal line in either 3D or plain mode.

Parameters:
style - the line style (defined in StyleConstants).
Returns:
element id.

addTab

public String addTab(int fill)
Add a tab. The fill specifies a line style to fill the tab space.

Parameters:
fill - a line style defined in StyleConstants.
Returns:
element id.

addRightTab

public String addRightTab()
Add a right aligned tab. A right aligned tab causes the text preceding the tab to be right aligned at the next tab stop.

Returns:
element id.

addTable

public String addTable(TableLens table)
Add a table to the document. The table lens object encapsulates the table attributes and contents. Through the table lens, the print discovers table attributes such as color, border, font, etc.. For more details, refer the TableLens document.

Parameters:
table - table lens.
Returns:
element id.

addForm

public String addForm(FormLens form)
Add a form to the document. A form is a collection of labels and values. With each field consists of a label and a field value. The fields are layed out in rows and columns.

Parameters:
form - form lens.
Returns:
element id.

addTOC

public String addTOC(TOC toc)
Add a table of contents section to the report. The table of contents is built from the heading elements in the report. Heading elements are special text elements that contains a heading level.

Parameters:
toc - table of contents style.
Returns:
element id.

addBean

public String addBean(String name)
Add a bean to the report. The bean is a reference to a report component. The contents of the report component is printed in the place of the bean element.

Parameters:
name - bean name, must be an existing bean in the bean library.
Returns:
element id.

addComposite

public String addComposite(CompositeLens container)
Add a composite element to the report. A composite element is a container of elements. It can contain multiple elements which are printed as part of the report flow. The elements in the container can be changed dynamically or created programmatically. A ElementContainer class can be used to create a composite lens without implementing the interface.

Parameters:
container - composite lens.
Returns:
element id.

addSection

public String addSection(SectionLens section)
Add a section element to the report. A section contains fixed positioned elements that are printed relative to the frame position.


addSection

public String addSection(SectionLens section,
                         TableLens table)
Add a section element to the report. A table is bound to the section. The table header is used to populate the section header element values. The table rows are used to populate the section content element values. The section content band is repeated for each row in the table.


addButton

public String addButton(String form,
                        String name,
                        String text)
Add a form button to the report.

Parameters:
form - form name.
name - field name.
text - button text.
Returns:
element ID.

addButton

public String addButton(String form,
                        String name,
                        String script,
                        String text)
Add a form button to the report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
text - button text.
Returns:
element ID.

addImageButton

public String addImageButton(String form,
                             String name,
                             String resource)
Add a form image button to the report.

Parameters:
form - form name.
name - field name.
resource - image resource name.
Returns:
element ID.

addImageButton

public String addImageButton(String form,
                             String name,
                             String script,
                             String resource)
Add a form image button to the report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
resource - image resource name.
Returns:
element ID.

addCheckBox

public String addCheckBox(String form,
                          String name,
                          String text,
                          boolean selected)
Add a checkbox to the report.

Parameters:
form - form name.
name - field name.
text - checkbox label.
selected - true if the default is selected.
Returns:
element ID.

addCheckBox

public String addCheckBox(String form,
                          String name,
                          String script,
                          String text,
                          boolean selected)
Add a checkbox to the report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
text - checkbox label.
selected - true if the default is selected.
Returns:
element ID.

addRadioButton

public String addRadioButton(String form,
                             String name,
                             String text,
                             boolean selected,
                             String group)
Add a radio button to the report.

Parameters:
form - form name.
name - field name.
text - button label.
selected - true if the default is selected.
group - radio button group name.
Returns:
element ID.

addRadioButton

public String addRadioButton(String form,
                             String name,
                             String script,
                             String text,
                             boolean selected,
                             String group)
Add a radio button to the report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
text - button label.
selected - true if the default is selected.
group - radio button group name.
Returns:
element ID.

addChoiceElement

public String addChoiceElement(String form,
                               String name,
                               String selected,
                               String[] choices)
Add a choice field to the report.

Parameters:
form - form name.
name - field name.
selected - the default selected item.
choices - the list of choices.
Returns:
element ID.

addChoiceElement

public String addChoiceElement(String form,
                               String name,
                               String script,
                               String selected,
                               String[] choices)
Add a choice field to the report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
selected - the default selected item.
choices - the list of choices.
Returns:
element ID.

addListElement

public String addListElement(String form,
                             String name,
                             String[] selected,
                             String[] choices)
Add a list field to the report.

Parameters:
form - form name.
name - field name.
selected - the default selected item.
choices - the list of choices.
Returns:
element ID.

addListElement

public String addListElement(String form,
                             String name,
                             String script,
                             String[] selected,
                             String[] choices)
Add a list field to the report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
selected - the default selected item.
choices - the list of choices.
Returns:
element ID.

addTextField

public String addTextField(String form,
                           String name,
                           String text,
                           int cols)
Add a textfield to a report.

Parameters:
form - form name.
name - field name.
text - default text.
cols - number of columns.
Returns:
element ID.

addTextField

public String addTextField(String form,
                           String name,
                           String script,
                           String text,
                           int cols)
Add a textfield to a report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
text - default text.
cols - number of columns.
Returns:
element ID.

addDateCombo

public String addDateCombo(String form,
                           String name,
                           Date date)
Add a date combobox to a report.

Parameters:
form - form name.
name - field name.
date - default date.
Returns:
element ID.

addDateCombo

public String addDateCombo(String form,
                           String name,
                           String script,
                           Date date)
Add a date combobox to a report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
date - default date.
Returns:
element ID.

addTextArea

public String addTextArea(String form,
                          String name,
                          String text,
                          int rows,
                          int cols)
Add a textarea to a report.

Parameters:
form - form name.
name - field name.
text - default text.
rows - number of rows.
cols - number of columns.
Returns:
element ID.

addTextArea

public String addTextArea(String form,
                          String name,
                          String script,
                          String text,
                          int rows,
                          int cols)
Add a textarea to a report.

Parameters:
form - form name.
name - field name.
script - onSubmit java script.
text - default text.
rows - number of rows.
cols - number of columns.
Returns:
element ID.

addElement

public String addElement(ReportElement e)
Add an element to the document. Classes extending the StyleSheet can extend element classes from the Element, and use this method for adding the element to the document.

Parameters:
e - document element.
Returns:
element id.

getElementCount

public int getElementCount()
Return the number of elements in the document.

Returns:
number of elements.

getElement

public ReportElement getElement(int idx)
Get the specified element.

Parameters:
idx - element index.
Returns:
document element.

getElementIndex

public int getElementIndex(ReportElement e)
Get the index of the specified element.

Parameters:
e - element.
Returns:
element index.

removeElement

public void removeElement(int idx)
Remove the specified element.

Parameters:
idx - element index.

removeElement

public void removeElement(String id)
Remove the specified element.

Specified by:
removeElement in class ReportSheet
Parameters:
id - element id in string format.

replaceElement

protected void replaceElement(int idx,
                              ReportElement e)
Replace the specified element.

Parameters:
idx - element id in string format.

replaceElement

protected void replaceElement(String id,
                              ReportElement e)
Replace the specified element.

Specified by:
replaceElement in class ReportSheet
Parameters:
id - element id in string format.

moveElement

public void moveElement(String id,
                        int direction)
Move element up or down.

Specified by:
moveElement in class ReportSheet
Parameters:
id - element id in string format.
direction - move direction, up or down.

insertElement

public String insertElement(int idx,
                            ReportElement e)
Insert the element at specified position (before).

Parameters:
idx - position to insert.
e - element.
Returns:
element ID.

getAllElements

public Vector getAllElements()
Get all elements in the report, including body, and non-flow area elements.

Specified by:
getAllElements in class inetsoft.report.internal.StyleCore
Returns:
vector of all elements.

printNext

public boolean printNext(StylePage pg)
Print one page. Return true if more contents need to be printed. Normally print(PrintJob) should be used for printing. This function is used by print() to print individual pages.

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.

Specified by:
printNext in class ReportSheet
Parameters:
pg - style page.

getNextOrientation

public Integer getNextOrientation()
Get the page orientation for the next page. The page orientation can be changed in middle of a report by setting it in PageLayout for StyleSheet, or setting the row orientation in a TabularSheet.

Overrides:
getNextOrientation in class ReportSheet
Returns:
the next page orientation. Null if using default orientation.

printNextPage

public boolean printNextPage(StylePage pg)
Print the next page. It may be called to print from a middle of of page provided the printBox is setup correctly before the call.

Specified by:
printNextPage in class ReportSheet

removeContents

protected void removeContents()
Remove all elements from the contents.

Specified by:
removeContents in class ReportSheet

resetContents

protected void resetContents()
Reset all elemnts in the contents.

Specified by:
resetContents in class ReportSheet

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Make a copy of this report.

Overrides:
clone in class ReportSheet

clone

public Object clone(boolean deep)
Make a copy of this report.

Overrides:
clone in class ReportSheet

copyStyleSheet

protected void copyStyleSheet(StyleSheet that,
                              boolean flag)
Copy this report to that report.

Parameters:
that - the report copied to.
flag - if true flag all copied elements as from template.

copyStyleSheet

protected void copyStyleSheet(StyleSheet that,
                              boolean flag,
                              boolean deep)
Copy this report to that report.

Parameters:
that - report the report copied to.
flag - if true flag all copied elements as from template.

requestNewPage

public void requestNewPage()
Request a new page.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.