@Test public void getBookmarks_EmptyArray() { RTextArea textArea = new RTextArea(PLAIN_TEXT); Gutter gutter = new Gutter(textArea); Assert.assertEquals(0, gutter.getBookmarks().length); // Non-null }
@Test public void getBookmarks_SomeBookmarks_BookmarkingDisabled() throws Exception { RTextArea textArea = new RTextArea(PLAIN_TEXT); Gutter gutter = new Gutter(textArea); Assert.assertEquals(0, gutter.getBookmarks().length); // Non-null }
@Test public void getBookmarks_SomeBookmarks_NoIcon() throws Exception { RTextArea textArea = new RTextArea(PLAIN_TEXT); Gutter gutter = new Gutter(textArea); gutter.setBookmarkingEnabled(true); // Both enabled state and icon are reuqired Assert.assertEquals(0, gutter.getBookmarks().length); // Non-null }
GutterIconInfo[] bookmarks = gutter.getBookmarks(); if (bookmarks.length==0) { UIManager.getLookAndFeel().
@Test public void getBookmarks_SomeBookmarks() throws Exception { RTextArea textArea = new RTextArea(PLAIN_TEXT); Gutter gutter = new Gutter(textArea); gutter.setBookmarkingEnabled(true); gutter.setBookmarkIcon(new TestIcon()); Assert.assertTrue(gutter.toggleBookmark(1)); Assert.assertTrue(gutter.toggleBookmark(2)); Assert.assertEquals(2, gutter.getBookmarks().length); // Non-null }
GutterIconInfo[] bookmarks = gutter.getBookmarks(); if (bookmarks.length==0) { UIManager.getLookAndFeel().
GutterIconInfo[] bookmarks = gutter.getBookmarks(); if (bookmarks.length==0) { UIManager.getLookAndFeel().
GutterIconInfo[] bookmarks = gutter.getBookmarks(); if (bookmarks.length==0) { UIManager.getLookAndFeel().