jdk/src/share/classes/java/awt/print/Pageable.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package java.awt.print;
    26 package java.awt.print;
    27 
    27 
    28 import javax.tools.annotation.GenerateNativeHeader;
    28 import java.lang.annotation.Native;
    29 
    29 
    30 /**
    30 /**
    31  * The <code>Pageable</code> implementation represents a set of
    31  * The <code>Pageable</code> implementation represents a set of
    32  * pages to be printed. The <code>Pageable</code> object returns
    32  * pages to be printed. The <code>Pageable</code> object returns
    33  * the total number of pages in the set as well as the
    33  * the total number of pages in the set as well as the
    34  * {@link PageFormat} and {@link Printable} for a specified page.
    34  * {@link PageFormat} and {@link Printable} for a specified page.
    35  * @see java.awt.print.PageFormat
    35  * @see java.awt.print.PageFormat
    36  * @see java.awt.print.Printable
    36  * @see java.awt.print.Printable
    37  */
    37  */
    38 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    39 @GenerateNativeHeader
       
    40 public interface Pageable {
    38 public interface Pageable {
    41 
    39 
    42     /**
    40     /**
    43      * This constant is returned from the
    41      * This constant is returned from the
    44      * {@link #getNumberOfPages() getNumberOfPages}
    42      * {@link #getNumberOfPages() getNumberOfPages}
    45      * method if a <code>Pageable</code> implementation does not know
    43      * method if a <code>Pageable</code> implementation does not know
    46      * the number of pages in its set.
    44      * the number of pages in its set.
    47      */
    45      */
    48     int UNKNOWN_NUMBER_OF_PAGES = -1;
    46     @Native int UNKNOWN_NUMBER_OF_PAGES = -1;
    49 
    47 
    50     /**
    48     /**
    51      * Returns the number of pages in the set.
    49      * Returns the number of pages in the set.
    52      * To enable advanced printing features,
    50      * To enable advanced printing features,
    53      * it is recommended that <code>Pageable</code>
    51      * it is recommended that <code>Pageable</code>