All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fife.ui.rtextarea.LineNumberFormatter Maven / Gradle / Ivy

Go to download

RSyntaxTextArea is the syntax highlighting text editor for Swing applications. Features include syntax highlighting for 40+ languages, code folding, code completion, regex find and replace, macros, code templates, undo/redo, line numbering and bracket matching.

There is a newer version: 3.5.2
Show newest version
/*
 * 29/07/2023
 *
 * LineNumber - Format line numbers into a comprehensible String.
 *
 * This library is distributed under a modified BSD license.  See the included
 * LICENSE file for details.
 */
package org.fife.ui.rtextarea;

/**
 * Formats line numbers into a comprehensible String to be
 * displayed to the user.
 *
 * @author Mino260806
 */
public interface LineNumberFormatter {
	/**
	 * Formats the given line number into a String.
	 *
	 * @param lineNumber the line number
	 * @return the formatted line number
	 */
	String format(int lineNumber);

	/**
	 * Returns the maximum number of characters of any string returned
	 * by {@link #format} provided a certain maximum line number.
	 *
	 * @param maxLineNumber the maximum line number
	 * @return the maximum length
	 */
	int getMaxLength(int maxLineNumber);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy