Tabnine Logo
Gutter.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.fife.ui.rtextarea.Gutter
constructor

Best Java code snippets using org.fife.ui.rtextarea.Gutter.<init> (Showing top 20 results out of 315)

origin: bobbylight/RSyntaxTextArea

@Test
public void getBookmarks_EmptyArray() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertEquals(0, gutter.getBookmarks().length); // Non-null
}
origin: bobbylight/RSyntaxTextArea

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

@Test(expected = BadLocationException.class)
public void testAddLineTrackingIcon_3Arg_Invalid() throws Exception {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon icon = new TestIcon();
  String tip = "tip text";
  gutter.addLineTrackingIcon(4, icon, tip);
}
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: bobbylight/RSyntaxTextArea

@Test
public void testSetLineNumberFont() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Font font = new Font("Comic Sans", Font.PLAIN, 13);
  gutter.setLineNumberFont(font);
  Assert.assertEquals(font, gutter.getLineNumberFont());
  font = new Font("Arial", Font.ITALIC, 22);
  gutter.setLineNumberFont(font);
  Assert.assertEquals(font, gutter.getLineNumberFont());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testSetFoldIcons_Simple() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon collapsedIcon = new TestIcon();
  Icon expandedIcon = new TestIcon();
  gutter.setFoldIcons(collapsedIcon, expandedIcon);
  // Not much we can verify here
}
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 testGetIconRowHeaderInheritsGutterBackground() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertFalse(gutter.getIconRowHeaderInheritsGutterBackground());
  gutter.setIconRowHeaderInheritsGutterBackground(true);
  Assert.assertTrue(gutter.getIconRowHeaderInheritsGutterBackground());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testGetShowCollapsedRegionToolTips() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertTrue(gutter.getShowCollapsedRegionToolTips());
  gutter.setShowCollapsedRegionToolTips(true);
  Assert.assertTrue(gutter.getShowCollapsedRegionToolTips());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testRemoveTrackingIcon_Simple() throws Exception {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Icon icon = new TestIcon();
  textArea.setSize(200, 200);
  GutterIconInfo info = gutter.addLineTrackingIcon(0, icon);
  Point p = new Point(0, 4);
  Assert.assertEquals(1, gutter.getTrackingIcons(p).length);
  gutter.removeTrackingIcon(info);
  Assert.assertEquals(0, gutter.getTrackingIcons(p).length);
}
origin: bobbylight/RSyntaxTextArea

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

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

@Test
public void testSetLineNumberStartIndex() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertEquals(1, gutter.getLineNumberingStartIndex());
  gutter.setLineNumberingStartIndex(24);
  Assert.assertEquals(24, gutter.getLineNumberingStartIndex());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testSetShowCollapsedRegionToolTips() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertTrue(gutter.getShowCollapsedRegionToolTips());
  gutter.setShowCollapsedRegionToolTips(true);
  Assert.assertTrue(gutter.getShowCollapsedRegionToolTips());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testGetActiveLineRangeColor() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Color color = Color.blue;
  gutter.setActiveLineRangeColor(color);
  Assert.assertEquals(color, gutter.getActiveLineRangeColor());
  color = Color.red;
  gutter.setActiveLineRangeColor(color);
  Assert.assertEquals(color, gutter.getActiveLineRangeColor());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testGetBookmarkIcon() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertNull(gutter.getBookmarkIcon());
  Icon icon = new TestIcon();
  gutter.setBookmarkIcon(icon);
  Assert.assertTrue(icon == gutter.getBookmarkIcon());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testGetLineNumberColor() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Color color = Color.red;
  gutter.setLineNumberColor(color);
  Assert.assertEquals(color, gutter.getLineNumberColor());
  color = Color.green;
  gutter.setLineNumberColor(color);
  Assert.assertEquals(color, gutter.getLineNumberColor());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testSetBorderColor() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Color color = Color.red;
  gutter.setBorderColor(color);
  Assert.assertEquals(color, gutter.getBorderColor());
  color = Color.green;
  gutter.setBorderColor(color);
  Assert.assertEquals(color, gutter.getBorderColor());
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testSetFoldIndicatorEnabled() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  Assert.assertFalse(gutter.isFoldIndicatorEnabled());
  gutter.setFoldIndicatorEnabled(true);
  Assert.assertTrue(gutter.isFoldIndicatorEnabled());
  gutter.setFoldIndicatorEnabled(false);
  Assert.assertFalse(gutter.isFoldIndicatorEnabled());
}
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());
}
org.fife.ui.rtextareaGutter<init>

Javadoc

Constructor.

Popular methods of Gutter

  • setLineNumberColor
    Sets the color to use to paint line numbers.
  • setBackground
  • 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.
  • 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

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JTable (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for WebStorm
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