Class BorderPainter
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.painter.cell.BorderPainter
-
public class BorderPainter extends Object
Draws borders based on a 2D array ofBorderPainter.BorderCell
and styled accordingly to aBorderStyle
.- Since:
- 1.5
- Author:
- Loris Securo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BorderPainter.BorderCell
Stores the bounds and the state of a cell that will be used to draw borders.static class
BorderPainter.LineValues
Utility class used to return coordinates and lengths at once.static class
BorderPainter.PaintModeEnum
-
Field Summary
Fields Modifier and Type Field Description protected BorderPainter.BorderCell[][]
borderCells
protected BorderStyle
borderStyle
protected BorderPainter.PaintModeEnum
paintMode
-
Constructor Summary
Constructors Constructor Description BorderPainter(BorderPainter.BorderCell[][] borderCells, BorderStyle borderStyle)
BorderPainter(BorderPainter.BorderCell[][] borderCells, BorderStyle borderStyle, BorderPainter.PaintModeEnum paintMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
drawLineBottom(org.eclipse.swt.graphics.GC gc, int ix, int iy)
protected void
drawLineLeft(org.eclipse.swt.graphics.GC gc, int ix, int iy)
protected void
drawLineRight(org.eclipse.swt.graphics.GC gc, int ix, int iy)
protected void
drawLineTop(org.eclipse.swt.graphics.GC gc, int ix, int iy)
protected BorderPainter.LineValues
getLineValuesBottom(int ix, int iy)
protected BorderPainter.LineValues
getLineValuesLeft(int ix, int iy)
protected BorderPainter.LineValues
getLineValuesRight(int ix, int iy)
protected BorderPainter.LineValues
getLineValuesTop(int ix, int iy)
protected boolean
isInside(int ix, int iy)
protected boolean
isValid(int ix, int iy)
void
paintBorder(org.eclipse.swt.graphics.GC gc)
-
-
-
Field Detail
-
borderCells
protected BorderPainter.BorderCell[][] borderCells
-
borderStyle
protected BorderStyle borderStyle
-
paintMode
protected BorderPainter.PaintModeEnum paintMode
-
-
Constructor Detail
-
BorderPainter
public BorderPainter(BorderPainter.BorderCell[][] borderCells, BorderStyle borderStyle)
-
BorderPainter
public BorderPainter(BorderPainter.BorderCell[][] borderCells, BorderStyle borderStyle, BorderPainter.PaintModeEnum paintMode)
-
-
Method Detail
-
paintBorder
public void paintBorder(org.eclipse.swt.graphics.GC gc)
-
getLineValuesLeft
protected BorderPainter.LineValues getLineValuesLeft(int ix, int iy)
-
getLineValuesRight
protected BorderPainter.LineValues getLineValuesRight(int ix, int iy)
-
getLineValuesTop
protected BorderPainter.LineValues getLineValuesTop(int ix, int iy)
-
getLineValuesBottom
protected BorderPainter.LineValues getLineValuesBottom(int ix, int iy)
-
drawLineLeft
protected void drawLineLeft(org.eclipse.swt.graphics.GC gc, int ix, int iy)
-
drawLineRight
protected void drawLineRight(org.eclipse.swt.graphics.GC gc, int ix, int iy)
-
drawLineTop
protected void drawLineTop(org.eclipse.swt.graphics.GC gc, int ix, int iy)
-
drawLineBottom
protected void drawLineBottom(org.eclipse.swt.graphics.GC gc, int ix, int iy)
-
isInside
protected boolean isInside(int ix, int iy)
-
isValid
protected boolean isValid(int ix, int iy)
-
-