public class VerticalTextPainter extends AbstractTextPainter
calculateByTextHeight, calculateByTextLength, DOT, EMPTY, LINE_SEPARATOR, NEW_LINE_REGEX, paintBg, paintFg, spacing, wrapText| Constructor and Description |
|---|
VerticalTextPainter() |
VerticalTextPainter(boolean wrapText,
boolean paintBg) |
VerticalTextPainter(boolean wrapText,
boolean paintBg,
boolean calculate) |
VerticalTextPainter(boolean wrapText,
boolean paintBg,
boolean calculateByTextLength,
boolean calculateByTextHeight) |
VerticalTextPainter(boolean wrapText,
boolean paintBg,
int spacing) |
VerticalTextPainter(boolean wrapText,
boolean paintBg,
int spacing,
boolean calculate) |
VerticalTextPainter(boolean wrapText,
boolean paintBg,
int spacing,
boolean calculateByTextLength,
boolean calculateByTextHeight) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculatePadding(ILayerCell cell,
int availableLength)
This method is used to determine the padding from the cell to the available length.
|
int |
getPreferredHeight(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred height of the cell when rendered by this painter.
|
int |
getPreferredWidth(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred width of the cell when rendered by this painter.
|
void |
paintCell(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rectangle,
IConfigRegistry configRegistry) |
protected void |
setNewMinLength(ILayerCell cell,
int contentHeight)
This method gets only called if automatic length calculation is enabled.
|
convertDataType, getLengthFromCache, getNumberOfNewLines, getTextToDisplay, renderStrikethrough, renderUnderlined, setStrikethrough, setUnderline, setupGCFromConfiggetBackgroundColourgetCellPainterAt, getWrappedPainter, getWrappedPainterBounds, setWrappedPainterpublic VerticalTextPainter()
public VerticalTextPainter(boolean wrapText,
boolean paintBg)
wrapText - split text over multiple linespaintBg - skips painting the background if is FALSEpublic VerticalTextPainter(boolean wrapText,
boolean paintBg,
int spacing)
wrapText - split text over multiple linespaintBg - skips painting the background if is FALSEspacing - The space between text and cell borderpublic VerticalTextPainter(boolean wrapText,
boolean paintBg,
boolean calculate)
wrapText - split text over multiple linespaintBg - skips painting the background if is FALSEcalculate - tells the text painter to calculate the cell borders regarding the contentpublic VerticalTextPainter(boolean wrapText,
boolean paintBg,
boolean calculateByTextLength,
boolean calculateByTextHeight)
wrapText - split text over multiple linespaintBg - skips painting the background if is FALSEcalculateByTextLength - tells the text painter to calculate the cell border by containing
text length. For horizontal text rendering, this means the width of the cell is calculated
by content, for vertical text rendering the height is calculatedcalculateByTextHeight - tells the text painter to calculate the cell border by containing
text height. For horizontal text rendering, this means the height of the cell is calculated
by content, for vertical text rendering the width is calculatedpublic VerticalTextPainter(boolean wrapText,
boolean paintBg,
int spacing,
boolean calculate)
wrapText - split text over multiple linespaintBg - skips painting the background if is FALSEspacing - The space between text and cell bordercalculate - tells the text painter to calculate the cell borders regarding the contentpublic VerticalTextPainter(boolean wrapText,
boolean paintBg,
int spacing,
boolean calculateByTextLength,
boolean calculateByTextHeight)
wrapText - split text over multiple linespaintBg - skips painting the background if is FALSEspacing - The space between text and cell bordercalculateByTextLength - tells the text painter to calculate the cell border by containing
text length. For horizontal text rendering, this means the width of the cell is calculated
by content, for vertical text rendering the height is calculatedcalculateByTextHeight - tells the text painter to calculate the cell border by containing
text height. For horizontal text rendering, this means the height of the cell is calculated
by content, for vertical text rendering the width is calculatedpublic int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPaintergetPreferredWidth in interface ICellPaintergetPreferredWidth in class CellPainterWrapperpublic int getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPaintergetPreferredHeight in interface ICellPaintergetPreferredHeight in class CellPainterWrapperpublic void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry)
paintCell in interface ICellPainterpaintCell in class BackgroundPainterprotected void setNewMinLength(ILayerCell cell, int contentHeight)
AbstractTextPaintersetNewMinLength in class AbstractTextPaintercell - the current cell that is paintedcontentHeight - the length of the contentprotected int calculatePadding(ILayerCell cell, int availableLength)
AbstractTextPaintercalculatePadding in class AbstractTextPaintercell - the current cell which should be resizedavailableLength - the length value that is available and was given into paintCell()
as Rectangle argumentCopyright © 2013. All Rights Reserved.