abstract class webfwt::CanvasTable

sys::Obj
  fwt::Widget
    fwt::Canvas
      webfwt::CanvasTable

@Js

Source

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")

Source

Color of border between cells.

cellPosToTable

Point cellPosToTable(Point pos, Int col, Int row)

Source

Get cell position relative to table.

cellSelectedBorder

const Color cellSelectedBorder := Color.<ctor>("#346dbe")

Source

Color of border between cells when row is selected.

colNameWrap

const Bool colNameWrap

Source

Wrap the column names

colNames

const Str[] colNames := Str[,]

Source

Column names.

colWidths

const Num[] colWidths := Num[,]

Source

Column widths. Integer values represent exact widths. Float values represent a percentage of remaining space (0..1).

headerFont

const Font headerFont := defHeaderFont

Source

make

new make(|This|? f)

Source

Constructor.

numRows

abstract Int numRows()

Source

Get number of rows in table.

onAction

EventListeners onAction()

Source

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)

Source

Callback when mouse moved in cell.

onCellPressed

virtual Void onCellPressed(Event e, Int col, Int row, Point pos, Size cellSize)

Source

Callback when mouse pressed in cell.

onPaint

virtual override Void onPaint(Graphics g)

Source

onSort

virtual Void onSort(Int col, SortMode mode)

Source

Callback when a column is sorted.

paintCell

abstract Void paintCell(Graphics g, Int col, Int row, Bool selected, Size cellSize)

Source

Paint the cell at given index.

paintCellOverlay

virtual Void paintCellOverlay(Graphics g, Int col, Int row, Bool selected, Size cellSize)

Source

Paint the cell overlay at given index.

repaintOverlay

Void repaintOverlay()

Source

Repaint only the overaly layers.

rowBorder

const Color rowBorder := Color.<ctor>("#bbb")

Source

Color of border between rows.

rowEvenBg

const Color rowEvenBg := Color.<ctor>("#f1f5fa")

Source

Background color of even rows.

rowHeight

abstract Int rowHeight(Int i)

Source

Get height for row at given index.

rowOddBg

const Color rowOddBg := Color.white

Source

Background color of odd rows.

rowSelectedBg

const Color rowSelectedBg := Color.<ctor>("#3d80df")

Source

Background color of selected row.

scrollPage

Int scrollPage := 120

Source

Number of pixels to scroll when scrollbar track is paged.

selected

Int[] selected := Int[,]

Source

Selected table index.

selectionEnabled

Bool selectionEnabled := true

Source

Is selection enabled for this table.

writeHtml

virtual Void writeHtml(WebOutStream out, Int col, Int row)

Source

Write HTML markup for this cell.

writePng

Void writePng(WebOutStream out, Int col, Int row)

Source

Render cell as PNG image encoded as Base64 and write to HTML.