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

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

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

origin: bobbylight/RSyntaxTextArea

/**
 * Adds an icon that tracks an offset in the document, and is displayed
 * adjacent to the line numbers.  This is useful for marking things such
 * as source code errors.
 *
 * @param offs The offset to track.
 * @param icon The icon to display.  This should be small (say 16x16).
 * @return A tag for this icon.
 * @throws BadLocationException If <code>offs</code> is an invalid offset
 *         into the text area.
 * @see #addOffsetTrackingIcon(int, Icon, String)
 * @see #addLineTrackingIcon(int, Icon)
 * @see #removeTrackingIcon(GutterIconInfo)
 */
public GutterIconInfo addOffsetTrackingIcon(int offs, Icon icon)
                      throws BadLocationException {
  return addOffsetTrackingIcon(offs, icon, null);
}
origin: bobbylight/RSyntaxTextArea

/**
 * Adds an icon that tracks an offset in the document, and is displayed
 * adjacent to the line numbers.  This is useful for marking things such
 * as source code errors.
 *
 * @param line The line to track (zero-based).
 * @param icon The icon to display.  This should be small (say 16x16).
 * @param tip An optional tool tip for the icon.
 * @return A tag for this icon.  This can later be used in a call to
 *         {@link #removeTrackingIcon(GutterIconInfo)} to remove this
 *         icon.
 * @throws BadLocationException If <code>offs</code> is an invalid offset
 *         into the text area.
 * @see #addLineTrackingIcon(int, Icon)
 * @see #addOffsetTrackingIcon(int, Icon)
 * @see #removeTrackingIcon(GutterIconInfo)
 */
public GutterIconInfo addLineTrackingIcon(int line, Icon icon, String tip)
                    throws BadLocationException {
  int offs = textArea.getLineStartOffset(line);
  return addOffsetTrackingIcon(offs, icon, tip);
}
origin: bobbylight/RSyntaxTextArea

@Test(expected = BadLocationException.class)
public void testAddOffsetTrackingIcon_2Arg_Invalid() throws Exception {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon icon = new TestIcon();
  gutter.addOffsetTrackingIcon(1024, icon);
}
origin: bobbylight/RSyntaxTextArea

@Test(expected = BadLocationException.class)
public void testAddOffsetTrackingIcon_3Arg_Invalid() throws Exception {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon icon = new TestIcon();
  String tip = "tip text";
  gutter.addOffsetTrackingIcon(1024, icon, tip);
}
origin: com.fifesoft/rsyntaxtextarea

/**
 * Adds an icon that tracks an offset in the document, and is displayed
 * adjacent to the line numbers.  This is useful for marking things such
 * as source code errors.
 *
 * @param offs The offset to track.
 * @param icon The icon to display.  This should be small (say 16x16).
 * @return A tag for this icon.
 * @throws BadLocationException If <code>offs</code> is an invalid offset
 *         into the text area.
 * @see #addOffsetTrackingIcon(int, Icon, String)
 * @see #addLineTrackingIcon(int, Icon)
 * @see #removeTrackingIcon(GutterIconInfo)
 */
public GutterIconInfo addOffsetTrackingIcon(int offs, Icon icon)
                      throws BadLocationException {
  return addOffsetTrackingIcon(offs, icon, null);
}
origin: org.nuiton.thirdparty/rsyntaxtextarea

/**
 * Adds an icon that tracks an offset in the document, and is displayed
 * adjacent to the line numbers.  This is useful for marking things such
 * as source code errors.
 *
 * @param line The line to track (zero-based).
 * @param icon The icon to display.  This should be small (say 16x16).
 * @return A tag for this icon.
 * @throws BadLocationException If <code>offs</code> is an invalid offset
 *         into the text area.
 * @see #addOffsetTrackingIcon(int, Icon)
 * @see #removeTrackingIcon(GutterIconInfo)
 */
public GutterIconInfo addLineTrackingIcon(int line, Icon icon)
                    throws BadLocationException {
  int offs = textArea.getLineStartOffset(line);
  return addOffsetTrackingIcon(offs, icon);
}
origin: org.codehaus.jtstand/jtstand-editor

/**
 * Adds an icon that tracks an offset in the document, and is displayed
 * adjacent to the line numbers.  This is useful for marking things such
 * as source code errors.
 *
 * @param line The line to track (zero-based).
 * @param icon The icon to display.  This should be small (say 16x16).
 * @return A tag for this icon.
 * @throws BadLocationException If <code>offs</code> is an invalid offset
 *         into the text area.
 * @see #addOffsetTrackingIcon(int, Icon)
 * @see #removeTrackingIcon(GutterIconInfo)
 */
public GutterIconInfo addLineTrackingIcon(int line, Icon icon)
                    throws BadLocationException {
  int offs = textArea.getLineStartOffset(line);
  return addOffsetTrackingIcon(offs, icon);
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testAddOffsetTrackingIcon_2Arg_Valid() throws Exception {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon icon = new TestIcon();
  GutterIconInfo gii = gutter.addOffsetTrackingIcon(17, icon);
  Assert.assertTrue(gii.getIcon() == icon);
  Assert.assertEquals(17, gii.getMarkedOffset());
  Assert.assertNull(gii.getToolTip());
  textArea.insert("a", 3);
  Assert.assertEquals(18, gii.getMarkedOffset());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testAddOffsetTrackingIcon_3Arg_Valid() throws Exception {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon icon = new TestIcon();
  String tip = "tip text";
  GutterIconInfo gii = gutter.addOffsetTrackingIcon(17, icon, tip);
  Assert.assertTrue(gii.getIcon() == icon);
  Assert.assertEquals(17, gii.getMarkedOffset());
  Assert.assertEquals(tip, gii.getToolTip());
  textArea.insert("a", 3);
  Assert.assertEquals(18, gii.getMarkedOffset());
}
origin: com.fifesoft/rsyntaxtextarea

/**
 * Adds an icon that tracks an offset in the document, and is displayed
 * adjacent to the line numbers.  This is useful for marking things such
 * as source code errors.
 *
 * @param line The line to track (zero-based).
 * @param icon The icon to display.  This should be small (say 16x16).
 * @param tip An optional tool tip for the icon.
 * @return A tag for this icon.  This can later be used in a call to
 *         {@link #removeTrackingIcon(GutterIconInfo)} to remove this
 *         icon.
 * @throws BadLocationException If <code>offs</code> is an invalid offset
 *         into the text area.
 * @see #addLineTrackingIcon(int, Icon)
 * @see #addOffsetTrackingIcon(int, Icon)
 * @see #removeTrackingIcon(GutterIconInfo)
 */
public GutterIconInfo addLineTrackingIcon(int line, Icon icon, String tip)
                    throws BadLocationException {
  int offs = textArea.getLineStartOffset(line);
  return addOffsetTrackingIcon(offs, icon, tip);
}
org.fife.ui.rtextareaGutteraddOffsetTrackingIcon

Javadoc

Adds an icon that tracks an offset in the document, and is displayed adjacent to the line numbers. This is useful for marking things such as source code errors.

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
  • 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.
  • toggleBookmark
    Programatically toggles whether there is a bookmark for the specified line. If bookmarking is not en
  • setLineNumbersEnabled,
  • toggleBookmark,
  • add,
  • getBackground,
  • getBorder,
  • getComponent,
  • getComponentCount,
  • remove,
  • repaint

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Vim 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