Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.6.0)

E12063-07

oracle.dss.dataView
Interface UIViewPrinter

All Known Implementing Classes:
GraphPrinter, ViewPrinter

public interface UIViewPrinter


Field Summary
static int ABOVE_FOOTER
          Position for line.
static int ADJUST_FOR_HEADERS_AND_FOOTERS
          Margin adjustment: When headers or footers do not fit in the specified margin, the margins are enlarged so that the headers or footers fit.
static int ALL_LOGICAL_PAGES
          Range type: Print all the logical pages in the view.
static int BELOW_HEADER
          Position for line.
static int BOTTOM_FORMATTED_TEXT_AREA
          ID for dataView bottom FormattedTextArea.
static int CROSSTAB_PRINTER
           
static int CURRENT_LOGICAL_PAGE
          Range type: Print only the current logical page of the view.
static int FOOTER_CENTER
          The center footer.
static int FOOTER_LEFT
          The left footer.
static int FOOTER_RIGHT
          The right footer.
static int FOOTNOTE
          ID for dataView footnote.
static int GRAPH_PRINTER
           
static int GRIDVIEW_COLUMN_HEADER
          ID for GridView column header.
static int GRIDVIEW_ROW_HEADER
          ID for GridView row header.
static int HEADER_CENTER
          The center header.
static int HEADER_LEFT
          The left header.
static int HEADER_RIGHT
          The right header.
static int HEADERS_AND_FOOTERS_ALL
          All headers and footers.
static int HEADERS_AND_FOOTERS_NONE
          No headers or footers.
static int IGNORE_HEADERS_AND_FOOTERS
          Margin adjustment: When headers or footers do not fit in the specified margin, they are printed over the view in the printable area.
static int OCCLUDE_HEADERS_AND_FOOTERS
          Margin adjustment: When headers or footers do not fit in the specified margin, the margins are unchanged.
static int ORIGINAL_SIZE
          Print scale type: Print the view at its current size.
static int PAGE_HEADER
          ID for page header.
static int SCALE_TO_FIT_FULL_PAGE
          Print scale type: Print the graph so that it fills the entire physical page.
static int SCALE_TO_FIT_PAGE
          Print scale type: Print the graph so that it fills the physical page, keeping its on-screen proportions.
static int SCALE_TO_FIT_PAGES
          Print scale type: Scale the view to fit on the specified numbers of pages.
static int SCALE_TO_ZOOM_FACTOR
          Print scale type: Scale the view according to the PrintZoomFactor property of this ViewPrinter.
static int SELECTED_LOGICAL_PAGES
          Range type: Print selected logical pages in the view.
static int SUBTITLE
          ID for dataView subtitle.
static int TABLE_PRINTER
           
static int TEXT_COMPONENTS_ALL
          Font scale property: Print the graph so that it scales the original font sizes of all text components according to on-screen proportions.
static int TEXT_COMPONENTS_NONE
          Font scale property: Print the graph so that it preserves the original font sizes of all text components.
static int TITLE
          ID for dataView title.
static int TOP_FORMATTED_TEXT_AREA
          ID for dataView top FormattedTextArea.
static int UNIT_CM
           
static int UNIT_INCHES
           
static int UNIT_PIXELS
           
static int WORKSHEET_WITH_CROSSTAB_AND_GRAPH_PRINTER
           
static int WORKSHEET_WITH_CROSSTAB_PRINTER
           
static int WORKSHEET_WITH_GRAPH_PRINTER
           
static int WORKSHEET_WITH_TABLE_AND_GRAPH_PRINTER
           
