Java Code Examples for javax.print.attribute.standard.PrinterResolution#getFeedResolution()

The following examples show how to use javax.print.attribute.standard.PrinterResolution#getFeedResolution() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PageSetupPanel.java    From gcs with Mozilla Public License 2.0 5 votes vote down vote up
private static String generateResolutionTitle(PrinterResolution res) {
    StringBuilder buffer = new StringBuilder();
    int           x      = res.getCrossFeedResolution(ResolutionSyntax.DPI);
    int           y      = res.getFeedResolution(ResolutionSyntax.DPI);

    buffer.append(Integer.toString(x));
    if (x != y) {
        buffer.append(" x ");
        buffer.append(Integer.toString(y));
    }
    buffer.append(I18n.Text(" dpi"));
    return buffer.toString();
}
 
Example 2
Source File: PrintManager.java    From gcs with Mozilla Public License 2.0 5 votes vote down vote up
private static String createResolutionString(PrinterResolution res) {
    if (res != null) {
        StringBuilder buffer = new StringBuilder();
        int           x      = res.getCrossFeedResolution(1);
        int           y      = res.getFeedResolution(1);
        buffer.append(Integer.toString(x));
        if (x != y) {
            buffer.append("x");
            buffer.append(Integer.toString(y));
        }
        return buffer.toString();
    }
    return null;
}
 
Example 3
Source File: WPrinterJob.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 4
Source File: WPrinterJob.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 5
Source File: WPrinterJob.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 6
Source File: WPrinterJob.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 7
Source File: WPrinterJob.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 8
Source File: WPrinterJob.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 9
Source File: WPrinterJob.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 10
Source File: WPrinterJob.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 11
Source File: WPrinterJob.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 12
Source File: WPrinterJob.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 13
Source File: WPrinterJob.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 14
Source File: WPrinterJob.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}
 
Example 15
Source File: WPrinterJob.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
private void setResolutionAttrib(Attribute attr) {
    PrinterResolution pr = (PrinterResolution)attr;
    mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
    mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
}