Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.dataView
Class DataSubsetRecord

java.lang.Object
  |
  +--oracle.dss.dataView.PaginationRecord
        |
        +--oracle.dss.dataView.DataSubsetRecord

public class DataSubsetRecord
extends PaginationRecord

Detailed information for each physical page of a view that will be printed or previewed. This class is used only when you use the printPage method of a TablePrinter or CrosstabPrinter to print a table or crosstab. You use this class mainly when the part of the table or crosstab that you are printing does not fit in the area that you have allotted for it, and you want to continue printing the view in another area.

You set firstRow and firstColumn to specify the starting point for printing a GridView. The ViewPrinter sets lastRow and lastColumn to inform you how much of the view can be printed in the area of the page allotted to it.

When a column does not fit completely in the area in which the view is printed, the ViewPrinter sets x1 and x2 to indicate the horizontal location, within the view, that it can print. When you continue printing the view, you then set x1 to the previous x2 value. Then the ViewPrinter will continue to print the column from the end point of the previous printing.

For example, suppose that the printable area alloted for a GridView is 500 pixels wide, and the column specified in firstColumn 1000 pixels wide. Suppose that printing a logical page is from left-to-right and top-to-bottom. You set the following values in the DataSubsetRecord:

firstRow = 0; //firstRow is inherited from PaginationRecord
firstColumn = 0;
x1 = -1;

The calcPageBounds method calculates the space that the column requires, and it sets the following values in the DataSubsetRecord:

lastRow = 3; //lastRow is inherited from PaginationRecord
lastColumn = 0;
x1 = 0;
x2 = 500;

In your next call to calcPageBounds, you should pass a DataSubsetRecord with the following values:

firstRow = 0;
firstColumn = 0;
x1 = 500;

The calcPageBounds method calculates the space needed and sets the following values:

lastRow = 3;
lastColumn = 0;
x2 = -1; //means that the column fits in the space

In your next call to calcPageBounds, you pass a DataSubsetRecord that has the following values:

firstRow = 0;
firstColumn = 1;
x1 = -1;

See Also:
CrosstabPrinter.calcPageBounds(oracle.dss.dataView.DataSubsetRecord), TablePrinter.calcPageBounds(oracle.dss.dataView.DataSubsetRecord), CrosstabPrinter.printPage(java.awt.Graphics), TablePrinter.printPage(java.awt.Graphics)

Field Summary
 boolean needsRecalc
          Whether this DataSubsetRecord needs to be recalculated.
 int x1
          The horizontal position in the view to start printing from, in pixels.
 int x2
          The horizontal position in the view where printing ended, in pixels.

 

Fields inherited from class oracle.dss.dataView.PaginationRecord
firstColumn, firstRow, lastColumn, lastRow

 

Constructor Summary
DataSubsetRecord()
          Constructor.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

needsRecalc

public boolean needsRecalc
Whether this DataSubsetRecord needs to be recalculated. This variable is true by default. The calcPageBounds method of the TablePrinter or CrosstabPrinter sets this variable to false when it calculates page bounds. If you change lastColumn, lastRow, or x2 in this DataSubsetRecord after calling calcPageBounds, then you must also set this variable to true. Then, when you call the printPage method, pass this DataSubsetRecord to the printPage method.
See Also:
CrosstabPrinter.calcPageBounds(oracle.dss.dataView.DataSubsetRecord), CrosstabPrinter.printPage(Graphics, DataSubsetRecord), TablePrinter.calcPageBounds(oracle.dss.dataView.DataSubsetRecord), TablePrinter.printPage(Graphics, DataSubsetRecord)

x1

public int x1
The horizontal position in the view to start printing from, in pixels. When a wide column does not fit in the ViewDimension that is allotted for the view, the ViewPrinter sets this variable and x2. In a subsequent print job, you set this variable to a previous x2 value to continue printing the column.

When the first column does fit in the alloted area, then this variable is -1.


x2

public int x2
The horizontal position in the view where printing ended, in pixels. When a wide column does not fit in the ViewDimension that is allotted for the view, the ViewPrinter sets this variable. In a subsequent print job, you set the x1 variable to this value, to continue printing the column.

When the first column does fit in the alloted area, then this variable is -1.

Constructor Detail

DataSubsetRecord

public DataSubsetRecord()
Constructor.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.