static int WORKSHEET_WITH_TABLE_PRINTER
           
 
Method Summary
 void endPrint()
          Sets the view back to its original state.
 int getBottomMargin()
          Retrieves the height of the bottom margin of printed physical pages.
 java.awt.Cursor getDefaultCursor()
           
 int getFitToNumPagesTall()
          Retrieves the number of physical pages on which a printed view is required to fit vertically.
 int getFitToNumPagesWide()
          Retrieves the number of physical pages on which a printed view is required to fit horizontally.
 int getFooterMargin()
          Retrieves the height of the footer margin.
 int getGraphPrintScaleType()
          Retrieves information about how the DataView is scaled for printing.
 int getGridViewPrintScaleType()
          Retrieves information about how the DataView is scaled for printing.
 HeaderAndFooterPainter getHeaderAndFooterPainter(int headerOrFooterID)
          Retrieves a header or footer painter.
 int getHeaderMargin()
          Retrieves the height of the header margin.
 int getLeftMargin()
          Retrieves the left margin of printed physical pages.
 int getLineWidth(int position)
          Retrieves the width of the line printed at the given position.
 java.util.Locale getLocale()
          Retrives the locale of the View to be printed by this UIViewPrinter
 java.awt.print.PageFormat getPageFormat()
          Retrieves the PageFormat object that specifies the paper size for this ViewPrinter.
 int getPrintZoomFactor()
          Retrieves the zoom factor for printing.
 int getRangeType()
          Retrieves information about how much of the view will be printed.
 int getRightMargin()
          Retrieves the width of the right margin of printed physical pages.
 int getScaleFontSize()
          Retrieves the text components to resize when a graph is scaled to a different size for printing.
 java.util.Vector getSelectedHPos()
          Retrieves the hierarchical addresses of the logical pages to print, when RangeType is set to SELECTED_LOGICAL_PAGES.
 int getSequentialPageNumber()
           
 TokenSubstitution getTokenSubstitution()
          Retrieves the handler for token substitution in this ViewPrinter.
 int getTopMargin()
          Retrieves the height of the top margin of printed physical pages.
 int getUnits()
          Retrieves the unit value: UNIT_PIXEL, UNIT_INCHES, UNIT_CM.
 java.awt.Dimension getViewDimension()
           
 int getViewPrinterType()
          Retrieves the type of ViewPrinter.
 java.awt.Cursor getWaitCursor()
           
 boolean goToFirstPage(java.awt.Graphics g)
           
 boolean goToLastPage(java.awt.Graphics g)
           
 boolean hasNextPage()
          Indicates whether the view has a physical page after the current physical page.
 boolean hasPrevPage()
          Indicates whether the view has a physical page before the current physical page.
 boolean isDataviewFootnoteVisible()
          Indicates if DataviewFootnote is visble in the View to be printed.
 boolean isDataviewSubtitleVisible()
          Indicates if DataviewSubtitle is visble in the View to be printed.
 boolean isDataviewTitleVisible()
          Indicates if DataviewTitle is visble in the View to be printed.
 boolean isFirstPhysicalPage()
           
 boolean isGridlinesVisible()
          Indicates whether gridlines appear in a printed GridView.
 boolean isLastPhysicalPage()
           
 boolean isPrintByColumns()
          Indicates whether physical pages are printed by rows (left-to-right then top-to-bottom) or by columns(top-to-bottom then left-to-right).
 boolean isRepeatComponent(int component)
          Indicates whether the component is displayed on every physical page, when a table or crosstab is printed on multiple physical pages.
 boolean prepareFirstPage(java.awt.Graphics g)
          Prepares the first physical page in the view for printing and makes it the current page to print.
 boolean prepareNextPage(java.awt.Graphics g)
          Prepares the next physical page for printing and makes it the current page to print.
 boolean preparePrevPage(java.awt.Graphics g)
          Prepares the previous physical page for printing and makes it the current page to print.
 boolean renderFirstPage(java.awt.Graphics g)
           
 boolean renderLastPage(java.awt.Graphics g)
           
 boolean renderPage(java.awt.Graphics g)
           
 void setBottomMargin(int mrgn)
          Specifies the height of the bottom margin of printed physical pages.
 void setFitToNumPagesTall(int num)
          Specifies the number of physical pages on which to fit a printed view vertically.
 void setFitToNumPagesWide(int num)
          Specifies the number of physical pages on which to fit a printed view horizontally.
 void setFooterMargin(int mrgn)
          Specifies the height of the footer margin.
 void setGraphPrintScaleType(int type)
          Specifies how to scale the DataView for printing.
 void setGridlinesVisible(boolean visible)
          Specifies whether gridlines appear in a printed GridView.
 void setGridViewPrintScaleType(int type)
          Specifies how to scale the DataView for printing.
 void setHeaderMargin(int mrgn)
          Specifies the height of the header margin.
 void setLeftMargin(int mrgn)
          Specifies the width of left margin of printed physical pages.
 void setLineWidth(int position, int width)
          Specifies the width of the line to be printed at the given position.
 void setPageFormat(java.awt.print.PageFormat pf)
          Specifies the PageFormat object that specifies paper size for this ViewPrinter.
 void setPrintByColumns(boolean byColumns)
          Specifies whether physical pages are printed by columns (left-to-right then top-to-bottom) or by rows(top-to-bottom then left-to-right).
 void setPrintZoomFactor(int zoom)
          Specifies the zoom factor for printing.
 void setRangeType(int type)
          Specifies whether to print the current logical page or all logical pages.
 void setRepeatComponent(int component, boolean repeat)
          Specifies whether to repeat the component on every physical page, when a table or crosstab is printed on multiple physical pages.
 void setRightMargin(int mrgn)
          Specifies the width of the right margin of printed physical pages.
 void setScaleFontSize(int mask)
          Specifies text components to resize when a graph is scaled to a different size for printing.
 void setSelectedHPos(java.util.Vector printHPos)
          Specifies logical pages to print, when the RangeType is SELECTED_LOGICAL_PAGES.
 void setSequentialPageNumber(int pageNum)
           
 void setTokenSubstitution(TokenSubstitution token)
          Specifies a handler for token substitution in this ViewPrinter.
 void setTopMargin(int mrgn)
          Specifies the height of the top margin of printed physical pages.
 void setUnits(int iUnit)
          Specifies which unit value to use: UNIT_PIXEL, UNIT_INCHES, UNIT_CM..
 boolean startPrint(boolean bPreviewMode)
          Puts the view in a state for printing.
 

Field Detail

CROSSTAB_PRINTER

static final int CROSSTAB_PRINTER
See Also:
Constant Field Values

TABLE_PRINTER

static final int TABLE_PRINTER
See Also:
Constant Field Values

