Tabnine Logo
PDAppearanceEntry.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceEntry
constructor

Best Java code snippets using org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceEntry.<init> (Showing top 17 results out of 315)

origin: apache/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default".
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getNormalAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.N);
  if (entry instanceof COSDictionary)
  {
    return new PDAppearanceEntry((COSDictionary) entry);
  }
  return null;
}
origin: apache/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be
 * returned. Which means that this method will never return null.
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getRolloverAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.R);
  if (entry instanceof COSDictionary)
  {
    return new PDAppearanceEntry((COSDictionary) entry);
  }
  else
  {
    return getNormalAppearance();
  }
}
origin: apache/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be
 * returned. Which means that this method will never return null.
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getDownAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.D);
  if (entry instanceof COSDictionary)
  {
    return new PDAppearanceEntry((COSDictionary) entry);
  }
  else
  {
    return getNormalAppearance();
  }
}
origin: apache/pdfbox

/**
 * Get the annotations normal appearance.
 * 
 * <p>
 * This will get the annotations normal appearance. If this is not existent
 * an empty appearance entry will be created.
 * 
 * @return the appearance entry representing the normal appearance.
 */
private PDAppearanceEntry getNormalAppearance()
{
  PDAppearanceDictionary appearanceDictionary = getAppearance();
  PDAppearanceEntry normalAppearanceEntry = appearanceDictionary.getNormalAppearance();
  if (normalAppearanceEntry.isSubDictionary())
  {
    //TODO replace with "document.getDocument().createCOSStream()" 
    normalAppearanceEntry = new PDAppearanceEntry(new COSStream());
    appearanceDictionary.setNormalAppearance(normalAppearanceEntry);
  }
  return normalAppearanceEntry;
}

origin: apache/pdfbox

/**
 * Get the annotations rollover appearance.
 * 
 * <p>
 * This will get the annotations rollover appearance. If this is not
 * existent an empty appearance entry will be created.
 * 
 * @return the appearance entry representing the rollover appearance.
 */
PDAppearanceEntry getRolloverAppearance()
{
  PDAppearanceDictionary appearanceDictionary = getAppearance();
  PDAppearanceEntry rolloverAppearanceEntry = appearanceDictionary.getRolloverAppearance();
  if (rolloverAppearanceEntry.isSubDictionary())
  {
    //TODO replace with "document.getDocument().createCOSStream()" 
    rolloverAppearanceEntry = new PDAppearanceEntry(new COSStream());
    appearanceDictionary.setRolloverAppearance(rolloverAppearanceEntry);
  }
  return rolloverAppearanceEntry;
}
origin: apache/pdfbox

/**
 * Get the annotations down appearance.
 * 
 * <p>
 * This will get the annotations down appearance. If this is not existent an
 * empty appearance entry will be created.
 * 
 * @return the appearance entry representing the down appearance.
 */
PDAppearanceEntry getDownAppearance()
{
  PDAppearanceDictionary appearanceDictionary = getAppearance();
  PDAppearanceEntry downAppearanceEntry = appearanceDictionary.getDownAppearance();
  if (downAppearanceEntry.isSubDictionary())
  {
    //TODO replace with "document.getDocument().createCOSStream()" 
    downAppearanceEntry = new PDAppearanceEntry(new COSStream());
    appearanceDictionary.setDownAppearance(downAppearanceEntry);
  }
  return downAppearanceEntry;
}
origin: apache/pdfbox

PDAppearanceEntry appearanceNEntry = new PDAppearanceEntry(apNDict);
appearance.setNormalAppearance(appearanceNEntry);
widget.setAppearance(appearance);
origin: org.apache.pdfbox/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default".
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getNormalAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.N);
  if (entry instanceof COSDictionary)
  {
    return new PDAppearanceEntry(entry);
  }
  return null;
}
origin: com.github.lafa.pdfbox/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default".
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getNormalAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.N);
  if (entry == null)
  {
    return null;
  }
  else
  {
    return new PDAppearanceEntry(entry);
  }
}
origin: org.apache.pdfbox/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be
 * returned. Which means that this method will never return null.
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getDownAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.D);
  if (entry instanceof COSDictionary)
  {
    return new PDAppearanceEntry(entry);
  }
  else
  {
    return getNormalAppearance();
  }
}
origin: com.github.lafa.pdfbox/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be
 * returned. Which means that this method will never return null.
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getDownAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.D);
  if (entry == null)
  {
    return getNormalAppearance();
  }
  else
  {
    return new PDAppearanceEntry(entry);
  }
}
origin: org.apache.pdfbox/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be
 * returned. Which means that this method will never return null.
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getRolloverAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.R);
  if (entry instanceof COSDictionary)
  {
    return new PDAppearanceEntry(entry);
  }
  else
  {
    return getNormalAppearance();
  }
}
origin: com.github.lafa.pdfbox/pdfbox

