~ubuntu-branches/ubuntu/precise/classpath/precise

« back to all changes in this revision

Viewing changes to javax/print/attribute/standard/MultipleDocumentHandling.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2006-05-27 16:11:15 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060527161115-h6e39eposdt5snb6
Tags: 2:0.91-3
* Install header files to /usr/include/classpath.
* debian/control: classpath: Conflict with jamvm < 1.4.3 and
  cacao < 0.96 (Closes: #368172).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* MultipleDocumentHandling.java --
2
 
   Copyright (C) 2004 Free Software Foundation, Inc.
 
2
   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
3
3
 
4
4
This file is part of GNU Classpath.
5
5
 
43
43
 
44
44
 
45
45
/**
 
46
 * The <code>MultipleDocumentHandling</code> printing attribute controls
 
47
 * how certain printing attributes affect printing in case of multiple 
 
48
 * documents in a print job. This attribute is only relevant if a job 
 
49
 * has multiple documents.
 
50
 * <p>
 
51
 * <b>IPP Compatibility:</b> MultipleDocumentHandling is an IPP 1.1 attribute.
 
52
 * </p>
 
53
 * 
46
54
 * @author Michael Koch (konqueror@gmx.de)
 
55
 * @author Wolfgang Baer (WBaer@gmx.de)
47
56
 */
48
57
public class MultipleDocumentHandling extends EnumSyntax
49
58
  implements PrintJobAttribute, PrintRequestAttribute
50
59
{
51
60
  private static final long serialVersionUID = 8098326460746413466L;
52
61
 
 
62
  /** 
 
63
   * Multiple documents are treated as a single document.
 
64
   */
53
65
  public static final MultipleDocumentHandling SINGLE_DOCUMENT =
54
66
    new MultipleDocumentHandling(0);
 
67
  
 
68
  /** 
 
69
   * Multiple documents are treated as uncollated copies.
 
70
   */
55
71
  public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_UNCOLLATED_COPIES =
56
72
    new MultipleDocumentHandling(1);
 
73
  
 
74
  /** 
 
75
   * Multiple documents are treated as collated copies. 
 
76
   */
57
77
  public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_COLLATED_COPIES =
58
78
    new MultipleDocumentHandling(2);
 
79
  
 
80
  /** 
 
81
   * Multiple documents are treated so that every single document starts
 
82
   * with a new sheet. 
 
83
   */
59
84
  public static final MultipleDocumentHandling SINGLE_DOCUMENT_NEW_SHEET =
60
85
    new MultipleDocumentHandling(3);
 
86
  
 
87
  private static final String[] stringTable = { "single-document", 
 
88
                                                "separate-documents-uncollated-copies",
 
89
                                                "separate-documents-collated-copies",
 
90
                                                "single-document-new-sheet" };
 
91
  
 
92
  private static final MultipleDocumentHandling[] enumValueTable = 
 
93
    { SINGLE_DOCUMENT, SEPARATE_DOCUMENTS_UNCOLLATED_COPIES,
 
94
      SEPARATE_DOCUMENTS_COLLATED_COPIES, SINGLE_DOCUMENT_NEW_SHEET};
61
95
 
62
96
  /**
63
97
   * Constructs a <code>MultipleDocumentHandling</code> object.
 
98
   * 
 
99
   * @param value the enum value
64
100
   */
65
101
  protected MultipleDocumentHandling(int value)
66
102
  {
70
106
  /**
71
107
   * Returns category of this class.
72
108
   *
73
 
   * @return the class <code>MultipleDocumentHandling</code> itself
 
109
   * @return The class <code>MultipleDocumentHandling</code> itself.
74
110
   */
75
 
  public Class getCategory()
 
111
  public final Class getCategory()
76
112
  {
77
113
    return MultipleDocumentHandling.class;
78
114
  }
80
116
  /**
81
117
   * Returns the name of this attribute.
82
118
   *
83
 
   * @return the name
 
119
   * @return The name "multiple-document-handling".
84
120
   */
85
 
  public String getName()
 
121
  public final String getName()
86
122
  {
87
123
    return "multiple-document-handling";
88
124
  }
 
125
  
 
126
  /**
 
127
   * Returns a table with the enumeration values represented as strings
 
128
   * for this object.
 
129
   *
 
130
   * @return The enumeration values as strings.
 
131
   */
 
132
  protected String[] getStringTable()
 
133
  {
 
134
    return stringTable;
 
135
  }
 
136
 
 
137
  /**
 
138
   * Returns a table with the enumeration values for this object.
 
139
   *
 
140
   * @return The enumeration values.
 
141
   */
 
142
  protected EnumSyntax[] getEnumValueTable()
 
143
  {
 
144
    return enumValueTable;
 
145
  }
89
146
}