GRAPH_PRINTER

static final int GRAPH_PRINTER
See Also:
Constant Field Values

WORKSHEET_WITH_TABLE_PRINTER

static final int WORKSHEET_WITH_TABLE_PRINTER
See Also:
Constant Field Values

WORKSHEET_WITH_CROSSTAB_PRINTER

static final int WORKSHEET_WITH_CROSSTAB_PRINTER
See Also:
Constant Field Values

WORKSHEET_WITH_GRAPH_PRINTER

static final int WORKSHEET_WITH_GRAPH_PRINTER
See Also:
Constant Field Values

WORKSHEET_WITH_CROSSTAB_AND_GRAPH_PRINTER

static final int WORKSHEET_WITH_CROSSTAB_AND_GRAPH_PRINTER
See Also:
Constant Field Values

WORKSHEET_WITH_TABLE_AND_GRAPH_PRINTER

static final int WORKSHEET_WITH_TABLE_AND_GRAPH_PRINTER
See Also:
Constant Field Values

CURRENT_LOGICAL_PAGE

static final int CURRENT_LOGICAL_PAGE
Range type: Print only the current logical page of the view.

See Also:
Constant Field Values

ALL_LOGICAL_PAGES

static final int ALL_LOGICAL_PAGES
Range type: Print all the logical pages in the view.

See Also:
Constant Field Values

SELECTED_LOGICAL_PAGES

static final int SELECTED_LOGICAL_PAGES
Range type: Print selected logical pages in the view. To specify the range to print, call the setSelectedHPos method.

See Also:
setSelectedHPos(java.util.Vector), Constant Field Values

ORIGINAL_SIZE

static final int ORIGINAL_SIZE
Print scale type: Print the view at its current size. When you set PrintScaleType to this value, the view is printed at its current size, as determined by its ZoomFactor property.

See Also:
Constant Field Values

SCALE_TO_ZOOM_FACTOR

static final int SCALE_TO_ZOOM_FACTOR
Print scale type: Scale the view according to the PrintZoomFactor property of this ViewPrinter. When you set PrintScaleType to this value, you must also call setPrintZoomFactor to specify the scale for printing.

If you use the printPage method to print, and you use this scale type, then set the margins to 0 before you call the startPrint method.

See Also:
#setPrintScaleType, setPrintZoomFactor(int), Constant Field Values

SCALE_TO_FIT_PAGES

static final int SCALE_TO_FIT_PAGES
Print scale type: Scale the view to fit on the specified numbers of pages. When you set PrintScaleType to this value, you must also call setFitToNumPagesTall and setFitToNumPagesWide to specify the number of pages on which you want the view to fit.

This value does not work in a GraphPrinter. If you use it, the graph will be printed at its original size.

If you use the printPage method to print, and you use this scale type, then set the margins to 0 before you call the startPrint method.

See Also:
#setPrintScaleType, setFitToNumPagesTall(int), setFitToNumPagesWide(int), Constant Field Values

SCALE_TO_FIT_FULL_PAGE

static final int SCALE_TO_FIT_FULL_PAGE
Print scale type: Print the graph so that it fills the entire physical page. The graph might not have the same proportions that it has on screen.

If you use the printPage method to print, and you use this scale type, then set the margins to 0 before you call the startPrint method.

See Also:
Constant Field Values

SCALE_TO_FIT_PAGE

static final int SCALE_TO_FIT_PAGE
Print scale type: Print the graph so that it fills the physical page, keeping its on-screen proportions.

If you use the printPage method to print, and you use this scale type, then set the margins to 0 before you call the startPrint method.

See Also:
Constant Field Values

TEXT_COMPONENTS_ALL

static final int TEXT_COMPONENTS_ALL
Font scale property: Print the graph so that it scales the original font sizes of all text components according to on-screen proportions.

See Also:
Constant Field Values

TEXT_COMPONENTS_NONE

static final int TEXT_COMPONENTS_NONE
Font scale property: Print the graph so that it preserves the original font sizes of all text components.

See Also:
Constant Field Values

BELOW_HEADER

static final int BELOW_HEADER
Position for line. Used by set/getLineWidth() method.

See Also:
Constant Field Values

ABOVE_FOOTER

static final int ABOVE_FOOTER
Position for line. Used by set/getLineWidth() method.

See Also:
Constant Field Values

GRIDVIEW_COLUMN_HEADER

static final int GRIDVIEW_COLUMN_HEADER
ID for GridView column header.

See Also:
Constant Field Values

GRIDVIEW_ROW_HEADER

static final int GRIDVIEW_ROW_HEADER
ID for GridView row header.

See Also:
Constant Field Values

PAGE_HEADER

static final int PAGE_HEADER
ID for page header.

See Also:
Constant Field Values

TITLE

static final int TITLE
ID for dataView title.

See Also:
Constant Field Values

SUBTITLE

static final int SUBTITLE
ID for dataView subtitle.

See Also:
Constant Field Values

FOOTNOTE

static final int FOOTNOTE
ID for dataView footnote.

See Also:
Constant Field Values

TOP_FORMATTED_TEXT_AREA

