org.jscience.util
Class PrintUtils

java.lang.Object
  extended by org.jscience.util.PrintUtils

public class PrintUtils
extends java.lang.Object

DOCUMENT ME!


Field Summary
static javax.print.attribute.standard.MediaName mediaName
          currently uses ISO_A4_WHITE by default
 
Method Summary
static java.lang.String getInfoOn(javax.print.PrintService service)
          DOCUMENT ME!
static void print(java.awt.Component c)
          prints the given component after selecting the desired printer
static void print(java.awt.print.PrinterJob printJob, java.awt.Component c)
          DOCUMENT ME!
static void print(javax.print.PrintService service, java.lang.String text, boolean formFeed)
          prints the given text to the given print service (adding a formFeed if desired)
static void print(java.lang.String text)
          calls text(text, true)
static void print(java.lang.String text, boolean formFeed)
          prints the given text to the default printer (adding a formFeed if desired)
static void printTextFile(java.io.File asciiFile)
          DOCUMENT ME!
static void printTextFile(javax.print.PrintService service, java.io.File asciiFile)
          DOCUMENT ME!
static void useA4()
          DOCUMENT ME!
static void useLetter()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mediaName

public static javax.print.attribute.standard.MediaName mediaName
currently uses ISO_A4_WHITE by default

Method Detail

useA4

public static void useA4()
DOCUMENT ME!


useLetter

public static void useLetter()
DOCUMENT ME!


print

public static void print(java.awt.Component c)
                  throws java.awt.print.PrinterException
prints the given component after selecting the desired printer

Parameters:
c - DOCUMENT ME!
Throws:
java.awt.print.PrinterException - DOCUMENT ME!

print

public static void print(java.awt.print.PrinterJob printJob,
                         java.awt.Component c)
                  throws java.awt.print.PrinterException
DOCUMENT ME!

Parameters:
printJob - DOCUMENT ME!
c - DOCUMENT ME!
Throws:
java.awt.print.PrinterException - DOCUMENT ME!

print

public static void print(java.lang.String text)
                  throws javax.print.PrintException
calls text(text, true)

Throws:
javax.print.PrintException
See Also:
print(String,boolean)

print

public static void print(java.lang.String text,
                         boolean formFeed)
                  throws javax.print.PrintException
prints the given text to the default printer (adding a formFeed if desired)

Parameters:
text - DOCUMENT ME!
formFeed - DOCUMENT ME!
Throws:
javax.print.PrintException - DOCUMENT ME!

print

public static void print(javax.print.PrintService service,
                         java.lang.String text,
                         boolean formFeed)
                  throws javax.print.PrintException
prints the given text to the given print service (adding a formFeed if desired)

Parameters:
service - DOCUMENT ME!
text - DOCUMENT ME!
formFeed - DOCUMENT ME!
Throws:
javax.print.PrintException - DOCUMENT ME!

printTextFile

public static void printTextFile(java.io.File asciiFile)
                          throws java.io.IOException,
                                 javax.print.PrintException
DOCUMENT ME!

Parameters:
asciiFile - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
javax.print.PrintException - DOCUMENT ME!

printTextFile

public static void printTextFile(javax.print.PrintService service,
                                 java.io.File asciiFile)
                          throws java.io.IOException,
                                 javax.print.PrintException
DOCUMENT ME!

Parameters:
service - DOCUMENT ME!
asciiFile - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
javax.print.PrintException - DOCUMENT ME!

getInfoOn

public static java.lang.String getInfoOn(javax.print.PrintService service)
DOCUMENT ME!

Parameters:
service - DOCUMENT ME!
Returns:
DOCUMENT ME!