@Test(expected = TaskException.class) public void testSetBooleanPreferencesNullPref() throws TaskException { ViewerPreferencesUtils.setBooleanPreferences(null, Collections.EMPTY_SET); }
public static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) throws TaskException { if (preferences == null) { throw new TaskException("Unable to set preferences on a null instance."); } for (PdfBooleanPreference current : PdfBooleanPreference.values()) { if (enabled.contains(current)) { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).enable(preferences); LOG.trace("{} = enabled.", current); } else { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).disable(preferences); LOG.trace("{} = disabled.", current); } } }
ViewerPreferencesUtils { public static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) throws TaskException { if (preferences == null) { throw new TaskException("Unable to set preferences on a null instance."); } for (PdfBooleanPreference current : PdfBooleanPreference.values()) { if (enabled.contains(current)) { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).enable(preferences); LOG.trace("{} = enabled.", current); } else { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).disable(preferences); LOG.trace("{} = disabled.", current); } } } }
ViewerPreferencesUtils { public static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) throws TaskException { if (preferences == null) { throw new TaskException("Unable to set preferences on a null instance."); } for (PdfBooleanPreference current : PdfBooleanPreference.values()) { if (enabled.contains(current)) { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).enable(preferences); LOG.trace("{} = enabled.", current); } else { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).disable(preferences); LOG.trace("{} = disabled.", current); } } } private  ViewerPreferencesUtils(); }
ViewerPreferencesUtils { public static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) throws TaskException { if (preferences == null) { throw new TaskException("Unable to set preferences on a null instance."); } for (PdfBooleanPreference current : PdfBooleanPreference.values()) { if (enabled.contains(current)) { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).enable(preferences); LOG.trace("{} = enabled.", current); } else { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).disable(preferences); LOG.trace("{} = disabled.", current); } } } private  ViewerPreferencesUtils(); static NON_FULL_SCREEN_PAGE_MODE getNFSMode(PdfNonFullScreenPageMode nfsMode); static PageMode getPageMode(PdfPageMode mode); static PageLayout getPageLayout(PdfPageLayout layout); static READING_DIRECTION getDirection(PdfDirection direction); static DUPLEX getDuplex(PdfDuplex duplex); static PRINT_SCALING getPrintScaling(PdfPrintScaling scaling); static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled); }
ViewerPreferencesUtils { public static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) throws TaskException { if (preferences == null) { throw new TaskException("Unable to set preferences on a null instance."); } for (PdfBooleanPreference current : PdfBooleanPreference.values()) { if (enabled.contains(current)) { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).enable(preferences); LOG.trace("{} = enabled.", current); } else { PDFBoxActivableBooleanPreference.valueFromPdfBooleanPreference(current).disable(preferences); LOG.trace("{} = disabled.", current); } } } private  ViewerPreferencesUtils(); static NON_FULL_SCREEN_PAGE_MODE getNFSMode(PdfNonFullScreenPageMode nfsMode); static PageMode getPageMode(PdfPageMode mode); static PageLayout getPageLayout(PdfPageLayout layout); static READING_DIRECTION getDirection(PdfDirection direction); static DUPLEX getDuplex(PdfDuplex duplex); static PRINT_SCALING getPrintScaling(PdfPrintScaling scaling); static void setBooleanPreferences(PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled);  }