static final int TOP_FORMATTED_TEXT_AREA
ID for dataView top FormattedTextArea.

See Also:
Constant Field Values

BOTTOM_FORMATTED_TEXT_AREA

static final int BOTTOM_FORMATTED_TEXT_AREA
ID for dataView bottom FormattedTextArea.

See Also:
Constant Field Values

HEADER_LEFT

static final int HEADER_LEFT
The left header.

See Also:
Constant Field Values

HEADER_CENTER

static final int HEADER_CENTER
The center header.

See Also:
Constant Field Values

HEADER_RIGHT

static final int HEADER_RIGHT
The right header.

See Also:
Constant Field Values

FOOTER_LEFT

static final int FOOTER_LEFT
The left footer.

See Also:
Constant Field Values

FOOTER_CENTER

static final int FOOTER_CENTER
The center footer.

See Also:
Constant Field Values

FOOTER_RIGHT

static final int FOOTER_RIGHT
The right footer.

See Also:
Constant Field Values

HEADERS_AND_FOOTERS_ALL

static final int HEADERS_AND_FOOTERS_ALL
All headers and footers.

See Also:
#setHeadersAndFootersUsingCallback, Constant Field Values

HEADERS_AND_FOOTERS_NONE

static final int HEADERS_AND_FOOTERS_NONE
No headers or footers.

See Also:
#setHeadersAndFootersUsingCallback, Constant Field Values

IGNORE_HEADERS_AND_FOOTERS

static final int IGNORE_HEADERS_AND_FOOTERS
Margin adjustment: When headers or footers do not fit in the specified margin, they are printed over the view in the printable area.

See Also:
Constant Field Values

ADJUST_FOR_HEADERS_AND_FOOTERS

static final int ADJUST_FOR_HEADERS_AND_FOOTERS
Margin adjustment: When headers or footers do not fit in the specified margin, the margins are enlarged so that the headers or footers fit. The printable area becomes smaller.

See Also:
Constant Field Values

OCCLUDE_HEADERS_AND_FOOTERS

static final int OCCLUDE_HEADERS_AND_FOOTERS
Margin adjustment: When headers or footers do not fit in the specified margin, the margins are unchanged. The part of the header or footer that does not fit in the margin is not visible. It is occluded by the view in the printable area.

See Also:
Constant Field Values

UNIT_PIXELS

static final int UNIT_PIXELS
See Also:
Constant Field Values

UNIT_INCHES

static final int UNIT_INCHES
See Also:
Constant Field Values

UNIT_CM

static final int UNIT_CM
See Also:
Constant Field Values
Method Detail

getViewPrinterType

int getViewPrinterType()
Retrieves the type of ViewPrinter.

Returns:
A constant that represents the specific type of ViewPrinter.
See Also:
CROSSTAB_PRINTER, TABLE_PRINTER, GRAPH_PRINTER, #WORKSHEET_PRINTER

setLeftMargin

void setLeftMargin(int mrgn)
Specifies the width of left margin of printed physical pages. When the entire page is available for printing a view, then the margin should be at least 18 pixels wide, to prevent the view from being cropped around the edges by the printer device. Remember that large margins reduce the printing area for the view. This method does not impose limits on the margin size. By default, the margin is 72 pixels.

This method has no effect when you use the printPage method to print.

Parameters:
mrgn - The width of the left margin, pixels.

getLeftMargin

int getLeftMargin()
Retrieves the left margin of printed physical pages. By default, the margin is 72 pixels.

Returns:
The width of the left margin, in pixels.

setRightMargin

void setRightMargin(int mrgn)
Specifies the width of the right margin of printed physical pages. When the entire page is available for printing a view, then the margin should be at least 18 pixels wide, to prevent the view from being cropped around the edges by the printer device. Remember that large margins reduce the printing area for the view. This method does not impose limits on the margin size. By default, the margin is 72 pixels.

This method has no effect when you use the printPage method to print.

Parameters:
mrgn - The width of the right margin, in pixels.

getRightMargin

int getRightMargin()
Retrieves the width of the right margin of printed physical pages. By default, the margin is 72 pixels.

Returns:
The width of the right margin, in pixels.

setTopMargin

void setTopMargin(int mrgn)
Specifies the height of the top margin of printed physical pages. When the entire page is available for printing a view, then the margin should be at least 18 pixels high, to prevent the view from being cropped around the edges by the printer device. Remember that large margins reduce the printing area for the view. This method does not impose limits on the margin size. By default, the margin is 72 pixels.

This method has no effect when you use the printPage method to print.

Parameters:
mrgn - The height of the top margin, in pixels.

getTopMargin

int getTopMargin()
Retrieves the height of the top margin of printed physical pages. By default, the margin is 72 pixels.

Returns:
The height of the top margin, in pixels.

setBottomMargin

void setBottomMargin(int mrgn)
Specifies the height of the bottom margin of printed physical pages. When the entire page is available for printing a view, then the margin should be at least 18 pixels high, to prevent the view from being cropped around the edges by the printer device. Remember that large margins reduce the printing area for the view. This method does not impose limits on the margin size. By default, the margin is 72 pixels.

This method has no effect when you use the printPage method to print.

