public SubgroupPanel() {
    super();

    setCellRenderer(new SymmetryListCellRenderer());

    setSelectionBackground(SymmetryChooser.SelectionBackground);
    setBackground(Color.WHITE);

    addListSelectionListener(new ListSelectionListener() {

      @SuppressWarnings("unchecked")
      @Override
      public void valueChanged(final ListSelectionEvent e) {
        // Fire event if symmetry was chosen.

        final SubgroupPanel list = SubgroupPanel.this;
        Symmetry<?> subgroup = list.getSelectedValue();
        if (subgroup != null) {
          logger.info("SubgroupPanel: Symmetry chosen: " + subgroup.coxeter());

          Class<?> type = lastChosenSymmetry.getType();
          if (type == Point3D.class) {
            dispatcher.fireEvent(new Symmetry3DChooseEvent(
                (Symmetry<Point3D>) subgroup));
          }
          else if (type == Point4D.class) {
            dispatcher.fireEvent(new Symmetry4DChooseEvent(
                (Symmetry<Point4D>) subgroup));
          }
        }
      }
    });

    EventDispatcher.get().addHandler(DimensionSwitchHandler.class, this);

  }