public class LineNumberConverterAdapter extends java.lang.Object implements LineNumberConverter
EditorGutterComponentEx.setLineNumberConvertor(TIntFunction)
and
EditorGutterComponentEx.setLineNumberConvertor(TIntFunction, TIntFunction)
to
EditorGutter.setLineNumberConverter(LineNumberConverter)
and
EditorGutter.setLineNumberConverter(LineNumberConverter, LineNumberConverter)
LineNumberConverter.Increasing
DEFAULT
Constructor and Description |
---|
LineNumberConverterAdapter(TIntFunction function) |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
convert(Editor editor,
int lineNumber)
Defines the number to be displayed in gutter for the given document line.
|
java.lang.Integer |
getMaxLineNumber(Editor editor)
Number which should be used to calculate width of line number area in gutter.
|
public LineNumberConverterAdapter(TIntFunction function)
public java.lang.Integer convert(Editor editor, int lineNumber)
LineNumberConverter
convert
in interface LineNumberConverter
lineNumber
- one-based line numbernull
means no number is displayedpublic java.lang.Integer getMaxLineNumber(Editor editor)
LineNumberConverter
null
means no width will be allocated to the line number area.getMaxLineNumber
in interface LineNumberConverter