Parameters:
mrgn - The height of the bottom margin, in pixels.

getBottomMargin

int getBottomMargin()
Retrieves the height of the bottom margin of printed physical pages. By default, the margin is 72 pixels.

Returns:
The height of the bottom margin, in pixels.

setHeaderMargin

void setHeaderMargin(int mrgn)
Specifies the height of the header margin. When the entire page is available for printing a view, then the margin should be at least 18 pixels high, to prevent the view from being cropped around the edges by the printer device. This method does not impose limits on the margin size. By default, the margin is 18 pixels.

This method has no effect when you use the printPage method to print.

Parameters:
mrgn - The height of the header margin, in pixels.

getHeaderMargin

int getHeaderMargin()
Retrieves the height of the header margin. By default, the margin is 18 pixels.

Returns:
The height of the header margin, in pixels.

setFooterMargin

void setFooterMargin(int mrgn)
Specifies the height of the footer margin. When the entire page is available for printing a view, then the margin should be at least 18 pixels high, to prevent the view from being cropped around the edges by the printer device. This method does not impose limits on the margin size. By default, the margin is 18 pixels.

This method has no effect when you use the printPage method to print.

Parameters:
mrgn - The height of the footer margin, in pixels.

getFooterMargin

int getFooterMargin()
Retrieves the height of the footer margin. By default, the margin is 18 pixels.

Returns:
The height of the footer margin, in pixels.

setPrintZoomFactor

void setPrintZoomFactor(int zoom)
Specifies the zoom factor for printing. The print zoom factor is the amount by which the DataView is enlarged or reduced for printing. The value of the PrintZoomFactor property takes effect only when the PrintScaleType property is set to SCALE_TO_ZOOM_FACTOR.

By default, the view is printed at full size (100 percent).

Parameters:
zoom - The percentage at which to print the view. This methods logs an error if the value is less than 10.
See Also:
#setPrintScaleType

getPrintZoomFactor

int getPrintZoomFactor()
Retrieves the zoom factor for printing. The print zoom factor is the amount by which the DataView is enlarged or reduced for printing. The value of the PrintZoomFactor property takes effect only when the PrintScaleType property is set to SCALE_TO_ZOOM_FACTOR.

By default, the view is printed at full size (100 percent).

Returns:
The percentage at which the view will be printed.
See Also:
#setPrintScaleType

setGraphPrintScaleType

void setGraphPrintScaleType(int type)
Specifies how to scale the DataView for printing. By default, the view is printed at its original size.

Parameters:
type - A constant that indicates how to scale the DataView for printing. Constants are listed in the See Also section.
See Also:
ORIGINAL_SIZE, ViewPrinter.SCALE_TO_FIT_PAGE, ViewPrinter.SCALE_TO_FIT_FULL_PAGE

getGraphPrintScaleType

int getGraphPrintScaleType()
Retrieves information about how the DataView is scaled for printing.

Returns:
A constant that indicates how the DataView is scaled for printing. Constants are listed in the See Also section.
See Also:
ORIGINAL_SIZE, ViewPrinter.SCALE_TO_FIT_PAGE, ViewPrinter.SCALE_TO_FIT_FULL_PAGE

setGridViewPrintScaleType

void setGridViewPrintScaleType(int type)
Specifies how to scale the DataView for printing. By default, the view is printed at its original size.

Parameters:
type - A constant that indicates how to scale the DataView for printing. Constants are listed in the See Also section.
See Also:
ORIGINAL_SIZE, SCALE_TO_FIT_PAGES, SCALE_TO_ZOOM_FACTOR

getGridViewPrintScaleType

int getGridViewPrintScaleType()
Retrieves information about how the DataView is scaled for printing.

Returns:
A constant that indicates how the DataView is scaled for printing. Constants are listed in the See Also section.
See Also:
ORIGINAL_SIZE, SCALE_TO_FIT_PAGES, SCALE_TO_ZOOM_FACTOR

setFitToNumPagesTall

void setFitToNumPagesTall(int num)
Specifies the number of physical pages on which to fit a printed view vertically. This method does nothing in a GraphPrinter.

For example, suppose that you have a crosstab that has four columns and 40 rows. Suppose that this crosstab would normally print on two sheets of paper, the first 30 rows on page 1 and the remainder on page 2. You could set FitToNumPagesTall to 1 in order to reduce the printed size of the crosstab so that all 40 rows are printed on one sheet of paper.

The view is scaled to fit the number of pages that you specify only when the PrintScaleType property is set to SCALE_TO_FIT_PAGES.

Parameters:
num - The number of pages on which the view should fit vertically.
See Also:
#setPrintScaleType

getFitToNumPagesTall

int getFitToNumPagesTall()
Retrieves the number of physical pages on which a printed view is required to fit vertically. The view is scaled to fit the returned number of pages only when the PrintScaleType property is set to SCALE_TO_FIT_PAGES.

Returns:
The number of pages on which the view is required to fit vertically.
See Also:
#setPrintScaleType

setFitToNumPagesWide

void setFitToNumPagesWide(int num)
Specifies the number of physical pages on which to fit a printed view horizontally. This method does nothing in a GraphPrinter.

