当前位置: 首页>>代码示例>>Java>>正文


Java Win32MediaTray类代码示例

本文整理汇总了Java中sun.print.Win32MediaTray的典型用法代码示例。如果您正苦于以下问题:Java Win32MediaTray类的具体用法?Java Win32MediaTray怎么用?Java Win32MediaTray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Win32MediaTray类属于sun.print包,在下文中一共展示了Win32MediaTray类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setMediaTrayAttrib

import sun.print.Win32MediaTray; //导入依赖的package包/类
private void setMediaTrayAttrib(Attribute attr) {
    if (attr == MediaTray.BOTTOM) {
        mAttMediaTray = 2;    // DMBIN_LOWER
    } else if (attr == MediaTray.ENVELOPE) {
        mAttMediaTray = 5;    // DMBIN_ENVELOPE
    } else if (attr == MediaTray.LARGE_CAPACITY) {
        mAttMediaTray = 11;      // DMBIN_LARGECAPACITY
    } else if (attr == MediaTray.MAIN) {
        mAttMediaTray =1;               // DMBIN_UPPER
    } else if (attr == MediaTray.MANUAL) {
        mAttMediaTray = 4;              // DMBIN_MANUAL
    } else if (attr == MediaTray.MIDDLE) {
        mAttMediaTray = 3;              // DMBIN_MIDDLE
    } else if (attr == MediaTray.SIDE) {
        // no equivalent predefined value
        mAttMediaTray = 7;              // DMBIN_AUTO
    } else if (attr == MediaTray.TOP) {
        mAttMediaTray = 1;              // DMBIN_UPPER
    } else {
        if (attr instanceof Win32MediaTray) {
            mAttMediaTray = ((Win32MediaTray)attr).winID;
        } else {
            mAttMediaTray = 1;  // default
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:WPrinterJob.java

示例2: setMediaTrayAttrib

import sun.print.Win32MediaTray; //导入依赖的package包/类
private void setMediaTrayAttrib(Attribute attr) {
    if (attr == MediaTray.BOTTOM) {
        mAttMediaTray = 2;    // DMBIN_LOWER
    } else if (attr == MediaTray.ENVELOPE) {
        mAttMediaTray = 5;    // DMBIN_ENVELOPE
    } else if (attr == MediaTray.LARGE_CAPACITY) {
        mAttMediaTray = 11;      // DMBIN_LARGECAPACITY
    } else if (attr == MediaTray.MAIN) {
        mAttMediaTray =1;               // DMBIN_UPPER
    } else if (attr == MediaTray.MANUAL) {
        mAttMediaTray = 4;              // DMBIN_MANUAL
    } else if (attr == MediaTray.MIDDLE) {
        mAttMediaTray = 3;              // DMBIN_MIDDLE
    } else if (attr == MediaTray.SIDE) {
        // no equivalent predefined value
        mAttMediaTray = 7;              // DMBIN_AUTO
    } else if (attr == MediaTray.TOP) {
        mAttMediaTray =1;               // DMBIN_UPPER
    } else {
        if (attr instanceof Win32MediaTray) {
            mAttMediaTray = ((Win32MediaTray)attr).winID;
        } else {
            mAttMediaTray = 1;  // default
        }
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:27,代码来源:WPrinterJob.java


注:本文中的sun.print.Win32MediaTray类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。