Package com.saic.isd.printscreen

This package provides utilities to add a print screen (text and image) capability to Java GUI windows.

See:
          Description

Interface Summary
IContainerCallBack  
IPrintScreenText Interface to allow applications to provide greater control over how their information gets printed during a print screen operation.
IPrintTextAllTabs Marker interface to indicate that all the information on all tabs on a given JTabbedPane should be printed for text oriented printing such as HTML, Text or XML.
 

Class Summary
ContainerWalker Walks through every ojbect in a conatiner and calls back on the IContainerCallBack interface, appropriately type-casting the object for processing.
HtmlHandler Provides a action to support printing of generic swing objects.
Hyperactive Taken from JDK examples.
ImageHandler Provides a action to support printing of generic swing objects.
ImageSelection Ideas borrowed from Sun's code.
ImageUtil A class that converts image data to JPEG format.
JTabbedPanePrintAllText All the information on all tabs on a given JTabbedPane should be printed for text oriented printing such as HTML, Text or XML.
PrintableImage Prints text in a JTextComponent.
PrintableText Prints text in a JTextComponent.
PrintScreenAction Provides a action to support printing of generic swing objects.
PrintScreenFactory Produces basic print screen AbstractActions and menus based on those abstract actions.
PrintScreenHandler Superclass designed to construct and hold an internal representation of the object to be printed.
TextHandler Provides a action to support printing of generic swing objects.
UnformattedTextHandler Provides a action to support printing of generic swing objects.
Util Provides a variety of static functions to support the print screen package.
XmlHandler Provides a action to support printing of generic swing objects.
 

Package com.saic.isd.printscreen Description

This package provides utilities to add a print screen (text and image) capability to Java GUI windows.

The package is designed to provide automatic capabilities without any coding and enhance capabilities with additional coding in the GUI. That is, a text version of the screen will be automatically produced, but you can enhance its appearance by implementing appropriate interfaces in your GUI objects.

The easiest way to use this class is to include the following code when constructing the applications menus:

import com.saic.div491.printscreen.PrintScreenFactory;

...

PrintScreenFactory prtScreen = new PrintScreenFactory( this );

fileMenu.add( prtScreen.makeScreenSaveJMenu() );

fileMenu.add( prtScreen.makeScreenPrintJMenu() );

fileMenu.add( prtScreen.makeScreenPreviewJMenu() );

editMenu.add( prtScreen.makeScreenCopyJMenu() );

That code will create sub-menus allowing the user to create versions of the screen in any of unformatted text, html, xml, and a jpeg image.

If you implement the IPrintScreenText interface on any GUI component descending from java.awt.Component, then the text inserted for that component and all of its children will be produced by the component and not by the automatic walking provisions.

If you need to make custom menus, then you can get the actions to use for your menu from: PrintScreenFactory.getAction()

The following research was consulted in developing this package: New Data Transfer Capabilities, John Zukowski, Java Developer Connection, November 2001
Advanced Programming for the JavaTM 2 Platform, Chapter 6 Continued: Advanced Printing, Java Developer Connection
Java Tip 77: Enable copy and paste functionality between Swing's JTables and Excel, Java World
Java Tip 61: Cut, copy, and paste in Java, Java World
Unfurling Java's data transfer API, Java World
Printing in Java, Part 1, Java World
Java 2 introduces print capability to the Swing Forum, Java World
Printing Images in Java 1.1

This open source library was developed by IMPACTS team of SAIC Division 491. Principal contributors include: Gerhard Beck, Charlie Meiburg, and Alvin Rearick.

Copyright (c) 2004 SAIC. All rights reserved.

Subject to the GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1, February 1999 http://www.gnu.org/copyleft/lesser.html

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SAIC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



Copyright © 2002 Gerhard Beck. All rights reserved. Subject to GPL.