private boolean isImageMaskTrue() { COSBase imgMask = this.xobject.getItem("ImageMask"); if (imgMask instanceof COSBoolean) { return ((COSBoolean) imgMask).getValue(); } else { return false; } }
/** * This will get the boolean value. * * @param value Parameter telling which boolean value to get. * * @return The single boolean instance that matches the parameter. */ public static COSBoolean getBoolean( Boolean value ) { return getBoolean( value.booleanValue() ); }
@Override public Object visitFromBoolean(COSBoolean obj) throws IOException { obj.writePDF( getStandardOutput() ); return null; }
/** * Gets whether to repeat the sound indefinitely. * * @return Whether to repeat the sound indefinitely (default: false). */ public boolean getRepeat() { COSBase base = action.getDictionaryObject(COSName.REPEAT); if (base instanceof COSBoolean) { return ((COSBoolean) base).getValue(); } return false; }
/** * This will set an item in the dictionary. * * @param key The key to the dictionary object. * @param value The value to the dictionary object. */ public void setBoolean(COSName key, boolean value) { setItem(key, COSBoolean.getBoolean(value)); }
((COSBoolean)o).writePDF( output ); output.write( SPACE );
/** * Gets the synchronous flag. It specifyes whether to play the sound synchronously or * asynchronously. When true, the reader allows no further user interaction other than canceling * the sound until the sound has been completely played. * * @return Whether to play the sound synchronously (true) or asynchronously (false, also the * default). */ public boolean getSynchronous() { COSBase base = action.getDictionaryObject(COSName.SYNCHRONOUS); if (base instanceof COSBoolean) { return ((COSBoolean) base).getValue(); } return false; }
/** * @param h hide flag */ public void setH(boolean h) { this.action.setItem(COSName.H, COSBoolean.getBoolean(h)); }
@Override public Object visitFromBoolean(COSBoolean obj) throws IOException { obj.writePDF( getStandardOutput() ); return null; }
/** * Will get the EncryptMetaData dictionary info. * * @return true if EncryptMetaData is explicitly set to false (the default is true) */ public boolean isEncryptMetaData() { // default is true (see 7.6.3.2 Standard Encryption Dictionary PDF 32000-1:2008) boolean encryptMetaData = true; COSBase value = dictionary.getDictionaryObject(COSName.ENCRYPT_META_DATA); if (value instanceof COSBoolean) { encryptMetaData = ((COSBoolean)value).getValue(); } return encryptMetaData; }
/** * @param opaque If true, the area that shall be flown in is rectangular and opaque. Only for * {@link PDTransitionStyle#Fly}. */ public void setFlyAreaOpaque(boolean opaque) { getCOSObject().setItem(COSName.B, COSBoolean.getBoolean(opaque)); } }
@Override public Object visitFromBoolean(COSBoolean obj) throws IOException { obj.writePDF( getStandardOutput() ); return null; }
/** * Gets the flag specifying whether to mix this sound with any other sound already playing. If * this flag is false, any previously playing sound shall be stopped before starting this sound; * this can be used to stop a repeating sound (see Repeat). * * @return whether to mix this sound with any other sound already playing (default: false). */ public boolean getMix() { COSBase base = action.getDictionaryObject(COSName.MIX); if (base instanceof COSBoolean) { return ((COSBoolean) base).getValue(); } return false; } }
/** * This will set an item in the dictionary. * * @param key The key to the dictionary object. * @param value The value to the dictionary object. */ public void setBoolean(String key, boolean value) { setItem(COSName.getPDFName(key), COSBoolean.getBoolean(value)); }
((COSBoolean)o).writePDF( output ); output.write( SPACE );
/** * This is a convenience method that will get the dictionary object that is expected to be a COSBoolean and convert * it to a primitive boolean. * * @param firstKey The first key to the item in the dictionary. * @param secondKey The second key to the item in the dictionary. * @param defaultValue The value returned if the entry is null. * * @return The entry converted to a boolean. */ public boolean getBoolean(COSName firstKey, COSName secondKey, boolean defaultValue) { boolean retval = defaultValue; COSBase bool = getDictionaryObject(firstKey, secondKey); if (bool instanceof COSBoolean) { retval = ((COSBoolean) bool).getValue(); } return retval; }
/** * This will get the boolean value. * * @param value Parameter telling which boolean value to get. * * @return The single boolean instance that matches the parameter. */ public static COSBoolean getBoolean( Boolean value ) { return getBoolean( value.booleanValue() ); }
((COSBoolean)o).writePDF( output ); output.write( SPACE );
/** * This will specify whether to open the destination document in a new window, in the same * window, or behave in accordance with the current user preference. * * @return A flag specifying how to open the destination document. */ public OpenMode getOpenInNewWindow() { if (getCOSObject().getDictionaryObject(COSName.NEW_WINDOW) instanceof COSBoolean) { COSBoolean b = (COSBoolean) getCOSObject().getDictionaryObject(COSName.NEW_WINDOW); return b.getValue() ? OpenMode.NEW_WINDOW : OpenMode.SAME_WINDOW; } return OpenMode.USER_PREFERENCE; }
/** * This will get the boolean value. * * @param value Parameter telling which boolean value to get. * * @return The single boolean instance that matches the parameter. */ public static COSBoolean getBoolean( Boolean value ) { return getBoolean( value.booleanValue() ); }