本文整理汇总了Java中javax.print.attribute.standard.Fidelity.FIDELITY_FALSE属性的典型用法代码示例。如果您正苦于以下问题:Java Fidelity.FIDELITY_FALSE属性的具体用法?Java Fidelity.FIDELITY_FALSE怎么用?Java Fidelity.FIDELITY_FALSE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.print.attribute.standard.Fidelity
的用法示例。
在下文中一共展示了Fidelity.FIDELITY_FALSE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaultAttributeValue
/**
* @see javax.print.PrintService#getDefaultAttributeValue(java.lang.Class)
*/
public Object getDefaultAttributeValue(Class<? extends Attribute> category)
{
// required attributes
if (category.equals(Fidelity.class))
return Fidelity.FIDELITY_FALSE;
if (category.equals(JobName.class))
return JOB_NAME;
if (category.equals(RequestingUserName.class))
return REQUESTING_USER_NAME;
// optional attributes
if (category.equals(JobPriority.class)
&& printerAttr.containsKey(JobPriorityDefault.class))
return getPrinterDefaultAttribute(JobPriorityDefault.class);
if (category.equals(JobHoldUntil.class)
&& printerAttr.containsKey(JobHoldUntilDefault.class))
return getPrinterDefaultAttribute(JobHoldUntilDefault.class);
if (category.equals(JobSheets.class)
&& printerAttr.containsKey(JobSheetsDefault.class))
return getPrinterDefaultAttribute(JobSheetsDefault .class);
if (category.equals(MultipleDocumentHandling.class)
&& printerAttr.containsKey(MultipleDocumentHandlingDefault.class))
return getPrinterDefaultAttribute(MultipleDocumentHandlingDefault.class);
if (category.equals(Copies.class)
&& printerAttr.containsKey(CopiesDefault.class))
return getPrinterDefaultAttribute(CopiesDefault.class);
if (category.equals(Finishings.class)
&& printerAttr.containsKey(FinishingsDefault.class))
return getPrinterDefaultAttribute(FinishingsDefault.class);
if (category.equals(Sides.class)
&& printerAttr.containsKey(SidesDefault.class))
return getPrinterDefaultAttribute(SidesDefault.class);
if (category.equals(NumberUp.class)
&& printerAttr.containsKey(NumberUpDefault.class))
return getPrinterDefaultAttribute(NumberUpDefault.class);
if (category.equals(OrientationRequested.class)
&& printerAttr.containsKey(OrientationRequestedDefault.class))
return getPrinterDefaultAttribute(OrientationRequestedDefault.class);
if (category.equals(Media.class)
&& printerAttr.containsKey(MediaDefault.class))
return getPrinterDefaultAttribute(MediaDefault.class);
if (category.equals(PrinterResolution.class)
&& printerAttr.containsKey(PrinterResolutionDefault.class))
return getPrinterDefaultAttribute(PrinterResolutionDefault.class);
if (category.equals(PrintQuality.class)
&& printerAttr.containsKey(PrintQualityDefault.class))
return getPrinterDefaultAttribute(PrintQualityDefault.class);
if (category.equals(Compression.class)
&& printerAttr.containsKey(CompressionSupported.class))
return Compression.NONE;
if (category.equals(PageRanges.class))
return new PageRanges(1, Integer.MAX_VALUE);
return null;
}
示例2: getDefaultAttributeValue
/**
* @see javax.print.PrintService#getDefaultAttributeValue(java.lang.Class)
*/
public Object getDefaultAttributeValue(Class category)
{
// required attributes
if (category.equals(Fidelity.class))
return Fidelity.FIDELITY_FALSE;
if (category.equals(JobName.class))
return JOB_NAME;
if (category.equals(RequestingUserName.class))
return REQUESTING_USER_NAME;
// optional attributes
if (category.equals(JobPriority.class)
&& printerAttr.containsKey(JobPriorityDefault.class))
return getPrinterDefaultAttribute(JobPriorityDefault.class);
if (category.equals(JobHoldUntil.class)
&& printerAttr.containsKey(JobHoldUntilDefault.class))
return getPrinterDefaultAttribute(JobHoldUntilDefault.class);
if (category.equals(JobSheets.class)
&& printerAttr.containsKey(JobSheetsDefault.class))
return getPrinterDefaultAttribute(JobSheetsDefault .class);
if (category.equals(MultipleDocumentHandling.class)
&& printerAttr.containsKey(MultipleDocumentHandlingDefault.class))
return getPrinterDefaultAttribute(MultipleDocumentHandlingDefault.class);
if (category.equals(Copies.class)
&& printerAttr.containsKey(CopiesDefault.class))
return getPrinterDefaultAttribute(CopiesDefault.class);
if (category.equals(Finishings.class)
&& printerAttr.containsKey(FinishingsDefault.class))
return getPrinterDefaultAttribute(FinishingsDefault.class);
if (category.equals(Sides.class)
&& printerAttr.containsKey(SidesDefault.class))
return getPrinterDefaultAttribute(SidesDefault.class);
if (category.equals(NumberUp.class)
&& printerAttr.containsKey(NumberUpDefault.class))
return getPrinterDefaultAttribute(NumberUpDefault.class);
if (category.equals(OrientationRequested.class)
&& printerAttr.containsKey(OrientationRequestedDefault.class))
return getPrinterDefaultAttribute(OrientationRequestedDefault.class);
if (category.equals(Media.class)
&& printerAttr.containsKey(MediaDefault.class))
return getPrinterDefaultAttribute(MediaDefault.class);
if (category.equals(PrinterResolution.class)
&& printerAttr.containsKey(PrinterResolutionDefault.class))
return getPrinterDefaultAttribute(PrinterResolutionDefault.class);
if (category.equals(PrintQuality.class)
&& printerAttr.containsKey(PrintQualityDefault.class))
return getPrinterDefaultAttribute(PrintQualityDefault.class);
if (category.equals(Compression.class)
&& printerAttr.containsKey(CompressionSupported.class))
return Compression.NONE;
if (category.equals(PageRanges.class))
return new PageRanges(1, Integer.MAX_VALUE);
return null;
}