org.bs.mdi
Class DataPageable

java.lang.Object
  extended byorg.bs.mdi.DataPageable
All Implemented Interfaces:
Pageable

public class DataPageable
extends Object
implements Pageable

A Pageable implementation receives its printing data from a RootData object.


Nested Class Summary
 class DataPageable.DataPrintable
           
 class DataPageable.PrintException
           
 
Field Summary
protected  RootData data
           
protected  PageFormat format
           
 
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
 
Constructor Summary
DataPageable()
          Creates a new DataPageable with no RootData associated with it.
 
Method Summary
 RootData getData()
          Returns the RootData which is associated with this DataPageable.
 int getNumberOfPages()
           
 PageFormat getPageFormat()
          Returns the page format.
 PageFormat getPageFormat(int pageIndex)
           
 Printable getPrintable(int pageIndex)
           
 void setData(RootData data)
          Associates the given RootData with this DataPageable.
 void setPageFormat(PageFormat format)
          Sets the page format used for the print job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected RootData data

format

protected PageFormat format
Constructor Detail

DataPageable

public DataPageable()
Creates a new DataPageable with no RootData associated with it.

Method Detail

getData

public RootData getData()
Returns the RootData which is associated with this DataPageable.

Returns:
the data

setData

public void setData(RootData data)
             throws DataPageable.PrintException
Associates the given RootData with this DataPageable. The printing data will be provided by the RootData's Printer (see also: RootData.getPrinter()).

Parameters:
data - the data
Throws:
DataPageable.PrintException

getPageFormat

public PageFormat getPageFormat()
Returns the page format.

Returns:
the page format.

getPageFormat

public PageFormat getPageFormat(int pageIndex)
Specified by:
getPageFormat in interface Pageable

setPageFormat

public void setPageFormat(PageFormat format)
Sets the page format used for the print job.

Parameters:
format - the format

getNumberOfPages

public int getNumberOfPages()
Specified by:
getNumberOfPages in interface Pageable

getPrintable

public Printable getPrintable(int pageIndex)
Specified by:
getPrintable in interface Pageable