com.saic.isd.printscreen
Class PrintScreenFactory

java.lang.Object
  extended bycom.saic.isd.printscreen.PrintScreenFactory

public class PrintScreenFactory
extends java.lang.Object

Produces basic print screen AbstractActions and menus based on those abstract actions.

The constants indicate the types of AbstractActions available.

The menus are based on the actions. You may use the actions directly to build your own menu structure if the default menu structure does not meet your needs.


Field Summary
static int COPY_AS_HTML
           
static int COPY_AS_IMAGE
           
static int COPY_AS_TEXT
           
static int COPY_AS_XML
           
static int PREVIEW_AS_HTML
           
static int PREVIEW_AS_IMAGE
           
static int PREVIEW_AS_TEXT
           
static int PREVIEW_AS_XML
           
static int PRINT_AS_HTML
           
static int PRINT_AS_IMAGE
           
static int PRINT_AS_TEXT
           
static int PRINT_AS_XML
           
static int SAVE_AS_HTML
           
static int SAVE_AS_IMAGE
           
static int SAVE_AS_TEXT
           
static int SAVE_AS_XML
           
 
Constructor Summary
PrintScreenFactory(java.awt.Window window)
          Creates a set of AbstractActions for the window passed in.
 
Method Summary
 javax.swing.AbstractAction getAction(int type)
          Return an AbstractAction with the indicated properties.
 javax.swing.JMenu makeScreenCopyJMenu()
          Makes a copy menu to save the screen image of the window as text, html, xml, or an image.
 java.awt.Menu makeScreenCopyMenu()
          Makes a copy menu to save the screen image of the window as text, html, xml, or an image.
 javax.swing.JMenu makeScreenPreviewJMenu()
          Makes a print menu to save the screen image of the window as text, html, xml, or an image.
 java.awt.Menu makeScreenPreviewMenu()
          Makes a print menu to save the screen image of the window as text, html, xml, or an image.
 javax.swing.JMenu makeScreenPrintJMenu()
          Makes a print menu to save the screen image of the window as text, html, xml, or an image.
 java.awt.Menu makeScreenPrintMenu()
          Makes a print menu to save the screen image of the window as text, html, xml, or an image.
 javax.swing.JMenu makeScreenSaveJMenu()
          Makes a save menu to save the screen image of the window as text, html, xml, or an image.
 java.awt.Menu makeScreenSaveMenu()
          Makes a save menu to save the screen image of the window as text, html, xml, or an image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_AS_TEXT

public static final int PRINT_AS_TEXT
See Also:
Constant Field Values

PRINT_AS_HTML

public static final int PRINT_AS_HTML
See Also:
Constant Field Values

PRINT_AS_XML

public static final int PRINT_AS_XML
See Also:
Constant Field Values

PRINT_AS_IMAGE

public static final int PRINT_AS_IMAGE
See Also:
Constant Field Values

SAVE_AS_TEXT

public static final int SAVE_AS_TEXT
See Also:
Constant Field Values

SAVE_AS_HTML

public static final int SAVE_AS_HTML
See Also:
Constant Field Values

SAVE_AS_XML

public static final int SAVE_AS_XML
See Also:
Constant Field Values

SAVE_AS_IMAGE

public static final int SAVE_AS_IMAGE
See Also:
Constant Field Values

COPY_AS_TEXT

public static final int COPY_AS_TEXT
See Also:
Constant Field Values

COPY_AS_HTML

public static final int COPY_AS_HTML
See Also:
Constant Field Values

COPY_AS_XML

public static final int COPY_AS_XML
See Also:
Constant Field Values

COPY_AS_IMAGE

public static final int COPY_AS_IMAGE
See Also:
Constant Field Values

PREVIEW_AS_TEXT

public static final int PREVIEW_AS_TEXT
See Also:
Constant Field Values

PREVIEW_AS_HTML

public static final int PREVIEW_AS_HTML
See Also:
Constant Field Values

PREVIEW_AS_XML

public static final int PREVIEW_AS_XML
See Also:
Constant Field Values

PREVIEW_AS_IMAGE

public static final int PREVIEW_AS_IMAGE
See Also:
Constant Field Values
Constructor Detail

PrintScreenFactory

public PrintScreenFactory(java.awt.Window window)
Creates a set of AbstractActions for the window passed in.

copy, save, and print.

Parameters:
window - Window needing to be printed
Method Detail

makeScreenSaveJMenu

public javax.swing.JMenu makeScreenSaveJMenu()
Makes a save menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenPrintJMenu

public javax.swing.JMenu makeScreenPrintJMenu()
Makes a print menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenPreviewJMenu

public javax.swing.JMenu makeScreenPreviewJMenu()
Makes a print menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenCopyJMenu

public javax.swing.JMenu makeScreenCopyJMenu()
Makes a copy menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenSaveMenu

public java.awt.Menu makeScreenSaveMenu()
Makes a save menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenPrintMenu

public java.awt.Menu makeScreenPrintMenu()
Makes a print menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenPreviewMenu

public java.awt.Menu makeScreenPreviewMenu()
Makes a print menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

makeScreenCopyMenu

public java.awt.Menu makeScreenCopyMenu()
Makes a copy menu to save the screen image of the window as text, html, xml, or an image.

Returns:
SaveMenu

getAction

public javax.swing.AbstractAction getAction(int type)
Return an AbstractAction with the indicated properties.

Parameters:
type - One of the constants of this class indicating what action you wish the action to have.

Returns:
AbstractAction The AbstractAction will cause the indicated action to take place.


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