Java awt print book

Class Book

Класс Book предоставляет представление документа, в котором страницы могут иметь разные форматы страниц и разные средства рисования. Этот класс использует интерфейс Pageable для взаимодействия с PrinterJob .

Field Summary

Поля объявлены в интерфейсе java.awt.print. Pageable

Constructor Summary

Method Summary

Возвращает экземпляр Printable , ответственный за отрисовку страницы, указанной параметром pageIndex .

Методы, объявленные в классе java.lang. Объект

Constructor Details

Book

Method Details

getNumberOfPages

public int getNumberOfPages()

Specified by: getNumberOfPages в интерфейсе Pageable Returns: количество страниц, содержащихся в этой Book .

getPageFormat

public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException

Specified by: getPageFormat в интерфейсе Pageable Parameters: pageIndex — индекс нуль на основе страницы которого PageFormat запрашивается Returns: PageFormat , описывающая размер и ориентацию страницы. Throws: IndexOutOfBoundsException — если Pageable не содержит запрошенную страницу

getPrintable

public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException

Возвращает экземпляр Printable , ответственный за отрисовку страницы, указанной параметром pageIndex .

Читайте также:  Ввод кортежа в python

Specified by: getPrintable в интерфейсе Pageable Parameters: pageIndex — отсчитываемый от нуля индекс страницы, Printable которой запрашивается Printable Returns: Printable , что делает эту страницу. Throws: IndexOutOfBoundsException — если Pageable не содержит запрошенную страницу

setPage

public void setPage(int pageIndex, Printable painter, PageFormat page) throws IndexOutOfBoundsException

Parameters: pageIndex — отсчитываемый от нуля индекс страницы, рисовальщик и формат которой изменены painter — экземпляр Printable , который отображает страницу page — размер и ориентация страницы Throws: IndexOutOfBoundsException — если указанной страницы еще нет в этой Book NullPointerException — еслиаргумент painter или page равен null

append

public void append(Printable painter, PageFormat page)

Parameters: painter — экземпляр Printable , который отображает страницу page — размер и ориентация страницы Throws: NullPointerException — еслиаргумент painter или page равен null

append

public void append(Printable painter, PageFormat page, int numPages)

Parameters: painter — экземпляр Printable , который отображает страницу page — размер и ориентация страницы numPages — количество страниц, которые нужно добавить в эту Book . Throws: NullPointerException — еслиаргумент painter или page равен null

Источник

Java awt print book

The Book class provides a representation of a document in which pages may have different page formats and page painters. This class uses the Pageable interface to interact with a PrinterJob .

Field Summary

Fields inherited from interface java.awt.print.Pageable

Constructor Summary

Method Summary

Methods inherited from class java.lang.Object

Constructor Detail

Book

Method Detail

getNumberOfPages

public int getNumberOfPages()

getPageFormat

public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException

getPrintable

public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException

setPage

public void setPage(int pageIndex, Printable painter, PageFormat page) throws IndexOutOfBoundsException

append

append

public void append(Printable painter, PageFormat page, int numPages)

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Java awt print book

The Book class provides a representation of a document in which pages may have different page formats and page painters. This class uses the Pageable interface to interact with a PrinterJob .

Field Summary

Fields inherited from interface java.awt.print.Pageable

Constructor Summary

Method Summary

Methods inherited from class java.lang.Object

Constructor Detail

Book

Method Detail

getNumberOfPages

public int getNumberOfPages()

getPageFormat

public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException

getPrintable

public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException

setPage

public void setPage(int pageIndex, Printable painter, PageFormat page) throws IndexOutOfBoundsException

append

append

public void append(Printable painter, PageFormat page, int numPages)

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Java awt print book

The Book class provides a representation of a document in which pages may have different page formats and page painters. This class uses the Pageable interface to interact with a PrinterJob .

Field Summary

Fields declared in interface java.awt.print.Pageable

Constructor Summary

Method Summary

Methods declared in class java.lang.Object

Constructor Detail

Book

Method Detail

getNumberOfPages

public int getNumberOfPages()

getPageFormat

public PageFormat getPageFormat​(int pageIndex) throws IndexOutOfBoundsException

getPrintable

public Printable getPrintable​(int pageIndex) throws IndexOutOfBoundsException

setPage

public void setPage​(int pageIndex, Printable painter, PageFormat page) throws IndexOutOfBoundsException

append

append

public void append​(Printable painter, PageFormat page, int numPages)

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Оцените статью