/**
   * Constructs a new instance of this class given its parent and a style value describing its
   * behavior and appearance.
   *
   * <p>The style value is either one of the style constants defined in class <code>SWT</code> which
   * is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together
   * (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style
   * constants. The class description lists the style constants that are applicable to the class.
   * Style bits are also inherited from superclasses.
   *
   * <p>To ensure that the color of corners is equal to one of the underlying control invoke the
   * parent composites {@link Composite#setBackgroundMode(int)} with {@link SWT#INHERIT_DEFAULT} or
   * {@link SWT#INHERIT_DEFAULT}
   *
   * @param parent a composite control which will be the parent of the new instance (cannot be null)
   * @param style the style of control to construct
   * @exception IllegalArgumentException
   *     <ul>
   *       <li>ERROR_NULL_ARGUMENT - if the parent is null
   *     </ul>
   *
   * @exception SWTException
   *     <ul>
   *       <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
   *       <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
   *     </ul>
   *
   * @see SWT
   * @see Widget#checkSubclass
   * @see Widget#getStyle
   */
  public PGroup(Composite parent, int style) {
    super(parent, checkStyle(style));
    setStrategy(new RectangleGroupStrategy());
    setToggleRenderer(new ChevronsToggleRenderer());
    setToolItemRenderer(new SimpleToolItemRenderer());

    initialFont =
        new Font(
            getDisplay(),
            getFont().getFontData()[0].getName(),
            getFont().getFontData()[0].getHeight(),
            SWT.BOLD);
    super.setFont(initialFont);

    strategy.initialize(this);

    initListeners();
  }