abstract class webfwt::CanvasTable
sys::Obj fwt::Widget fwt::Canvas webfwt::CanvasTable
@Js
CanvasTable renders an entire table in an Canvas widget, allowing each cell to be fully customized by painting with a Graphics context.
- cellBorder
-
const Color cellBorder := Color.<ctor>("#d9d9d9")
Color of border between cells.
- cellPosToTable
-
Point cellPosToTable(Point pos, Int col, Int row)
Get cell position relative to table.
- cellSelectedBorder
-
const Color cellSelectedBorder := Color.<ctor>("#346dbe")
Color of border between cells when row is selected.
- colNameWrap
-
const Bool colNameWrap
Wrap the column names
- colNames
-
const Str[] colNames := Str[,]
Column names.
- colWidths
-
const Num[] colWidths := Num[,]
Column widths. Integer values represent exact widths. Float values represent a percentage of remaining space (0..1).
- headerFont
-
const Font headerFont := defHeaderFont
- make
-
new make(|This|? f)
Constructor.
- numRows
-
abstract Int numRows()
Get number of rows in table.
- onAction
-
EventListeners onAction()
Callback when a row is double clicked or Space is pressed.
- id: EventId.action
- index: the row index
- onCellMoved
-
virtual Void onCellMoved(Event e, Int col, Int row, Point pos, Size cellSize)
Callback when mouse moved in cell.
- onCellPressed
-
virtual Void onCellPressed(Event e, Int col, Int row, Point pos, Size cellSize)
Callback when mouse pressed in cell.
- onPaint
- onSort
-
virtual Void onSort(Int col, SortMode mode)
Callback when a column is sorted.
- paintCell
-
abstract Void paintCell(Graphics g, Int col, Int row, Bool selected, Size cellSize)
Paint the cell at given index.
- paintCellOverlay
-
virtual Void paintCellOverlay(Graphics g, Int col, Int row, Bool selected, Size cellSize)
Paint the cell overlay at given index.
- repaintOverlay
-
Void repaintOverlay()
Repaint only the overaly layers.
- rowBorder
-
const Color rowBorder := Color.<ctor>("#bbb")
Color of border between rows.
- rowEvenBg
-
const Color rowEvenBg := Color.<ctor>("#f1f5fa")
Background color of even rows.
- rowHeight
-
Get height for row at given index.
- rowOddBg
-
const Color rowOddBg := Color.white
Background color of odd rows.
- rowSelectedBg
-
const Color rowSelectedBg := Color.<ctor>("#3d80df")
Background color of selected row.
- scrollPage
-
Int scrollPage := 120
Number of pixels to scroll when scrollbar track is paged.
- selected
-
Int[] selected := Int[,]
Selected table index.
- selectionEnabled
-
Bool selectionEnabled := true
Is selection enabled for this table.
- writeHtml
-
virtual Void writeHtml(WebOutStream out, Int col, Int row)
Write HTML markup for this cell.
- writePng
-
Void writePng(WebOutStream out, Int col, Int row)
Render cell as PNG image encoded as Base64 and write to HTML.