/**
 * This will return a list of appearances. In the case where there is only one appearance the map will contain one
 * entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be
 * returned. Which means that this method will never return null.
 *
 * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
 */
public PDAppearanceEntry getRolloverAppearance()
{
  COSBase entry = dictionary.getDictionaryObject(COSName.R);
  if (entry == null)
  {
    return getNormalAppearance();
  }
  else
  {
    return new PDAppearanceEntry(entry);
  }
}
origin: org.verapdf/pdfbox-validation-model

private void addContentStreamsFromAppearanceEntry(COSBase appearanceEntry, List<PDContentStream> appearances) {
  if (appearanceEntry != null) {
    PDAppearanceEntry newAppearance = new PDAppearanceEntry(appearanceEntry);
    if (newAppearance.isStream()) {
      addAppearance(appearances, newAppearance.getAppearanceStream());
    } else {
      Map<COSName, PDAppearanceStream> subDictionary = newAppearance.getSubDictionary();
      for (PDAppearanceStream stream : subDictionary.values()) {
        addAppearance(appearances, stream);
      }
    }
  }
}
origin: com.github.lafa.pdfbox/pdfbox

/**
 * Get the annotations rollover appearance.
 * 
 * <p>
 * This will get the annotations rollover appearance. If this is not
 * existent an empty appearance entry will be created.
 * 
 * @return the appearance entry representing the rollover appearance.
 */
PDAppearanceEntry getRolloverAppearance()
{
  PDAppearanceDictionary appearanceDictionary = getAppearance();
  PDAppearanceEntry appearanceEntry = appearanceDictionary.getRolloverAppearance();
  if (appearanceEntry.isSubDictionary())
  {
    appearanceEntry = new PDAppearanceEntry(new COSStream());
    appearanceDictionary.setRolloverAppearance(appearanceEntry);
  }
  return appearanceEntry;
}

origin: com.github.lafa.pdfbox/pdfbox

/**
 * Get the annotations down appearance.
 * 
 * <p>
 * This will get the annotations down appearance. If this is not existent an
 * empty appearance entry will be created.
 * 
 * @return the appearance entry representing the down appearance.
 */
PDAppearanceEntry getDownAppearance()
{
  PDAppearanceDictionary appearanceDictionary = getAppearance();
  PDAppearanceEntry appearanceEntry = appearanceDictionary.getDownAppearance();
  if (appearanceEntry.isSubDictionary())
  {
    appearanceEntry = new PDAppearanceEntry(new COSStream());
    appearanceDictionary.setDownAppearance(appearanceEntry);
  }
  return appearanceEntry;
}
origin: com.github.lafa.pdfbox/pdfbox

/**
 * Get the annotations normal appearance.
 * 
 * <p>
 * This will get the annotations normal appearance. If this is not existent
 * an empty appearance entry will be created.
 * 
 * @return the appearance entry representing the normal appearance.
 */
private PDAppearanceEntry getNormalAppearance()
{
  PDAppearanceDictionary appearanceDictionary = getAppearance();
  PDAppearanceEntry appearanceEntry = appearanceDictionary.getNormalAppearance();
  if (appearanceEntry.isSubDictionary())
  {
    appearanceEntry = new PDAppearanceEntry(new COSStream());
    appearanceDictionary.setNormalAppearance(appearanceEntry);
  }
  return appearanceEntry;
}

org.apache.pdfbox.pdmodel.interactive.annotationPDAppearanceEntry<init>

Javadoc

Constructor for reading.

Popular methods of PDAppearanceEntry

  • getAppearanceStream
    Returns the entry as an appearance stream.
  • getCOSObject
  • getSubDictionary
    Returns the entry as an appearance subdictionary.
  • isStream
    Returns true if this entry is an appearance stream.
  • isSubDictionary
    Returns true if this entry is an appearance subdictionary.

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JPanel (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now