org.jtheque.utils.print
Class PrintUtils

java.lang.Object
  extended by org.jtheque.utils.print.PrintUtils

public final class PrintUtils
extends Object

This class provide utility to print.

Author:
Baptiste Wicht

Method Summary
static int getTotalPageForList(int lines, FontMetrics metrics, PageFormat pageFormat, int increment)
          Return the necessary number of pages to print a list of lines.
static void printArrayString(Collection<String> list)
          Print a list of String.
static void printLineFiles(InputStream stream)
          Print each line of the stream.
static void printString(String toPrint)
          Print a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

printString

public static void printString(String toPrint)
Print a String.

Parameters:
toPrint - The String to print

printArrayString

public static void printArrayString(Collection<String> list)
Print a list of String.

Parameters:
list - The list of String we want to print

getTotalPageForList

public static int getTotalPageForList(int lines,
                                      FontMetrics metrics,
                                      PageFormat pageFormat,
                                      int increment)
Return the necessary number of pages to print a list of lines.

Parameters:
lines - The number of lines
metrics - The FontMetrics of the component
pageFormat - The PageFormat in which we want to print
increment - The space between the lines
Returns:
The necessary number of pages

printLineFiles

public static void printLineFiles(InputStream stream)
Print each line of the stream.

Parameters:
stream - The stream.


Copyright © 2010 JTheque. All Rights Reserved.