/** Resets the current size and minimum resize dimension of the editor. */
  protected final void resetSize() {

    int size = intellicutPanel.getIntellicutListModel().getSize();

    if (size > 0) {

      // If the list is displayed, then setup some sizes.

      // Set the minimum resize dimension to a height of 2 item.
      intellicutPanel.setPreferredVisibleRows(2);
      setMinResizeDimension(getPreferredSize());
      setMaxResizeDimension(new Dimension(getPreferredSize().width, 2048));
      setResizable(true);

      // Set the preferred list height to max 10 rows
      intellicutPanel.setPreferredVisibleRows(size >= 10 ? 10 : size + 1);

    } else {
      setResizable(false);
    }

    setSize(getPreferredSize());
  }