Extension SDK

oracle.ide.print
Interface PrintManager

All Superinterfaces:
Controller

public interface PrintManager
extends Controller


Method Summary
 boolean canShutdown()
          This method is called by IdeCoreFeatures to determine if the PrintManager can shutdown successfully.
 java.awt.print.Pageable createPageableForObject(java.lang.Object object)
          Creates a Pageable for the given object.
 java.awt.print.PageFormat getPageFormat()
          This method gets the PageFormat that will be used for printing output.
 void print(Context context)
          This method is called by the Print Command to bring up the Print dialog to allow the user to select a printer and any printer attributes.
 void printPageable(java.awt.print.Pageable pageable)
          Prints the specified Pageable
 void printPageables(java.awt.print.Pageable[] pageables)
          Prints the specified Pageable array
 boolean registerDocumentPrintFactory(java.lang.Class viewClass, java.lang.Class documentPrintFactoryClass)
          Registers the DocumentPrintFactory for a given View class.
 boolean registerDocumentPrintFactory(java.lang.String viewClassString, java.lang.String documentPrintFactoryClassString)
          Registers the DocumentPrintFactory for a given View class.
 boolean registerPageableFactory(java.lang.Class pageableSourceClass, java.lang.Class pageableFactoryClass)
          Registers the class used to create a Pageable for a given class.
 boolean registerPageableFactory(java.lang.String pageableSourceClassString, java.lang.String pageableFactoryClassString)
          Registers the class used to create a Pageable for a given class.
 void setPageFormat(java.awt.print.PageFormat parPageFormat)
          Set the PageFormat that should be used for printing output.
 void showPageDialog()
          This method invokes the Page dialog which allows the user to set page margins, paper size, etc.
 void shutdown()
          This method is invoked by IdeCoreFeatures before the IDE terminates.
 void unregisterDocumentPrintFactory(java.lang.Class viewClass)
          Removes the entry from the DocumentPrintFactory registry for the given view class.
 void unregisterDocumentPrintFactory(java.lang.String viewClassString)
          Removes the entry from the DocumentPrintFactory registry for the given view class.
 void unregisterPageableFactory(java.lang.Class pageableSourceClass)
          Removes an entry from the PageableFactory registry.
 void unregisterPageableFactory(java.lang.String pageableSourceClassString)
          Removes an entry from the PageableFactory registry.
 
Methods inherited from interface oracle.ide.addin.Controller
checkCommands, handleEvent, supervisor, update
 

Method Detail

registerPageableFactory

public boolean registerPageableFactory(java.lang.Class pageableSourceClass,
                                       java.lang.Class pageableFactoryClass)
Registers the class used to create a Pageable for a given class. For example, to create a Pageable for a TextNode we use the EditorPageableFactory class. This is the preferred method for registering a PageableFactory since it provides compile-time checking that the classes exist.

Parameters:
pageableSourceClass - The fully-qualified class for which to create a Pageable. For example, oracle.ide.model.TextNode.class
pageableFactoryClass - The fully-qualified class that implements PageableFactory for the pageableSourceClass. For example, oracle.jdeveloper.ceditor.EditorPageableFactory.class

registerPageableFactory

public boolean registerPageableFactory(java.lang.String pageableSourceClassString,
                                       java.lang.String pageableFactoryClassString)
Registers the class used to create a Pageable for a given class. For example, to create a Pageable for a TextNode we use the EditorPageableFactory class. This method is not the preferred method for registering a PageableFactory since it does not provide compile-time checking.

Parameters:
pageableSourceClassString - The fully-qualified class for which to create a Pageable. For example, "oracle.ide.model.TextNode".
pageableFactoryClassString - The fully-qualified class that implements PageableFactory for the pageableSourceClass. For example, "oracle.jdeveloper.ceditor.EditorPageableFactory".

unregisterPageableFactory

