/** * 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; }
/** * 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(); } }
/** * 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(); } }
/** * 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; }
/** * 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; }
/** * 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; }
PDAppearanceEntry appearanceNEntry = new PDAppearanceEntry(apNDict); appearance.setNormalAppearance(appearanceNEntry); widget.setAppearance(appearance);
/** * 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; }
/** * 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); } }
/** * 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(); } }
/** * 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); } }
/** * 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(); } }
/** * 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); } }
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); } } } }
/** * 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; }
/** * 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; }
/** * 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; }