模块 java.desktop

类 OrientationRequested

java.lang.Object
javax.print.attribute.EnumSyntax
javax.print.attribute.standard.OrientationRequested
所有已实现的接口:
Serializable , Cloneable , Attribute , DocAttribute , PrintJobAttribute , PrintRequestAttribute

public final class OrientationRequested extends EnumSyntax implements DocAttribute , PrintRequestAttribute , PrintJobAttribute
OrientationRequested 是一个打印属性类,一个枚举,指示打印打印流页面所需的方向;它不描述客户端提供的打印流页面的方向。

对于某些文档格式(例如 "application/postscript" ),打印流页面的所需方向在文档数据中指定。该信息由设备驱动程序在提交打印作业之前生成。其他文档格式(例如 "text/plain" )在文档数据中不包含所需方向的概念。在后一种情况下,打印机可以在文档数据提交后将所需的方向绑定到文档数据。预计打印机将仅支持某些文档格式(例如 "text/plain""text/html" )的 OrientationRequested 属性,而不支持其他格式(例如 "application/postscript" )。这与任何其他作业模板属性没有什么不同,因为打印作业总是可以在不同作业模板属性的值之间施加约束。但是,这里要特别提到,因为打印机很可能只支持支持的文档格式的一个子集的 OrientationRequested 属性。

IPP 兼容性:getName() 返回的类别名称是 IPP 属性名称。枚举的整数值是 IPP 枚举值。 toString() 方法返回属性值的 IPP 字符串表示。

参见:
  • 字段详细信息

    • PORTRAIT

      public static final OrientationRequested  PORTRAIT
      内容将在介质的短边上成像。
    • LANDSCAPE

      public static final OrientationRequested  LANDSCAPE
      内容将在介质的长边上成像。横向被定义为要成像的打印流页面从纵向方向相对于介质旋转+90 度(即逆时针)。笔记:选择 +90 方向是因为无论纵向还是横向,长边上的简单精加工都是相同的边缘。
    • REVERSE_LANDSCAPE

      public static final OrientationRequested  REVERSE_LANDSCAPE
      内容将在介质的长边上成像,但以与横向相反的方式。反向横向被定义为相对于介质从纵向方向(即顺时针方向)旋转-90 度成像的打印流页面。笔记:添加 REVERSE_LANDSCAPE 值是因为某些应用程序将横向从纵向旋转 -90 度,而不是 +90 度。
    • REVERSE_PORTRAIT

      public static final OrientationRequested  REVERSE_PORTRAIT
      内容将在介质的短边成像,但采用与纵向相反的方式。反向纵向被定义为将要成像的打印流页面从纵向方向相对于介质旋转 180 度。笔记:添加了 REVERSE_PORTRAIT 值以与 Finishings 属性一起使用,以防在只有一个修整位置的简单修整设备上修整纵向文档时需要相反的边缘。因此,"text/plain" 肖像文档可以通过简单的装订设备装订在“右侧”,这在某些中东语言(例如希伯来语)中很常见。
  • 构造方法详细信息

    • OrientationRequested

      protected OrientationRequested(int value)
      使用给定的整数值构造一个新的方向请求枚举值。
      参数:
      value - 整数值
  • 方法详情

    • getStringTable

      protected String [] getStringTable()
      返回 OrientationRequested string table
      重写:
      getStringTable 在类 EnumSyntax
      返回:
      字符串表
    • getEnumValueTable

      protected EnumSyntax [] getEnumValueTable()
      返回类 OrientationRequested 的枚举值表。
      重写:
      getEnumValueTable 在类 EnumSyntax
      返回:
      值表
    • getOffset

      protected int getOffset()
      返回类 OrientationRequested 使用的最小整数值。
      重写:
      getOffset 在类 EnumSyntax
      返回:
      最低枚举值的偏移量
    • getCategory

      public final Class <? extends Attribute > getCategory()
      获取将用作此打印属性值的“类别”的打印属性类。

      对于类 OrientationRequested ,类别是类 OrientationRequested 本身。

      指定者:
      getCategory 在接口 Attribute
      返回:
      打印属性类(类别),类java.lang.Class 的一个实例
    • getName

      public final String  getName()
      获取此属性值是其实例的类别的名称。

      对于类 OrientationRequested,类别名称是 "orientation-requested"

      指定者:
      getName 在接口 Attribute
      返回:
      属性类别名称