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

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

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

origin: bobbylight/RSyntaxTextArea

@Override
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
  Gutter gutter = RSyntaxUtilities.getGutter(textArea);
  if (gutter!=null) {
    int line = textArea.getCaretLineNumber();
    try {
      gutter.toggleBookmark(line);
    } catch (BadLocationException ble) { // Never happens
      UIManager.getLookAndFeel().
            provideErrorFeedback(textArea);
      ble.printStackTrace();
    }
  }
}
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/rsyntaxtextarea

@Override
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
  Gutter gutter = RSyntaxUtilities.getGutter(textArea);
  if (gutter!=null) {
    int line = textArea.getCaretLineNumber();
    try {
      gutter.toggleBookmark(line);
    } catch (BadLocationException ble) { // Never happens
      UIManager.getLookAndFeel().
            provideErrorFeedback(textArea);
      ble.printStackTrace();
    }
  }
}
origin: org.nuiton.thirdparty/rsyntaxtextarea

public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
  Container parent = textArea.getParent();
  if (parent instanceof JViewport) {
    parent = parent.getParent();
    if (parent instanceof RTextScrollPane) {
      RTextScrollPane sp = (RTextScrollPane)parent;
      Gutter gutter = sp.getGutter();
      int line = textArea.getCaretLineNumber();
      try {
        gutter.toggleBookmark(line);
      } catch (BadLocationException ble) { // Never happens
        UIManager.getLookAndFeel().
              provideErrorFeedback(textArea);
        ble.printStackTrace();
      }
    }
  }
}
origin: org.codehaus.jtstand/jtstand-editor

public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
  Container parent = textArea.getParent();
  if (parent instanceof JViewport) {
    parent = parent.getParent();
    if (parent instanceof RTextScrollPane) {
      RTextScrollPane sp = (RTextScrollPane)parent;
      Gutter gutter = sp.getGutter();
      int line = textArea.getCaretLineNumber();
      try {
        gutter.toggleBookmark(line);
      } catch (BadLocationException ble) { // Never happens
        UIManager.getLookAndFeel().
              provideErrorFeedback(textArea);
        ble.printStackTrace();
      }
    }
  }
}
org.fife.ui.rtextareaGuttertoggleBookmark

Javadoc

Programatically toggles whether there is a bookmark for the specified line. If bookmarking is not enabled, this method does nothing.

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,
  • add,
  • getBackground,
  • getBorder,
  • getComponent,
  • getComponentCount,
  • remove,
  • repaint

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
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