本文整理汇总了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
}
}
}
示例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
}
}
}