Tabnine Logo
Gutter.setBookmarkingEnabled
Code IndexAdd Tabnine to your IDE (free)

How to use
setBookmarkingEnabled
method
in
org.fife.ui.rtextarea.Gutter

Best Java code snippets using org.fife.ui.rtextarea.Gutter.setBookmarkingEnabled (Showing top 7 results out of 315)

origin: bobbylight/RSyntaxTextArea

  DemoRootPane() {
    textArea = createTextArea();
    setText("JavaExample.txt");
    textArea.setSyntaxEditingStyle(SYNTAX_STYLE_JAVA);

    scrollPane = new RTextScrollPane(textArea, true);
    Gutter gutter = scrollPane.getGutter();
    gutter.setBookmarkingEnabled(true);
    URL url = getClass().getResource("bookmark.png");
    gutter.setBookmarkIcon(new ImageIcon(url));
    getContentPane().add(scrollPane);
    ErrorStrip errorStrip = new ErrorStrip(textArea);
//errorStrip.setBackground(java.awt.Color.blue);
    getContentPane().add(errorStrip, BorderLayout.LINE_END);
    setJMenuBar(createMenuBar());
  }

origin: bobbylight/RSyntaxTextArea

@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
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testIsBookmarkingEnabled() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertFalse(gutter.isBookmarkingEnabled());
  gutter.setBookmarkingEnabled(true);
  Assert.assertTrue(gutter.isBookmarkingEnabled());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testSetBookmarkingEnabled() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertFalse(gutter.isBookmarkingEnabled());
  gutter.setBookmarkingEnabled(true);
  Assert.assertTrue(gutter.isBookmarkingEnabled());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testToggleBookmark() 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.assertFalse(gutter.toggleBookmark(1));
  Assert.assertTrue(gutter.toggleBookmark(1));
}
origin: bobbylight/RSyntaxTextArea

@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
}
origin: com.fifesoft/languagesupport

RTextScrollPane scrollPane = new RTextScrollPane(textArea, true);
scrollPane.setIconRowHeaderEnabled(true);
scrollPane.getGutter().setBookmarkingEnabled(true);
org.fife.ui.rtextareaGuttersetBookmarkingEnabled

Javadoc

Sets whether bookmarking is enabled. Note that a bookmarking icon must be set via #setBookmarkIcon(Icon) before bookmarks are truly enabled.

Popular methods of Gutter

  • setLineNumberColor
    Sets the color to use to paint line numbers.
  • setBackground
  • <init>
    Constructor.
  • addLineTrackingIcon
    Adds an icon that tracks an offset in the document, and is displayed adjacent to the line numbers. T
  • addOffsetTrackingIcon
    Adds an icon that tracks an offset in the document, and is displayed adjacent to the line numbers. T
  • getBookmarks
    Returns the bookmarks known to this gutter.
  • getLineNumbersEnabled
    Returns true if the line numbers are enabled and visible.
  • isIconRowHeaderEnabled
    Returns whether the icon row header is enabled.
  • setBorderColor
    Sets the color for the "border" line.
  • setIconRowHeaderEnabled
    Toggles whether the icon row header (used for breakpoints, bookmarks, etc.) is enabled.
  • setLineNumberFont
    Sets the font used for line numbers.
  • setLineNumbersEnabled
    Toggles whether or not line numbers are visible.
  • setLineNumberFont,
  • setLineNumbersEnabled,
  • toggleBookmark,
  • add,
  • getBackground,
  • getBorder,
  • getComponent,
  • getComponentCount,
  • remove,
  • repaint

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Path (java.nio.file)
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JLabel (javax.swing)
  • JList (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now