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

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

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

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

/**
 * Creates a scroll pane.
 *
 * @param comp The component this scroll pane should display.  This should
 *        be an instance of {@link RTextArea},
 *        <code>javax.swing.JLayer</code> (or the older
 *        <code>org.jdesktop.jxlayer.JXLayer</code>), or <code>null</code>.
 *        If this argument is <code>null</code>, you must call
 *        {@link #setViewportView(Component)}, passing in an instance of
 *        one of the types above.
 * @param lineNumbers Whether line numbers are initially enabled.
 * @param lineNumberColor The color to use for line numbers.
 */
public RTextScrollPane(Component comp, boolean lineNumbers,
            Color lineNumberColor) {
  super(comp);
  RTextArea textArea = getFirstRTextAreaDescendant(comp);
  // Create the gutter for this document.
  Font defaultFont = new Font("Monospaced", Font.PLAIN, 12);
  gutter = new Gutter(textArea);
  gutter.setLineNumberFont(defaultFont);
  gutter.setLineNumberColor(lineNumberColor);
  setLineNumbersEnabled(lineNumbers);
  // Set miscellaneous properties.
  setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS);
  setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
origin: bobbylight/RSyntaxTextArea

@Test
public void testGetLineNumberFont() {
  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(expected = IllegalArgumentException.class)
public void testSetLineNumberFont_NullArg() {
  RTextArea textArea = new RTextArea(PLAIN_TEXT);
  Gutter gutter = new Gutter(textArea);
  gutter.setLineNumberFont(null);
}
origin: bobbylight/RSyntaxTextArea

  baseFont.getSize();
Font font = getFont(fontName, Font.PLAIN, fontSize);
gutter.setLineNumberFont(font);
gutter.setFoldIndicatorForeground(foldIndicatorFG);
gutter.setFoldBackground(foldBG);
origin: org.nuiton.thirdparty/rsyntaxtextarea

/**
 * Creates a scroll pane with preferred size (width, height).
 *
 * @param area The text area this scroll pane will contain.  If this is
 *        <code>null</code>, you must call
 *        {@link #setViewportView(Component)}, passing in an
 *        {@link RTextArea}.
 * @param lineNumbers Whether line numbers are initially enabled.
 * @param lineNumberColor The color to use for line numbers.
 */
public RTextScrollPane(RTextArea area, boolean lineNumbers,
            Color lineNumberColor) {
  super(area);
  // Create the text area and set it inside this scroll bar area.
  textArea = area;
  // Create the gutter for this document.
  Font defaultFont = new Font("Monospaced", Font.PLAIN, 12);
  gutter = new Gutter(textArea);
  gutter.setLineNumberFont(defaultFont);
  gutter.setLineNumberColor(lineNumberColor);
  setLineNumbersEnabled(lineNumbers);
  // Set miscellaneous properties.
  setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS);
  setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
origin: org.codehaus.jtstand/jtstand-editor

/**
 * Creates a scroll pane with preferred size (width, height).
 *
 * @param area The text area this scroll pane will contain.  If this is
 *        <code>null</code>, you must call
 *        {@link #setViewportView(Component)}, passing in an
 *        {@link RTextArea}.
 * @param lineNumbers Whether line numbers are initially enabled.
 * @param lineNumberColor The color to use for line numbers.
 */
public RTextScrollPane(RTextArea area, boolean lineNumbers,
            Color lineNumberColor) {
  super(area);
  // Create the text area and set it inside this scroll bar area.
  textArea = area;
  // Create the gutter for this document.
  Font defaultFont = new Font("Monospaced", Font.PLAIN, 12);
  gutter = new Gutter(textArea);
  gutter.setLineNumberFont(defaultFont);
  gutter.setLineNumberColor(lineNumberColor);
  setLineNumbersEnabled(lineNumbers);
  // Set miscellaneous properties.
  setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS);
  setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
origin: bobbylight/RSyntaxTextArea

gutter.setIconRowHeaderInheritsGutterBackground(!gutter.getIconRowHeaderInheritsGutterBackground());
gutter.setLineNumberColor(Color.orange);
gutter.setLineNumberFont(font);
gutter.setFoldIndicatorForeground(Color.orange);
gutter.setFoldBackground(Color.orange);
origin: com.fifesoft/rsyntaxtextarea

/**
 * Creates a scroll pane.
 *
 * @param comp The component this scroll pane should display.  This should
 *        be an instance of {@link RTextArea},
 *        <code>javax.swing.JLayer</code> (or the older
 *        <code>org.jdesktop.jxlayer.JXLayer</code>), or <code>null</code>.
 *        If this argument is <code>null</code>, you must call
 *        {@link #setViewportView(Component)}, passing in an instance of
 *        one of the types above.
 * @param lineNumbers Whether line numbers are initially enabled.
 * @param lineNumberColor The color to use for line numbers.
 */
public RTextScrollPane(Component comp, boolean lineNumbers,
            Color lineNumberColor) {
  super(comp);
  RTextArea textArea = getFirstRTextAreaDescendant(comp);
  // Create the gutter for this document.
  Font defaultFont = new Font("Monospaced", Font.PLAIN, 12);
  gutter = new Gutter(textArea);
  gutter.setLineNumberFont(defaultFont);
  gutter.setLineNumberColor(lineNumberColor);
  setLineNumbersEnabled(lineNumbers);
  // Set miscellaneous properties.
  setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS);
  setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
origin: com.fifesoft/rsyntaxtextarea

  baseFont.getSize();
Font font = getFont(fontName, Font.PLAIN, fontSize);
gutter.setLineNumberFont(font);
gutter.setFoldIndicatorForeground(foldIndicatorFG);
gutter.setFoldBackground(foldBG);
org.fife.ui.rtextareaGuttersetLineNumberFont

Javadoc

Sets the font used for line numbers.

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.
  • 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

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Github Copilot alternatives
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