net.sf.jaxodraw.io
Class JaxoPrint

java.lang.Object
  extended by net.sf.jaxodraw.io.JaxoPrint
All Implemented Interfaces:
Printable

public class JaxoPrint
extends Object
implements Printable

Responsible for printing directly to a printer.

Since:
2.0

Field Summary
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
JaxoPrint()
          Constructor.
JaxoPrint(JaxoGraph graph)
          Constructor.
 
Method Summary
 void print(Component parent, JaxoGraph newGraph, Dimension d, String name)
          Deprecated. use print(Component,JaxoGraph,String) instead.
 void print(Component parent, JaxoGraph graph, String name)
          The method to be called from the printing menu.
 void print(Component parent, String name)
          Print the current graph.
 int print(Graphics g, PageFormat pf, int pageIndex)
          The actual printing routine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxoPrint

public JaxoPrint(JaxoGraph graph)
Constructor.

Parameters:
graph - the graph to print. Not null.

JaxoPrint

public JaxoPrint()
Constructor. Prepares to print an empty graph.

Method Detail

print

public final int print(Graphics g,
                       PageFormat pf,
                       int pageIndex)
The actual printing routine.

Specified by:
print in interface Printable
Parameters:
g - The specified graphics context.
pf - The specified page format.
pageIndex - The specified page index.
Returns:
Either Printable.PAGE_EXISTS or Printable.NO_SUCH_PAGE.

print

public final void print(Component parent,
                        JaxoGraph graph,
                        String name)
The method to be called from the printing menu.

Parameters:
parent - parent Component for dialogs.
graph - The JaxoGraph to be printed. Not null.
name - Name for the job.
Since:
2.0.2

print

public final void print(Component parent,
                        String name)
Print the current graph.

Parameters:
parent - parent Component for dialogs.
name - Name for the job.
Since:
2.1

print

@Deprecated
public final void print(Component parent,
                                   JaxoGraph newGraph,
                                   Dimension d,
                                   String name)
Deprecated. use print(Component,JaxoGraph,String) instead.

The method to be called from the printing menu.

Parameters:
parent - parent Component for dialogs.
newGraph - The JaxoGraph to be printed.
d - The current dimension of the canvas. This is not used!
name - Name for the job.


Copyright © 2003-2011 The JaxoDraw team. All Rights Reserved.