Java Code Examples for java.awt.PageAttributes

The following are top voted examples for showing how to use java.awt.PageAttributes. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 2
Project: jdk8u-jdk   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 3
Project: openjdk-jdk10   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 4
Project: openjdk9   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 5
Project: Java8CN   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 6
Project: jdk8u_jdk   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 7
Project: lookaside_java-1.8.0-openjdk   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 8
Project: VarJ   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
    * Determines whether two PageAttributes are equal to each other.
    * <p>
    * Two PageAttributes are equal if and only if each of their attributes are
    * equal. Attributes of enumeration type are equal if and only if the
    * fields refer to the same unique enumeration object. This means that
    * an aliased media is equal to its underlying unique media. Printer
    * resolutions are equal if and only if the feed resolution, cross feed 
    * resolution, and units are equal.
    *
    * @param	obj the object whose equality will be checked.
    * @return	whether obj is equal to this PageAttribute according to the
    *		above criteria.
    */
   public boolean equals(Object obj) {
       if (!(obj instanceof PageAttributes)) {
    return false;
}

PageAttributes rhs = (PageAttributes)obj;

return (color == rhs.color &&
	media == rhs.media &&
	orientationRequested == rhs.orientationRequested &&
	origin == rhs.origin &&
	printQuality == rhs.printQuality &&
	printerResolution[0] == rhs.printerResolution[0] &&
	printerResolution[1] == rhs.printerResolution[1] &&
	printerResolution[2] == rhs.printerResolution[2]);
   }
 
Example 9
Project: jdk-1.7-annotated   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 10
Project: infobip-open-jdk-8   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 11
Project: jdk8u-dev-jdk   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 12
Project: jdk7-jdk   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 13
Project: openjdk-source-code-learn   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 14
Project: OLD-OpenJDK8   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 15
Project: openjdk-jdk7u-jdk   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 16
Project: openjdk-icedtea7   File: PageAttributes.java   View source code 6 votes vote down vote up
/**
 * Determines whether two PageAttributes are equal to each other.
 * <p>
 * Two PageAttributes are equal if and only if each of their attributes are
 * equal. Attributes of enumeration type are equal if and only if the
 * fields refer to the same unique enumeration object. This means that
 * an aliased media is equal to its underlying unique media. Printer
 * resolutions are equal if and only if the feed resolution, cross feed
 * resolution, and units are equal.
 *
 * @param   obj the object whose equality will be checked.
 * @return  whether obj is equal to this PageAttribute according to the
 *          above criteria.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PageAttributes)) {
        return false;
    }

    PageAttributes rhs = (PageAttributes)obj;

    return (color == rhs.color &&
            media == rhs.media &&
            orientationRequested == rhs.orientationRequested &&
            origin == rhs.origin &&
            printQuality == rhs.printQuality &&
            printerResolution[0] == rhs.printerResolution[0] &&
            printerResolution[1] == rhs.printerResolution[1] &&
            printerResolution[2] == rhs.printerResolution[2]);
}
 
Example 17
Project: OpenJSharp   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 18
Project: OpenJSharp   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 19
Project: OpenJSharp   File: PrintJob2D.java   View source code 5 votes vote down vote up
public PrintJob2D(Frame frame,  String doctitle,
                  final Properties props) {
    this.props = props;
    this.jobAttributes = new JobAttributes();
    this.pageAttributes = new PageAttributes();
    translateInputProps();
    initPrintJob2D(frame, doctitle,
                   this.jobAttributes, this.pageAttributes);
}
 
Example 20
Project: jdk8u-jdk   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 21
Project: jdk8u-jdk   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 22
Project: jdk8u-jdk   File: PrintJob2D.java   View source code 5 votes vote down vote up
public PrintJob2D(Frame frame,  String doctitle,
                  final Properties props) {
    this.props = props;
    this.jobAttributes = new JobAttributes();
    this.pageAttributes = new PageAttributes();
    translateInputProps();
    initPrintJob2D(frame, doctitle,
                   this.jobAttributes, this.pageAttributes);
}
 
Example 23
Project: openjdk-jdk10   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 24
Project: openjdk-jdk10   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 25
Project: openjdk-jdk10   File: PrintJob2D.java   View source code 5 votes vote down vote up
public PrintJob2D(Frame frame,  String doctitle,
                  final Properties props) {
    this.props = props;
    this.jobAttributes = new JobAttributes();
    this.pageAttributes = new PageAttributes();
    translateInputProps();
    initPrintJob2D(frame, doctitle,
                   this.jobAttributes, this.pageAttributes);
}
 
Example 26
Project: openjdk-jdk10   File: PrintTest.java   View source code 5 votes vote down vote up
private static void printTest() {
    JobAttributes job = new JobAttributes();
    PageAttributes page = new PageAttributes();
    job.setDialog(JobAttributes.DialogType.NATIVE);
    job.setDefaultSelection(JobAttributes.DefaultSelectionType.ALL);
    job.setFromPage(2);
    job.setToPage(5);
    Toolkit tk = Toolkit.getDefaultToolkit();
    // setting this dialog to native printdialog
    if (tk != null) {
        PrintJob pj = tk.getPrintJob(new JFrame(),
                      "testing the attribute setting ", job, page);
    }
}
 
Example 27
Project: openjdk9   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 28
Project: openjdk9   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 29
Project: openjdk9   File: PrintJob2D.java   View source code 5 votes vote down vote up
public PrintJob2D(Frame frame,  String doctitle,
                  final Properties props) {
    this.props = props;
    this.jobAttributes = new JobAttributes();
    this.pageAttributes = new PageAttributes();
    translateInputProps();
    initPrintJob2D(frame, doctitle,
                   this.jobAttributes, this.pageAttributes);
}
 
Example 30
Project: openjdk9   File: PrintTest.java   View source code 5 votes vote down vote up
private static void printTest() {
    JobAttributes job = new JobAttributes();
    PageAttributes page = new PageAttributes();
    job.setDialog(JobAttributes.DialogType.NATIVE);
    job.setDefaultSelection(JobAttributes.DefaultSelectionType.ALL);
    job.setFromPage(2);
    job.setToPage(5);
    Toolkit tk = Toolkit.getDefaultToolkit();
    // setting this dialog to native printdialog
    if (tk != null) {
        PrintJob pj = tk.getPrintJob(new JFrame(),
                      "testing the attribute setting ", job, page);
    }
}
 
Example 31
Project: Java8CN   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 32
Project: Java8CN   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 33
Project: jdk8u_jdk   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 34
Project: jdk8u_jdk   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 35
Project: jdk8u_jdk   File: PrintJob2D.java   View source code 5 votes vote down vote up
public PrintJob2D(Frame frame,  String doctitle,
                  final Properties props) {
    this.props = props;
    this.jobAttributes = new JobAttributes();
    this.pageAttributes = new PageAttributes();
    translateInputProps();
    initPrintJob2D(frame, doctitle,
                   this.jobAttributes, this.pageAttributes);
}
 
Example 36
Project: lookaside_java-1.8.0-openjdk   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Constructs a PageAttributes instance with default values for every
 * attribute.
 */
