Skip to content

01_Introduction

Dirk Fauth edited this page Sep 16, 2024 · 2 revisions

What is NatTable?

NatTable is a framework to create table, grid and tree controls. I can handle very large data sets and supports sorting, filtering, grouping and fixed/frozen columns and rows and other advanced features. NatTable is also fully stylable.

Why is it called NatTable?

The original implementation was dedicated to the girlfriend of the creator whose name was Natalie. A lot has changed since then and the original implementation was mainly refactored. But the name stayed. Today we think of Nat as an acronym for Not a(nother) table, because it is a lot more than a simple table control. This acronym was finally approved by Lars Vogel. When we met him at a conference, introducing NatTable to him, his first reaction was to shout out Oh No! Not Another Table widget. As said at the beginning, he was right with that statement, since it is a framework to create rich table, grid or tree controls and not just another table widget.

Bundles and dependencies

The NatTable project is split into Core and Extensions.

The Core contains all the interface definitions and common implementations. It has the following dependencies:

  • SWT - rendering and interaction (key, mouse)
  • JFace - resource handling and dialogs
  • org.eclipse.equinox.common & org.eclipse.core.commands - JFace dependencies
  • SLF4J API - internal logging
  • Eclipse Collections - improved internal handling and processing of primitive collections

The Extensions category contains special implementations of core functionality using third-party libraries. Currently there are four Extensions available:

  • The Eclipse 4 Extension contains CSS styling capabilities using the Eclipse CSS engine.
    It also contains e4 specific implementations like for example the E4SelectionListener to support selection handling the e4 way.

  • The GlazedLists Extension contains implementations for sorting, filtering and trees using the GlazedLists library.
    It also contains the GroupBy feature which is currently not available in NatTable Core. The GlazedLists Extension has an additional dependency to Apache Commons Codec, which is needed for serialization purposes.

  • The Nebula Extension contains implementations for integrating widgets from the Nebula project.
    Currently it only contains an ICellEditor and an ICellPainter that uses the RichText control and a CDateTime cell editor.

  • The Apache POI Extension contains implementations for Excel exports using the Apache POI library.
    It adds support for advanced export features.

Available update sites

You can add NatTable to your target platform via the p2 update sites listed on Nebula NatTable download page. For example, the following update sites are available.

// Update site for the 2.4.0 release
http://download.eclipse.org/nattable/releases/2.4.0/repository/

// Latest snapshot
https://download.eclipse.org/nattable/snapshots/latest/repository/

Getting started

To get started with using Nebula NatTable you can

Tutorial

To get started with NatTable it is recommended to read through the NatTable Getting Started Tutorial. It explains the basic concepts, how to install NatTable to the IDE or how to add it to a Target Definition, and it contains some basic exercises.

NatTable Examples Application

One of the best ways to get familiar with NatTable is to have a look at example code. There are several options to have a look at the NatTable Examples code:

The NatTable Examples Application demonstrates almost every feature, also in various combinations and configurations. It shows all the available examples in a tree on the left opens the selected example on the right by double clicking the tree element.

NatTable Examples Application

The tree currently contains three main sections:

  • Tutorial Examples
    The examples that are referred to in tutorials, documentations and New & Noteworthy informations.

  • Classic Examples
    The examples that exist for a long time.

  • E4 Examples
    Examples to show the use of E4 mechanisms like CSS styling or the E4 selection mechanism.

    Note:
    The E4 Examples are only available in the OS dependent Eclipse variants of the NatTable Examples Application. They are not available in the SWT variant.