Package org.pdfclown.objects

Examples of org.pdfclown.objects.PdfDataObject


  @Override
  public boolean isEmpty(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
      return false;
    else // Multiple actions.
      return ((PdfArray)baseDataObject).isEmpty();
  }
View Full Code Here


  @Override
  public int size(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
      return 1;
    else // Multiple actions.
      return ((PdfArray)baseDataObject).size();
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public <T> T[] toArray(
    T[] values
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
    {
      if(values.length == 0)
      {values = (T[])new Object[1];}
View Full Code Here

  // <private>
  private PdfArray ensureArray(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
    {
      PdfArray actionsArray = new PdfArray();
      actionsArray.add(getBaseObject());
      setBaseObject(actionsArray);
View Full Code Here

    {
      /*
        NOTE: In order to get the unicode mapping stream we have to get
        its corresponding font object, which is a dictionary.
      */
      PdfDataObject dataObject = indirectObject.getDataObject();
      if(!(dataObject instanceof PdfDictionary) // Data object is NOT a dictionary.
        || !PdfName.Font.equals(((PdfDictionary)dataObject).get(PdfName.Type))) // Dictionary is NOT a font object.
        continue;

      // Get the indirect reference to the ToUnicode stream associated to the font object!
View Full Code Here

  @Override
  public Widget get(
    int index
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
    {
      if(index != 0)
        throw new IndexOutOfBoundsException("Index: " + index + ", Size: 1");
View Full Code Here

    )
  {
    if(!(value instanceof Widget))
      return -1;

    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
    {
      if(((Widget)value).getBaseObject().equals(getBaseObject()))
        return 0;
      else
View Full Code Here

    )
  {
    if(!(value instanceof Widget))
      return false;

    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
      return ((Widget)value).getBaseObject().equals(getBaseObject());

    return ((PdfArray)baseDataObject).contains(((Widget)value).getBaseObject());
  }
View Full Code Here

  @Override
  public boolean isEmpty(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
      return false;
    else // Array.
      return ((PdfArray)baseDataObject).isEmpty();
  }
View Full Code Here

  @Override
  public int size(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
      return 1;
    else // Array.
      return ((PdfArray)baseDataObject).size();
  }
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.PdfDataObject

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.