/** Initializes the component composing the display. */
  private void initComponents() {
    infoLabel = new JLabel(MAGNIFICATION + " is " + model.getDrawingView().getScaleFactor());
    // create the table
    fieldTable = new FigureTable(new FigureTableModel(attributeFields, COLUMN_NAMES));
    fieldTable.getTableHeader().setReorderingAllowed(false);
    fieldTable.setRowHeight(26);
    fieldTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    fieldTable.setCellSelectionEnabled(true);
    fieldTable.setColumnSelectionAllowed(true);
    fieldTable.addMouseListener(
        new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {

            int col = fieldTable.getSelectedColumn();
            int row = fieldTable.getSelectedRow();
            Object value = fieldTable.getValueAt(row, col);
            if (e.getClickCount() == 1) {
              if (value instanceof Boolean) {
                toggleValue();
              }
            } else if (e.getClickCount() > 1) {
              e.consume();
              if (value instanceof Color) {
                // Only if the figure is not read only.
                FigureTableModel ftm = (FigureTableModel) fieldTable.getModel();
                ROIFigure figure = ftm.getFigure();
                if (figure != null && !figure.isReadOnly())
                  if (figure.canEdit()) controller.showColorPicker((Color) value);
              } else if (value instanceof Boolean) {
                toggleValue();
              }
            }
          }
        });
    fieldTable.addPropertyChangeListener(
        new PropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent evt) {
            String name = evt.getPropertyName();
            if (FigureTable.VALUE_CHANGED_PROPERTY.equals(name)) {
              handleValueChanged((String) evt.getNewValue());
            }
          }
        });
  }