For example, suppose you have a crosstab that has 20 columns and 10 rows. Suppose that this crosstab would normally print on two sheets of paper, the first 12 columns on page 1 and the remainder on page 2. You could set FitToNumPagesWide to 1 in order to reduce the printed size of the crosstab so that all 20 columns are printed on one sheet of paper. The view is scaled to fit the number of pages that you specify only when the PrintScaleType property is set to SCALE_TO_FIT_PAGES.

Parameters:
num - The number of pages on which the view should fit horizontally.
See Also:
#setPrintScaleType

getFitToNumPagesWide

int getFitToNumPagesWide()
Retrieves the number of physical pages on which a printed view is required to fit horizontally. The view is scaled to fit the returned number of pages only when the PrintScaleType property is set to SCALE_TO_FIT_PAGES.

Returns:
The number of pages on which the view is required to fit horizontally.
See Also:
#setPrintScaleType

setGridlinesVisible

void setGridlinesVisible(boolean visible)
Specifies whether gridlines appear in a printed GridView. This method does nothing in a GraphPrinter.

Parameters:
visible - true to make gridlines appear in a printed GridView. false to hide gridlines.

isGridlinesVisible

boolean isGridlinesVisible()
Indicates whether gridlines appear in a printed GridView.

Returns:
true if gridlines appear in the GridView when it is printed, false if they do not appear.

setSelectedHPos

void setSelectedHPos(java.util.Vector printHPos)
Specifies logical pages to print, when the RangeType is SELECTED_LOGICAL_PAGES. Each logical page to print is specified as an HPos.

Parameters:
printHPos - A Vector that contains an HPos for each logical page that you want to print.
See Also:
SELECTED_LOGICAL_PAGES, setRangeType(int), DataAccess.getMemberHPos(int, int, int)

getSelectedHPos

java.util.Vector getSelectedHPos()
Retrieves the hierarchical addresses of the logical pages to print, when RangeType is set to SELECTED_LOGICAL_PAGES.

Returns:
A Vector that contains an HPos for each logical page to print.
See Also:
SELECTED_LOGICAL_PAGES, setRangeType(int), DataAccess.getMemberHPos(int, int, int)

setRangeType

void setRangeType(int type)
Specifies whether to print the current logical page or all logical pages.

This method works only when you use the print method or the renderPage method to print. To set the page to print when you use the printPage method to print, call setLogicalPage.

Parameters:
type - A constant that identifies how much of the view to print.
See Also:
ALL_LOGICAL_PAGES, CURRENT_LOGICAL_PAGE, SELECTED_LOGICAL_PAGES, #setLogicalPage

getRangeType

int getRangeType()
Retrieves information about how much of the view will be printed.

Returns:
A constant that identifies whether the current logical page or all logical pages will be printed.
See Also:
ALL_LOGICAL_PAGES, CURRENT_LOGICAL_PAGE, SELECTED_LOGICAL_PAGES

getHeaderAndFooterPainter

HeaderAndFooterPainter getHeaderAndFooterPainter(int headerOrFooterID)
Retrieves a header or footer painter. You set properties on the header or footer painter to specify what appears in the header or footer. There are three headers and three footers.

Parameters:
headerOrFooterID - A constant that specifies which header or footer painter you want.
Returns:
The painter for the specified header or footer.
See Also:
HEADER_LEFT, HEADER_CENTER, HEADER_RIGHT, FOOTER_LEFT, FOOTER_CENTER, FOOTER_RIGHT

setPrintByColumns

void setPrintByColumns(boolean byColumns)
Specifies whether physical pages are printed by columns (left-to-right then top-to-bottom) or by rows(top-to-bottom then left-to-right).

For example, suppose that you have a table that has 30 rows and 20 columns, and that 15 rows and 10 columns can fit on a printed sheet of paper. When PrintByColumns is true (the default), then the pages are printed as follows:

When PrintByColumns is false, then the pages are printed as follows:

This method does nothing in a GraphPrinter.

Parameters:
byRows - true if physical pages are printed by columns, false if physical pages are printed by rows.

isPrintByColumns

boolean isPrintByColumns()
Indicates whether physical pages are printed by rows (left-to-right then top-to-bottom) or by columns(top-to-bottom then left-to-right). This method does nothing in a GraphPrinter.

Returns:
true if physical pages are printed by columns, false if physical pages are printed by rows.

startPrint

boolean startPrint(boolean bPreviewMode)
Puts the view in a state for printing. This method saves the original state of the view, then it applies printing properties to the view. It displays the offscreen image (which has the snapshot of the view) on the screen, so that any modifications done to the view during printing will not be seen.

Use this method, with the renderPage method, when you preview a table or crosstab. Passing true in the bPreviewMode parameter allows this ViewPrinter to cache information to improve performance.

Calls to the print method belong between calls to startPrint and endPrint.

