Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class CodeLineHighlight

  1. Object
  2. CodeLineHighlight

A band of whole lines painted behind the text of a CodeEditor: the lines a change touched, the body of a method being inspected, the lines a search found.

Lines are 1-based and the range is inclusive. The color is 0xRRGGBB, painted at the given opacity so the syntax colors stay readable on top of it. Where two bands overlap, the one given later is painted over the earlier one.

Constructors

public CodeLineHighlight(int startLine, int endLine, int color)A band from startLine to endLine, inclusive, at the default opacity.
public CodeLineHighlight(int startLine, int endLine, int color, int alpha)A band with an explicit opacity.

Methods

public int getStartLine()The first 1-based line.
public int getEndLine()The last 1-based line, inclusive.
public int getColor()The color, 0xRRGGBB.
public int getAlpha()The opacity, 0 to 255.

Inherited methods

Constructor details

CodeLineHighlight

public CodeLineHighlight(int startLine, int endLine, int color)
A band from startLine to endLine, inclusive, at the default opacity.

Parameters

startLine int
the first 1-based line
endLine int
the last 1-based line; a value below startLine paints startLine alone
color int
the band’s color, 0xRRGGBB

CodeLineHighlight

public CodeLineHighlight(int startLine, int endLine, int color, int alpha)
A band with an explicit opacity.

Parameters

startLine int
the first 1-based line
endLine int
the last 1-based line
color int
the band’s color, 0xRRGGBB
alpha int
the opacity, 0 (invisible) to 255 (opaque)

Method details

getStartLine

public int getStartLine()
The first 1-based line.

getEndLine

public int getEndLine()
The last 1-based line, inclusive.

getColor

public int getColor()
The color, 0xRRGGBB.

getAlpha

public int getAlpha()
The opacity, 0 to 255.