@Test public void nonFullScreenPageModeTest() { PdfViewerPreferences preferences = new PdfViewerPreferences(); PdfDictionary dictionary = preferences.getPdfObject(); Assert.assertEquals(0, dictionary.size()); preferences.setNonFullScreenPageMode(PdfViewerPreferences.PdfViewerPreferencesConstants.PRINT_AREA); Assert.assertEquals(0, dictionary.size()); preferences.setNonFullScreenPageMode(PdfViewerPreferences.PdfViewerPreferencesConstants.USE_THUMBS); Assert.assertEquals(1, dictionary.size()); Assert.assertEquals(PdfName.UseThumbs, dictionary.get(PdfName.NonFullScreenPageMode)); preferences.setNonFullScreenPageMode(PdfViewerPreferences.PdfViewerPreferencesConstants.USE_NONE); Assert.assertEquals(1, dictionary.size()); Assert.assertEquals(PdfName.UseNone, dictionary.get(PdfName.NonFullScreenPageMode)); preferences.setNonFullScreenPageMode(PdfViewerPreferences.PdfViewerPreferencesConstants.USE_OC); Assert.assertEquals(1, dictionary.size()); Assert.assertEquals(PdfName.UseOC, dictionary.get(PdfName.NonFullScreenPageMode)); preferences.setNonFullScreenPageMode(PdfViewerPreferences.PdfViewerPreferencesConstants.USE_OUTLINES); Assert.assertEquals(1, dictionary.size()); Assert.assertEquals(PdfName.UseOutlines, dictionary.get(PdfName.NonFullScreenPageMode)); }
public PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode) { switch (nonFullScreenPageMode) { case USE_NONE: put(PdfName.NonFullScreenPageMode, PdfName.UseNone); break; case USE_OUTLINES: put(PdfName.NonFullScreenPageMode, PdfName.UseOutlines); break; case USE_THUMBS: put(PdfName.NonFullScreenPageMode, PdfName.UseThumbs); break; case USE_OC: put(PdfName.NonFullScreenPageMode, PdfName.UseOC); break; default: } return this; }
PdfViewerPreferences extends PdfObjectWrapper<PdfDictionary> { public PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode) { switch (nonFullScreenPageMode) { case USE_NONE: put(PdfName.NonFullScreenPageMode, PdfName.UseNone); break; case USE_OUTLINES: put(PdfName.NonFullScreenPageMode, PdfName.UseOutlines); break; case USE_THUMBS: put(PdfName.NonFullScreenPageMode, PdfName.UseThumbs); break; case USE_OC: put(PdfName.NonFullScreenPageMode, PdfName.UseOC); break; default: } return this; } }
PdfViewerPreferences extends PdfObjectWrapper<PdfDictionary> { public PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode) { switch (nonFullScreenPageMode) { case USE_NONE: put(PdfName.NonFullScreenPageMode, PdfName.UseNone); break; case USE_OUTLINES: put(PdfName.NonFullScreenPageMode, PdfName.UseOutlines); break; case USE_THUMBS: put(PdfName.NonFullScreenPageMode, PdfName.UseThumbs); break; case USE_OC: put(PdfName.NonFullScreenPageMode, PdfName.UseOC); break; default: } return this; } PdfViewerPreferences();  PdfViewerPreferences(PdfDictionary pdfObject); }
PdfViewerPreferences extends PdfObjectWrapper<PdfDictionary> { public PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode) { switch (nonFullScreenPageMode) { case USE_NONE: put(PdfName.NonFullScreenPageMode, PdfName.UseNone); break; case USE_OUTLINES: put(PdfName.NonFullScreenPageMode, PdfName.UseOutlines); break; case USE_THUMBS: put(PdfName.NonFullScreenPageMode, PdfName.UseThumbs); break; case USE_OC: put(PdfName.NonFullScreenPageMode, PdfName.UseOC); break; default: } return this; } PdfViewerPreferences();  PdfViewerPreferences(PdfDictionary pdfObject); PdfViewerPreferences setHideToolbar(boolean hideToolbar); PdfViewerPreferences setHideMenubar(boolean hideMenubar); PdfViewerPreferences setHideWindowUI(boolean hideWindowUI); PdfViewerPreferences setFitWindow(boolean fitWindow); PdfViewerPreferences setCenterWindow(boolean centerWindow); PdfViewerPreferences setDisplayDocTitle(boolean displayDocTitle); PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode); PdfViewerPreferences setDirection(PdfViewerPreferencesConstants direction); PdfViewerPreferences setViewArea(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setViewClip(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setPrintArea(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setPrintClip(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setPrintScaling(PdfViewerPreferencesConstants printScaling); PdfViewerPreferences setDuplex(PdfViewerPreferencesConstants duplex); PdfViewerPreferences setPickTrayByPDFSize(boolean pickTrayByPdfSize); PdfViewerPreferences setPrintPageRange(int[] printPageRange); PdfViewerPreferences setNumCopies(int numCopies); PdfViewerPreferences setEnforce(PdfArray enforce); PdfArray getEnforce(); PdfViewerPreferences put(PdfName key, PdfObject value); }
PdfViewerPreferences extends PdfObjectWrapper<PdfDictionary> { public PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode) { switch (nonFullScreenPageMode) { case USE_NONE: put(PdfName.NonFullScreenPageMode, PdfName.UseNone); break; case USE_OUTLINES: put(PdfName.NonFullScreenPageMode, PdfName.UseOutlines); break; case USE_THUMBS: put(PdfName.NonFullScreenPageMode, PdfName.UseThumbs); break; case USE_OC: put(PdfName.NonFullScreenPageMode, PdfName.UseOC); break; default: } return this; } PdfViewerPreferences();  PdfViewerPreferences(PdfDictionary pdfObject); PdfViewerPreferences setHideToolbar(boolean hideToolbar); PdfViewerPreferences setHideMenubar(boolean hideMenubar); PdfViewerPreferences setHideWindowUI(boolean hideWindowUI); PdfViewerPreferences setFitWindow(boolean fitWindow); PdfViewerPreferences setCenterWindow(boolean centerWindow); PdfViewerPreferences setDisplayDocTitle(boolean displayDocTitle); PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants nonFullScreenPageMode); PdfViewerPreferences setDirection(PdfViewerPreferencesConstants direction); PdfViewerPreferences setViewArea(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setViewClip(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setPrintArea(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setPrintClip(PdfViewerPreferencesConstants pageBoundary); PdfViewerPreferences setPrintScaling(PdfViewerPreferencesConstants printScaling); PdfViewerPreferences setDuplex(PdfViewerPreferencesConstants duplex); PdfViewerPreferences setPickTrayByPDFSize(boolean pickTrayByPdfSize); PdfViewerPreferences setPrintPageRange(int[] printPageRange); PdfViewerPreferences setNumCopies(int numCopies); PdfViewerPreferences setEnforce(PdfArray enforce); PdfArray getEnforce(); PdfViewerPreferences put(PdfName key, PdfObject value);  }