Parameters:
bPreviewMode - true if you are previewing the print job, false if you are actually sending the print job to a printer.
Returns:
true if the print job starts successfully, false if the data in the view is not available to this ViewPrinter.
See Also:
endPrint(), #print, renderPage(java.awt.Graphics), GraphPrinter.printPage(Graphics), oracle.dss.crosstab.CrosstabPrinter#printPage, oracle.dss.crosstab.CrosstabPrinter#printPage(Graphics, DataSubsetRecord), oracle.dss.table.TablePrinter#printPage(Graphics), oracle.dss.table.TablePrinter#printPage(Graphics, DataSubsetRecord)

endPrint

void endPrint()
Sets the view back to its original state. This method removes the offscreen image that the startPrint method displays, and restores the active display of the view.

Calls to the print method belong between calls to startPrint and endPrint.

See Also:
startPrint(boolean), #print, renderPage(java.awt.Graphics), oracle.dss.crosstab.CrosstabPrinter#printPag, GraphPrinter.printPage(Graphics)e, oracle.dss.crosstab.CrosstabPrinter#printPage(Graphics, DataSubsetRecord), oracle.dss.table.TablePrinter#printPage(Graphics), oracle.dss.table.TablePrinter#printPage(Graphics, DataSubsetRecord)

setRepeatComponent

void setRepeatComponent(int component,
                        boolean repeat)
Specifies whether to repeat the component on every physical page, when a table or crosstab is printed on multiple physical pages. A logical page of a graph always prints to a single physical page, so this method has no effect in a graph.

Parameters:
component - A constant that represents the components. Valid constants are listed in the See Also section.
repeat - true to repeat component, false to prevent repeating.
See Also:
ViewPrinter.GRIDVIEW_COLUMN_HEADER, ViewPrinter.GRIDVIEW_ROW_HEADER, ViewPrinter.PAGE_HEADER, ViewPrinter.TITLE, ViewPrinter.SUBTITLE, ViewPrinter.FOOTNOTE, ViewPrinter#FTA1, ViewPrinter#FTA2

isRepeatComponent

boolean isRepeatComponent(int component)
Indicates whether the component is displayed on every physical page, when a table or crosstab is printed on multiple physical pages. A logical page of a graph always prints to a single physical page, so this method always returns false in a GraphPrinter.

Parameters:
component - A constant that represents the components. Valid constants are listed in the See Also section.
Returns:
true if the component appears on each page, false if they do not.
See Also:
ViewPrinter.GRIDVIEW_COLUMN_HEADER, ViewPrinter.GRIDVIEW_ROW_HEADER, ViewPrinter.PAGE_HEADER, ViewPrinter.TITLE, ViewPrinter.SUBTITLE, ViewPrinter.FOOTNOTE, ViewPrinter#FTA1, ViewPrinter#FTA2

renderPage

boolean renderPage(java.awt.Graphics g)

prepareFirstPage

boolean prepareFirstPage(java.awt.Graphics g)
Prepares the first physical page in the view for printing and makes it the current page to print. Call this method before you call renderPage to print. Call this method before you call any of the other methods for changing pages. Call this method, even if you only print one physical page. This method performs initialization for printing.

Parameters:
g - The Graphics object to which to print the page.
Returns:
true if the call is successful, false if the first physical page has no data.
See Also:
renderPage(java.awt.Graphics), hasNextPage(), prepareNextPage(java.awt.Graphics)

prepareNextPage

boolean prepareNextPage(java.awt.Graphics g)
Prepares the next physical page for printing and makes it the current page to print. Use this method when you use renderPage to print. Unless you are certain that there is a next page, you should call hasNextPage before you call this method. Also, before calling this method, call prepareFirstPage.

Parameters:
g - The Graphics object to which to print the page.
Returns:
true if the call is successful, false if the next physical page has no data.
See Also:
renderPage(java.awt.Graphics), prepareFirstPage(java.awt.Graphics), hasNextPage()

setScaleFontSize

void setScaleFontSize(int mask)
Specifies text components to resize when a graph is scaled to a different size for printing.

Parameters:
mask - A constant that represents the set of components to scale with the graph. The constants are listed in the See Also section.
See Also:
GraphConstants.TEXT_COMPONENTS_ALL, GraphConstants.TEXT_COMPONENTS_NONE

getScaleFontSize

int getScaleFontSize()
Retrieves the text components to resize when a graph is scaled to a different size for printing.

Returns:
A constant that represents which text components should be resized when the Graph is scaled to a different size for printing. The constants are listed in the See Also section.
See Also:
GraphConstants.TEXT_COMPONENTS_ALL, GraphConstants.TEXT_COMPONENTS_NONE

preparePrevPage

boolean preparePrevPage(java.awt.Graphics g)
Prepares the previous physical page for printing and makes it the current page to print. Use this method when you use renderPage to print. Unless you are certain that there is a previous page, you should call hasPrevPage before you call this method. Also, before calling this method, call prepareFirstPage.

Parameters:
g - The Graphics object to which to print the page.
Returns:
true if the call is successful, false if the previous physical page has no data.
See Also:
renderPage(java.awt.Graphics), prepareFirstPage(java.awt.Graphics), hasPrevPage()

hasNextPage

boolean hasNextPage()
Indicates whether the view has a physical page after the current physical page. Use this method when you use renderPage to print. Call this method before you call prepareNextPage.