public void unregisterPageableFactory(java.lang.Class pageableSourceClass)
Removes an entry from the PageableFactory registry. This is the preferred method to use to remove a class from the PageableFactory registry since it provide compile-time checking.

Parameters:
pageableSourceClass - The class to remove from the registry. For example, oracle.ide.model.TextNode.class

unregisterPageableFactory

public void unregisterPageableFactory(java.lang.String pageableSourceClassString)
Removes an entry from the PageableFactory registry. This is not the preferred method to use to remove a class from the PageableFactory registry since it does not provide compile-time checking.

Parameters:
pageableSourceClassString - The fully-qualified class that you want to remove from the registry. For example, "oracle.ide.model.TextNode"

registerDocumentPrintFactory

public boolean registerDocumentPrintFactory(java.lang.Class viewClass,
                                            java.lang.Class documentPrintFactoryClass)
Registers the DocumentPrintFactory for a given View class. The DocumentPrintFactory is used to provide printing support for the View. This is the preferred method to use to register a DocumentPrintFactory since it provides compile-time checking.

Parameters:
viewClass - The view class to add to the registry.
documentPrintFactoryClass - The class that acts as the DocumentPrintFactory for the view for the given view.

registerDocumentPrintFactory

public boolean registerDocumentPrintFactory(java.lang.String viewClassString,
                                            java.lang.String documentPrintFactoryClassString)
Registers the DocumentPrintFactory for a given View class. The DocumentPrintFactory is used to provide printing support for the View. This method is not the preferred method for registering a DocumentPrintFactory since it does not provide compile-time checking.


unregisterDocumentPrintFactory

public void unregisterDocumentPrintFactory(java.lang.Class viewClass)
Removes the entry from the DocumentPrintFactory registry for the given view class. This is the preferred method to use to remove a DocumentPrintFactory from the registry since it provides compile-time checking.


unregisterDocumentPrintFactory

public void unregisterDocumentPrintFactory(java.lang.String viewClassString)
Removes the entry from the DocumentPrintFactory registry for the given view class. This is not the preferred method to use to remove a DocumentPrintFactory from the registry since it does not provide compile-time checking.

Parameters:
viewClassString - The fully-qualified name of the view class to remove from the registry.

createPageableForObject

public java.awt.print.Pageable createPageableForObject(java.lang.Object object)
Creates a Pageable for the given object. This method searches the PageableFactory registry for the first entry where the object can be assigned to the pageableSourceClass in the registry. It then uses the PageableFactory registered for that entry to create a Pageable to be used for printing.

Parameters:
object - The object to create a Pageable for.

printPageable

public void printPageable(java.awt.print.Pageable pageable)
Prints the specified Pageable

Parameters:
pageable - The Pageable to print

printPageables

public void printPageables(java.awt.print.Pageable[] pageables)
Prints the specified Pageable array

Parameters:
pageables - The Pageable array to be printed

showPageDialog

public void showPageDialog()
This method invokes the Page dialog which allows the user to set page margins, paper size, etc.


print

public void print(Context context)
This method is called by the Print Command to bring up the Print dialog to allow the user to select a printer and any printer attributes.


getPageFormat

public java.awt.print.PageFormat getPageFormat()
This method gets the PageFormat that will be used for printing output.

Returns:
PageFormat

setPageFormat

public void setPageFormat(java.awt.print.PageFormat parPageFormat)
Set the PageFormat that should be used for printing output.

Parameters:
parPageFormat - a value of type PageFormat

shutdown

public void shutdown()
This method is invoked by IdeCoreFeatures before the IDE terminates. Any non java resources (file handles, database connections, etc) which are still being held by this Addin should be released by this method immediately. This method is not guaranteed to be called, but on normal terminations of the IDE, this method will be invoked.


canShutdown

public boolean canShutdown()
This method is called by IdeCoreFeatures to determine if the PrintManager can shutdown successfully.


Extension SDK

 

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