Snippets
Print

Snippets are minimal stand-alone programs that demonstrate specific techniques or functionality. Often a small example is the easiest way to understand how to use a particular feature.

All the snippets are available for download.

Layout

  • Simplest matrix.
  • Unlimited number of items.
  • Filter section between header and body.
  • Add / remove model items.
  • Sorting by columns.
  • Painters

  • Draw custom background for the whole matrix.
  • Draw custom focus cell marker.
  • Change the line style.
  • Gap between cells like HTML table cell spacing attribute. Hide lines.
  • Altering row background.
  • Current row gradient highlighter.
  • Mark selection with SWT.COLOR_LIST... colors.
  • Cell background calculated
  • Image painting
  • Align column to the right.
  • Freeze head and tail with different color for the dividing line
  • Edit

  • Simplest zone editor.
  • Embedded check buttons.
  • Check buttons emulated by images.
  • Edit controls Text, DateTime, Boolean, Combo depending on the cell value.
  • List as a custom editor control.
  • Separate zone to insert new items.
  • Activate editor with single click instead of double click.
  • Other

  • Traverse cells (Shift+) Tab and Enter. Traverse Matrix with (Shift+) Ctrl+Tab.
  • Custom copy / paste.
  • Change gesture binding.
  • Selection and control event handling.
  • Identifying items by distance.
  • Drag and drop files from external window.
  • Compound example.