Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfBoolean


   * @param ascending  true is the default, use false for descending order
   */
  public void setSortOrder(boolean ascending) {
    PdfObject o = get(PdfName.S);
    if (o instanceof PdfName) {
      put(PdfName.A, new PdfBoolean(ascending));
    }
    else {
      throw new IllegalArgumentException("You have to define a boolean array for this collection sort dictionary.");
    }
  }
View Full Code Here


      if (((PdfArray)o).size() != ascending.length) {
        throw new IllegalArgumentException("The number of booleans in this array doesn't correspond with the number of fields.");
      }
      PdfArray array = new PdfArray();
      for (int i = 0; i < ascending.length; i++) {
        array.add(new PdfBoolean(ascending[i]));
      }
      put(PdfName.A, array);
    }
    else {
      throw new IllegalArgumentException("You need a single boolean for this collection sort dictionary.");
View Full Code Here

  /**
   * Sets the initial visibility of the field.
   * @param visible  the default is true (visible)
   */
  public void setVisible(boolean visible) {
    put(PdfName.V, new PdfBoolean(visible));
  }
View Full Code Here

  /**
   * Indication if the field value should be editable in the viewer.
   * @param editable  the default is false (not editable)
   */
  public void setEditable(boolean editable) {
    put(PdfName.E, new PdfBoolean(editable));
  }
View Full Code Here

   * @param ascending  true is the default, use false for descending order
   */
  public void setSortOrder(boolean ascending) {
    PdfObject o = (PdfObject)get(PdfName.S);
    if (o instanceof PdfName) {
      put(PdfName.A, new PdfBoolean(ascending));
    }
    else {
      throw new IllegalArgumentException("You have to define a boolean array for this collection sort dictionary.");
    }
  }
View Full Code Here

      if (((PdfArray)o).size() != ascending.length) {
        throw new IllegalArgumentException("The number of booleans in this array doesn't correspond with the number of fields.");
      }
      PdfArray array = new PdfArray();
      for (int i = 0; i < ascending.length; i++) {
        array.add(new PdfBoolean(ascending[i]));
      }
      put(PdfName.A, array);
    }
    else {
      throw new IllegalArgumentException("You need a single boolean for this collection sort dictionary.");
View Full Code Here

  /**
   * Sets the initial visibility of the field.
   * @param visible  the default is true (visible)
   */
  public void setVisible(boolean visible) {
    put(PdfName.V, new PdfBoolean(visible));
  }
View Full Code Here

  /**
   * Indication if the field value should be editable in the viewer.
   * @param editable  the default is false (not editable)
   */
  public void setEditable(boolean editable) {
    put(PdfName.E, new PdfBoolean(editable));
  }
View Full Code Here

   * @param ascending  true is the default, use false for descending order
   */
  public void setSortOrder(boolean ascending) {
    PdfObject o = get(PdfName.S);
    if (o instanceof PdfName) {
      put(PdfName.A, new PdfBoolean(ascending));
    }
    else {
      throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.have.to.define.a.boolean.array.for.this.collection.sort.dictionary"));
    }
  }
View Full Code Here

      if (((PdfArray)o).size() != ascending.length) {
        throw new IllegalArgumentException(MessageLocalization.getComposedMessage("the.number.of.booleans.in.this.array.doesn.t.correspond.with.the.number.of.fields"));
      }
      PdfArray array = new PdfArray();
      for (int i = 0; i < ascending.length; i++) {
        array.add(new PdfBoolean(ascending[i]));
      }
      put(PdfName.A, array);
    }
    else {
      throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.need.a.single.boolean.for.this.collection.sort.dictionary"));
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PdfBoolean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.