Class LinePainter
java.lang.Object
org.eclipse.nebula.widgets.richtext.painter.LinePainter
public class LinePainter
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description LinePainter() -
Method Summary
Modifier and Type Method Description voidaddInstruction(PaintInstruction instruction)org.eclipse.swt.graphics.FontMetricsgetBiggestMetrics()intgetContentWidth()intgetLineHeight()intgetNextJustifySpace()intgetTrimmedContentWidth()voidincreaseContentWidth(int width)Increase the static content with with spaces.voidincreaseTrimmedContentWidth(int width)Increase the static content with without spaces.voidpaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle area)
-
Constructor Details
-
LinePainter
public LinePainter()
-
-
Method Details
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle area) -
addInstruction
-
getBiggestMetrics
public org.eclipse.swt.graphics.FontMetrics getBiggestMetrics() -
getLineHeight
public int getLineHeight() -
getContentWidth
public int getContentWidth()- Returns:
- The static content width taking spaces into account.
-
increaseContentWidth
public void increaseContentWidth(int width)Increase the static content with with spaces.- Parameters:
width- The width that should be added to the static content width.
-
getTrimmedContentWidth
public int getTrimmedContentWidth()- Returns:
- The static content width without spaces.
-
increaseTrimmedContentWidth
public void increaseTrimmedContentWidth(int width)Increase the static content with without spaces.- Parameters:
width- The width that should be added to the static content width.
-
getNextJustifySpace
public int getNextJustifySpace()- Returns:
- The number of pixels that need to be added to render a text justified.
-