當前位置: 首頁>>代碼示例>>Java>>正文


Java MediaSizeName.JIS_B6屬性代碼示例

本文整理匯總了Java中javax.print.attribute.standard.MediaSizeName.JIS_B6屬性的典型用法代碼示例。如果您正苦於以下問題:Java MediaSizeName.JIS_B6屬性的具體用法?Java MediaSizeName.JIS_B6怎麽用?Java MediaSizeName.JIS_B6使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在javax.print.attribute.standard.MediaSizeName的用法示例。


在下文中一共展示了MediaSizeName.JIS_B6屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findWin32Media

public MediaSizeName findWin32Media(int dmIndex) {
    if (dmIndex >= 1 && dmIndex <= dmPaperToPrintService.length) {
        return dmPaperToPrintService[dmIndex - 1];
    }
    switch(dmIndex) {
        /* matching media sizes with indices beyond
           dmPaperToPrintService's length */
        case DMPAPER_A2:
            return MediaSizeName.ISO_A2;
        case DMPAPER_A6:
            return MediaSizeName.ISO_A6;
        case DMPAPER_B6_JIS:
            return MediaSizeName.JIS_B6;
        default:
            return null;
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:17,代碼來源:Win32PrintService.java

示例2: findWin32Media

public MediaSizeName findWin32Media(int dmIndex) {
    if (dmIndex >= 1 && dmIndex <= dmPaperToPrintService.length) {
       switch(dmIndex) {
        /* matching media sizes with indices beyond
           dmPaperToPrintService's length */
        case DMPAPER_A2:
            return MediaSizeName.ISO_A2;
        case DMPAPER_A6:
            return MediaSizeName.ISO_A6;
        case DMPAPER_B6_JIS:
            return MediaSizeName.JIS_B6;
        default:
            return dmPaperToPrintService[dmIndex - 1];
        }
    }

    return null;
}
 
開發者ID:openjdk,項目名稱:jdk7-jdk,代碼行數:18,代碼來源:Win32PrintService.java

示例3: selectMediaSizeNameJIS

public MediaSizeName selectMediaSizeNameJIS(String size) {
    
    if (size.equalsIgnoreCase("jis_b0")) {
        mediaSizeName = MediaSizeName.JIS_B0;
    } else if (size.equalsIgnoreCase("jis_b1")) {
        mediaSizeName = MediaSizeName.JIS_B1;
    } else if (size.equalsIgnoreCase("jis_b2")) {
        mediaSizeName = MediaSizeName.JIS_B2;
    } else if (size.equalsIgnoreCase("jis_b3")) {
        mediaSizeName = MediaSizeName.JIS_B3;
    } else if (size.equalsIgnoreCase("jis_b4")) {
        mediaSizeName = MediaSizeName.JIS_B4;
    } else if (size.equalsIgnoreCase("jis_b5")) {
        mediaSizeName = MediaSizeName.JIS_B5;
    } else if (size.equalsIgnoreCase("jis_b6")) {
        mediaSizeName = MediaSizeName.JIS_B6;
    } else if (size.equalsIgnoreCase("jis_b7")) {
        mediaSizeName = MediaSizeName.JIS_B7;
    } else if (size.equalsIgnoreCase("jis_b8")) {
        mediaSizeName = MediaSizeName.JIS_B8;
    } else if (size.equalsIgnoreCase("jis_b9")) {
        mediaSizeName = MediaSizeName.JIS_B9;
    } else if (size.equalsIgnoreCase("jis_b10")) {
        mediaSizeName = MediaSizeName.JIS_B10;
    } 
    
    return mediaSizeName;
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:28,代碼來源:MediaSizeAssigner.java


注:本文中的javax.print.attribute.standard.MediaSizeName.JIS_B6屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。