Packagecom.flexicious.print
Classpublic class PrintController
InheritancePrintController Inheritance Object
Subclasses DashboardPrintController, ExtendedPrintController

This class is responsible for actual print and print preview functionality



Protected Properties
 PropertyDefined By
  _extendedDataGrid : IExtendedDataGrid
PrintController
  printJob : FlexPrintJob
PrintController
  _printOptions : PrintOptions
PrintController
  _printWindow : PrintWindow
PrintController
  serverDataRetrieved : Boolean = false
PrintController
  totalDirty : Boolean = true
PrintController
Public Methods
 MethodDefined By
  
PrintController
  
[static]
PrintController
  
previewWithOptions(printable:IPrintable, printOptions:PrintOptions):void
Creates a preview of the grid and displays it.
PrintController
  
print(printable:IPrintable, printOptions:PrintOptions = null):void
Called by the grid to print its contents to the printer on basis of the passed in print options.
PrintController
  
printWithOptions(printable:IPrintable, printOptions:PrintOptions):void
The main function to call while printing the grid.
PrintController
Protected Methods
 MethodDefined By
  
PrintController
  
calculateTotalPages(iCollectionView:Object, hasColumnGroups:Boolean):void
PrintController
  
cloneColumn(cols:Array, col:Object):void
PrintController
  
PrintController
  
PrintController
  
onPrintOptionsClose(event:Object):void
PrintController
  
onPrintRequestDataRecieved(event:Event):void
PrintController
  
setupPrintWindow(printable:IPrintable, printOptions:PrintOptions, printWindow:PrintWindow):void
Called by both the print and the preview, to populate the grid on basis of the provided options.
PrintController
Property Detail
_extendedDataGridproperty
protected var _extendedDataGrid:IExtendedDataGrid

_printOptionsproperty 
protected var _printOptions:PrintOptions

_printWindowproperty 
protected var _printWindow:PrintWindow

printJobproperty 
protected var printJob:FlexPrintJob

serverDataRetrievedproperty 
protected var serverDataRetrieved:Boolean = false

totalDirtyproperty 
protected var totalDirty:Boolean = true

Constructor Detail
PrintController()Constructor
public function PrintController()



Method Detail
addCurrentPage()method
protected function addCurrentPage():void

calculateTotalPages()method 
protected function calculateTotalPages(iCollectionView:Object, hasColumnGroups:Boolean):void

Parameters

iCollectionView:Object
 
hasColumnGroups:Boolean

cloneColumn()method 
protected function cloneColumn(cols:Array, col:Object):void

Parameters

cols:Array
 
col:Object

gotoCurrentPage()method 
protected function gotoCurrentPage():void

instance()method 
public static function instance():PrintController

Returns
PrintController
instantiatePrintWindow()method 
protected function instantiatePrintWindow():PrintWindow

Returns
PrintWindow
onPrintOptionsClose()method 
protected function onPrintOptionsClose(event:Object):void

Parameters

event:Object

onPrintRequestDataRecieved()method 
protected function onPrintRequestDataRecieved(event:Event):void

Parameters

event:Event

previewWithOptions()method 
public function previewWithOptions(printable:IPrintable, printOptions:PrintOptions):void

Creates a preview of the grid and displays it.

Parameters

printable:IPrintable — The IExtendedDataGrid to preview
 
printOptions:PrintOptions — The Print Options (See the print options class)

print()method 
public function print(printable:IPrintable, printOptions:PrintOptions = null):void

Called by the grid to print its contents to the printer on basis of the passed in print options. If the preview property of the printOptions parameter is true, it will popup a preview window.

Parameters

printable:IPrintable — IExtendedDataGrid to print
 
printOptions:PrintOptions (default = null) — PrintOptions to use for printing

printWithOptions()method 
public function printWithOptions(printable:IPrintable, printOptions:PrintOptions):void

The main function to call while printing the grid.

Parameters

printable:IPrintable — The IExtendedDataGrid to print
 
printOptions:PrintOptions — The print options

setupPrintWindow()method 
protected function setupPrintWindow(printable:IPrintable, printOptions:PrintOptions, printWindow:PrintWindow):void

Called by both the print and the preview, to populate the grid on basis of the provided options.

Parameters

printable:IPrintable
 
printOptions:PrintOptions
 
printWindow:PrintWindow