Returns:
true if the view has another physical page after the current page, false if the current physical page is the last physical page.
See Also:
renderPage(java.awt.Graphics), prepareNextPage(java.awt.Graphics)

hasPrevPage

boolean hasPrevPage()
Indicates whether the view has a physical page before the current physical page. Use this method when you use renderPage to print. Call this method before you call preparePrevPage.

Returns:
true if the view has another physical page before the current page, false if the current physical page is the first physical page.
See Also:
renderPage(java.awt.Graphics), preparePrevPage(java.awt.Graphics)

setTokenSubstitution

void setTokenSubstitution(TokenSubstitution token)
Specifies a handler for token substitution in this ViewPrinter. Token substitution handlers make it possible for users to insert tokens (such as a token for the current dimension member) in the headers and footers of this ViewPrinter. This method sets the TokenSubstitution on this ViewPrinter and on all six of headers and footers that this ViewPrinter maintains. By default, the TokenSubstitution on this ViewPrinter and on each header and footer is null. You can also set a TokenSubstitution on each individual header and footer separately.

Parameters:
token - The token substitution handler for this ViewPrinter.

setPageFormat

void setPageFormat(java.awt.print.PageFormat pf)
Specifies the PageFormat object that specifies paper size for this ViewPrinter. The PageSetupDialog calls this method to set the PageFormat object that it modifies, to set the paper size on the print job.

Parameters:
pf - The PageFormat object that specifies the paper size.

getPageFormat

java.awt.print.PageFormat getPageFormat()
Retrieves the PageFormat object that specifies the paper size for this ViewPrinter. The PageSetupDialog calls this method to retrieve the PageFormat in its initialization. If you use the PageSetupDialog but not the PrintDialog, then you should call this method to set the PageFormat on the PageSetupDialog.

Returns:
The PageFormat object that specifies the paper size for this ViewPrinter.

getTokenSubstitution

TokenSubstitution getTokenSubstitution()
Retrieves the handler for token substitution in this ViewPrinter. Token substitution handlers make it possible for users to insert tokens (such as a token for the current dimension member) in the headers and footers of this ViewPrinter. You can also set a TokenSubstitution on each individual header and footer separately. This method gets the TokenSubstitution that is set on this ViewPrinter, which may be overridden in one or more headers or footers. By default, the TokenSubstitution on this ViewPrinter and on each header and footer is null.

Returns:
The token substitution handler for this ViewPrinter.

getLocale

java.util.Locale getLocale()
Retrives the locale of the View to be printed by this UIViewPrinter

Returns:
The Locale of the View

isDataviewTitleVisible

boolean isDataviewTitleVisible()
Indicates if DataviewTitle is visble in the View to be printed.

Returns:
true if visible false otherwise

isDataviewSubtitleVisible

boolean isDataviewSubtitleVisible()
Indicates if DataviewSubtitle is visble in the View to be printed.

Returns:
true if visible false otherwise

isDataviewFootnoteVisible

boolean isDataviewFootnoteVisible()
Indicates if DataviewFootnote is visble in the View to be printed.

Returns:
true if visible false otherwise

setLineWidth

void setLineWidth(int position,
                  int width)
Specifies the width of the line to be printed at the given position. A line width of 0 indicates that there is no line at the given position. Default value is 0.

Parameters:
position - position of the line Valid constants are listed in the See Also section.
width - the width of the line
See Also:
ViewPrinter.ABOVE_FOOTER, ViewPrinter.BELOW_HEADER

getLineWidth

int getLineWidth(int position)
Retrieves the width of the line printed at the given position. A line width of 0 indicates that there is no line at the given position. Default value is 0.

Parameters:
position - position of the line Valid constants are listed in the See Also section.
Returns:
the width of the line
See Also:
ViewPrinter.ABOVE_FOOTER, ViewPrinter.BELOW_HEADER

setUnits

void setUnits(int iUnit)
Specifies which unit value to use: UNIT_PIXEL, UNIT_INCHES, UNIT_CM..

Parameters:
iUnit - The unit value to set: UNIT_PIXEL, UNIT_INCHES, UNIT_CM..

getUnits

int getUnits()
Retrieves the unit value: UNIT_PIXEL, UNIT_INCHES, UNIT_CM. By default, the unit type is UNIT_PIXEL.

Returns:
The unit value.

getViewDimension

java.awt.Dimension getViewDimension()

renderFirstPage

boolean renderFirstPage(java.awt.Graphics g)

renderLastPage

boolean renderLastPage(java.awt.Graphics g)

goToFirstPage

boolean goToFirstPage(java.awt.Graphics g)

goToLastPage

boolean goToLastPage(java.awt.Graphics g)

setSequentialPageNumber

void setSequentialPageNumber(int pageNum)

getSequentialPageNumber

int getSequentialPageNumber()

isFirstPhysicalPage

boolean isFirstPhysicalPage()

isLastPhysicalPage

boolean isLastPhysicalPage()

getWaitCursor

java.awt.Cursor getWaitCursor()

getDefaultCursor

java.awt.Cursor getDefaultCursor()

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.6.0)

E12063-07

Copyright © 1997, 2011, Oracle. All rights reserved.