public PageAttributes() {
    setColor(ColorType.MONOCHROME);
    setMediaToDefault();
    setOrientationRequestedToDefault();
    setOrigin(OriginType.PHYSICAL);
    setPrintQualityToDefault();
    setPrinterResolutionToDefault();
}
 
Example 37
Project: lookaside_java-1.8.0-openjdk   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
 * Sets all of the attributes of this PageAttributes to the same values as
 * the attributes of obj.
 *
 * @param   obj the PageAttributes to copy.
 */
public void set(PageAttributes obj) {
    color = obj.color;
    media = obj.media;
    orientationRequested = obj.orientationRequested;
    origin = obj.origin;
    printQuality = obj.printQuality;
    // okay because we never modify the contents of printerResolution
    printerResolution = obj.printerResolution;
}
 
Example 38
Project: lookaside_java-1.8.0-openjdk   File: PrintJob2D.java   View source code 5 votes vote down vote up
public PrintJob2D(Frame frame,  String doctitle,
                  final Properties props) {
    this.props = props;
    this.jobAttributes = new JobAttributes();
    this.pageAttributes = new PageAttributes();
    translateInputProps();
    initPrintJob2D(frame, doctitle,
                   this.jobAttributes, this.pageAttributes);
}
 
Example 39
Project: VarJ   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
    * Constructs a PageAttributes instance with default values for every
    * attribute.
    */
   public PageAttributes() {
       setColor(ColorType.MONOCHROME);
setMediaToDefault();
setOrientationRequestedToDefault();
setOrigin(OriginType.PHYSICAL);
setPrintQualityToDefault();
setPrinterResolutionToDefault();
   }
 
Example 40
Project: VarJ   File: PageAttributes.java   View source code 5 votes vote down vote up
/**
    * Sets all of the attributes of this PageAttributes to the same values as
    * the attributes of obj.
    *
    * @param	obj the PageAttributes to copy.
    */
   public void set(PageAttributes obj) {
       color = obj.color;
media = obj.media;
orientationRequested = obj.orientationRequested;
origin = obj.origin;
printQuality = obj.printQuality;
// okay because we never modify the contents of printerResolution
printerResolution = obj.printerResolution;
   }