Пример #1
0
 /// <summary>
 /// Constructs a <code>JobAttributes</code> instance with the
 /// specified values for every attribute.
 /// </summary>
 /// <param name="copies"> an integer greater than 0 </param>
 /// <param name="defaultSelection"> <code>DefaultSelectionType.ALL</code>,
 ///          <code>DefaultSelectionType.RANGE</code>, or
 ///          <code>DefaultSelectionType.SELECTION</code> </param>
 /// <param name="destination"> <code>DesintationType.FILE</code> or
 ///          <code>DesintationType.PRINTER</code> </param>
 /// <param name="dialog"> <code>DialogType.COMMON</code>,
 ///          <code>DialogType.NATIVE</code>, or
 ///          <code>DialogType.NONE</code> </param>
 /// <param name="fileName"> the possibly <code>null</code> file name </param>
 /// <param name="maxPage"> an integer greater than zero and greater than or equal
 ///          to <i>minPage</i> </param>
 /// <param name="minPage"> an integer greater than zero and less than or equal
 ///          to <i>maxPage</i> </param>
 /// <param name="multipleDocumentHandling">
 ///     <code>MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES</code> or
 ///     <code>MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</code> </param>
 /// <param name="pageRanges"> an array of integer arrays of two elements; an array
 ///          is interpreted as a range spanning all pages including and
 ///          between the specified pages; ranges must be in ascending
 ///          order and must not overlap; specified page numbers cannot be
 ///          less than <i>minPage</i> nor greater than <i>maxPage</i>;
 ///          for example:
 ///          <pre>
 ///          (new int[][] { new int[] { 1, 3 }, new int[] { 5, 5 },
 ///                         new int[] { 15, 19 } }),
 ///          </pre>
 ///          specifies pages 1, 2, 3, 5, 15, 16, 17, 18, and 19. Note that
 ///          (<code>new int[][] { new int[] { 1, 1 }, new int[] { 1, 2 } }</code>),
 ///          is an invalid set of page ranges because the two ranges
 ///          overlap </param>
 /// <param name="printer"> the possibly <code>null</code> printer name </param>
 /// <param name="sides"> <code>SidesType.ONE_SIDED</code>,
 ///          <code>SidesType.TWO_SIDED_LONG_EDGE</code>, or
 ///          <code>SidesType.TWO_SIDED_SHORT_EDGE</code> </param>
 /// <exception cref="IllegalArgumentException"> if one or more of the above
 ///          conditions is violated </exception>
 public JobAttributes(int copies, DefaultSelectionType defaultSelection, DestinationType destination, DialogType dialog, String fileName, int maxPage, int minPage, MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, SidesType sides)
 {
     Copies                   = copies;
     DefaultSelection         = defaultSelection;
     Destination              = destination;
     Dialog                   = dialog;
     FileName                 = fileName;
     MaxPage                  = maxPage;
     MinPage                  = minPage;
     MultipleDocumentHandling = multipleDocumentHandling;
     PageRanges               = pageRanges;
     Printer                  = printer;
     Sides = sides;
 }
Пример #2
0
 /// <summary>
 /// Sets all of the attributes of this <code>JobAttributes</code> to
 /// the same values as the attributes of obj.
 /// </summary>
 /// <param name="obj"> the <code>JobAttributes</code> to copy </param>
 public void Set(JobAttributes obj)
 {
     Copies_Renamed                   = obj.Copies_Renamed;
     DefaultSelection_Renamed         = obj.DefaultSelection_Renamed;
     Destination_Renamed              = obj.Destination_Renamed;
     Dialog_Renamed                   = obj.Dialog_Renamed;
     FileName_Renamed                 = obj.FileName_Renamed;
     FromPage_Renamed                 = obj.FromPage_Renamed;
     MaxPage_Renamed                  = obj.MaxPage_Renamed;
     MinPage_Renamed                  = obj.MinPage_Renamed;
     MultipleDocumentHandling_Renamed = obj.MultipleDocumentHandling_Renamed;
     // okay because we never modify the contents of pageRanges
     PageRanges_Renamed = obj.PageRanges_Renamed;
     PrFirst            = obj.PrFirst;
     PrLast             = obj.PrLast;
     Printer_Renamed    = obj.Printer_Renamed;
     Sides_Renamed      = obj.Sides_Renamed;
     ToPage_Renamed     = obj.ToPage_Renamed;
 }