unbbayes.controller
Class PrintNet
java.lang.Object
unbbayes.controller.PrintNet
- All Implemented Interfaces:
- Pageable, Printable
public class PrintNet
- extends Object
- implements Printable, Pageable
Useful class for printing a view of a graphic-mode network
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
net
protected JComponent net
pageFormat
protected PageFormat pageFormat
rect
protected Rectangle rect
title
protected String title
PrintNet
public PrintNet(String title,
JComponent net,
Rectangle rect,
PageFormat pf)
print
public int print(Graphics g,
PageFormat pf,
int index)
- Perform the printing here
- Specified by:
print
in interface Printable
paintComponent
protected void paintComponent(Graphics g)
- Paint / print a portion of the component
getNumberOfPages
public int getNumberOfPages()
- Calculate the number of pages it will take to print the entire Network
- Specified by:
getNumberOfPages
in interface Pageable
getPrintable
public Printable getPrintable(int index)
- Specified by:
getPrintable
in interface Pageable
getPageFormat
public PageFormat getPageFormat(int index)
- Specified by:
getPageFormat
in interface Pageable
Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.