Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.print
Class DocumentPrintFactory

java.lang.Object
  extended by oracle.ide.print.DocumentPrintFactory

public class DocumentPrintFactory
extends java.lang.Object

A base class for handling printing from a view. Some views will extend this class so they can override methods to provide a more view-specific implementation. For example, in the Navigator it's important to override isPrintingEnabled() to only return true if at least one selected element is printable.


Field Summary
protected  java.awt.print.Pageable _pageable
           
protected  PrintManager _printManager
           
 
Constructor Summary
DocumentPrintFactory()
           
 
Method Summary
 void create(Context context)
          The method that will be called by the PrintManager in response to the the print command.
 boolean isPrintingEnabled(Context context)
          This method will be called by the PrintManager to determine if the File->Print menu option should be enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_printManager

protected PrintManager _printManager

_pageable

protected java.awt.print.Pageable _pageable
Constructor Detail

DocumentPrintFactory

public DocumentPrintFactory()
Method Detail

create

public void create(Context context)
The method that will be called by the PrintManager in response to the the print command. The code which implements this will need to do the appropriate action based on the view that is being asked to print. For example, in the Navigator this call would need to determine which nodes are selected and of those, which are printable. For each node it would then get the Node for the node and call the PrintManager's method to create a Pageable for each Node.


isPrintingEnabled

public boolean isPrintingEnabled(Context context)
This method will be called by the PrintManager to determine if the File->Print menu option should be enabled. The default implementation is to have the menu option enabled, but if the menu option needs to be enabled/disabled based on additional information then the view's DocumentPrintFactory should override this method. For example, the NavigatorController determines if File->Print should be enabled based on what is selected in the Navigator window.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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