public void rebuild() {
		// Rebuild data
		getData().updateViewStructure();

		// fire table
		DataTableModel model = ((DataTableModel) getModel());
		model.fireTableStructureChanged();
		
		// Common table properties
		setFillsViewportHeight(true);
		setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		setIntercellSpacing(new Dimension(0, 0));
		setShowGrid(false);

		// Customizable properties
		setBackground(getData().getRowColor());

		// Header properties
		JTableHeader header = getTableHeader();
		header.setReorderingAllowed(false);

		// Header handlers
		header.addMouseListener(new MouseAdapter() {
			public void mousePressed(MouseEvent e) {
				Point pt = new Point(e.getPoint());
				int columnIndex = getTableHeader().columnAtPoint(pt);
				if (columnIndex < 0)
					return;
				pt.x -= 4;
				if (columnIndex != getTableHeader().columnAtPoint(pt))
					return;
				pt.x += 8;
				if (columnIndex != getTableHeader().columnAtPoint(pt))
					return;
				columnIndex = convertColumnIndexToModel(columnIndex);
				if (columnIndex < 0)
					return;
				toggleColumnSort(columnIndex);
			}
		});

		// Column properties
		DataHeader dataHeader = model.getHeader();
		int columnCount = dataHeader.getColumnCount();

		for (int i = columnCount - 1; i >= 0; i--) {
			TableColumn column = header.getColumnModel().getColumn(i);
			DataColumn dataColumn = dataHeader.getColumn(i);

			column.setPreferredWidth(dataColumn.getWidth());
			column.setWidth(column.getPreferredWidth());
			column.setHeaderRenderer(new HeaderRenderer(dataColumn));
			column.setCellRenderer(new CellRenderer(dataColumn));
		}

	}