Example usage for java.awt.print Printable interface-usage

List of usage examples for java.awt.print Printable interface-usage

Introduction

In this page you can find the example usage for java.awt.print Printable interface-usage.

Usage

From source file MainClass.java

class paintContent implements Printable {
    public int print(Graphics g, PageFormat pf, int pageIndex) throws PrinterException {
        System.out.println("Page index = " + pageIndex);
        // pageIndex 1 corresponds to page number 2.
        if (pageIndex > 2)
            return Printable.NO_SUCH_PAGE;

From source file com.l3.info.magenda.emplois_du_temps.EmploisDuTemps.java

/**
 *
 * @author thomas
 */
public class EmploisDuTemps extends JTabbedPane implements Printable, Serializable {

From source file MainClass.java

class PagePrinter implements Printable {
    Vector pageContents;

    public PagePrinter() {
        pageContents = new Vector();
    }

From source file gui.DendrogramChart.java

class DendrogramChart extends JPanel implements Printable {
    static final long serialVersionUID = 5773262026713363L;
    private Dendrogram d;

    private CardLayout card;
    private ChartPanel panelNormal, panelLogged;

From source file playground.singapore.calibration.charts.CustomChartPanel.java

/**
 * The CustomChartPanel is used to display/print multiple JFreeCharts
 * Users should only interact with this class with the methods defined
 * below in order to get the proper functionality.  Using
 * inherited methods may produce unwanted display/print behavior if you
 * add components other than JFreeCharts.

From source file Main.java

public class Main implements Printable {

    public int print(Graphics g, PageFormat pf, int page) throws PrinterException {

        if (page > 0) { /* We have only one page, and 'page' is zero-based */
            return NO_SUCH_PAGE;

From source file PrintDialogExample.java

public class PrintDialogExample implements Printable {

    public int print(Graphics g, PageFormat pf, int page) throws PrinterException {

        if (page > 0) { /* We have only one page, and 'page' is zero-based */
            return NO_SUCH_PAGE;

From source file playground.artemc.calibration.charts.CustomChartPanel.java

/**
* The CustomChartPanel is used to display/print multiple JFreeCharts
* Users should only interact with this class with the methods defined
* below in order to get the proper functionality.  Using
* inherited methods may produce unwanted display/print behavior if you
* add components other than JFreeCharts.

From source file HelloWorldPrinter.java

public class HelloWorldPrinter implements Printable, ActionListener {

    public int print(Graphics g, PageFormat pf, int page) throws PrinterException {

        if (page > 0) { /* We have only one page, and 'page' is zero-based */
            return NO_SUCH_PAGE;

From source file jgraph.JShow.java

/**
 * Shows how  to create a graph editor with JUNG.
 * Mouse modes and actions are explained in the help text.
 * The application version of JShow provides a
 * File menu with an option to save the visible graph as
 * a jpeg file.