/**
   * Creates a new AbstractContextButtonPadDeclaration.
   *
   * @param referenceRectangle The original reference rectangle as described in {@link
   *     #getOriginalReferenceRectangle()}
   * @param contextButtonPadData The context button data containing the {@link IContextButtonEntry}
   */
  public AbstractContextButtonPadDeclaration(ContextButtonPadData contextButtonPadData) {
    this.contextButtonPadData = contextButtonPadData;

    org.eclipse.sapphire.ui.Rectangle l = contextButtonPadData.getPadLocation();
    originalReferenceRectangle = new Rectangle(l.getX(), l.getY(), l.getWidth(), l.getHeight());
    padReferenceRectangle = new Rectangle(originalReferenceRectangle);
    padReferenceRectangle.grow(1, 1);

    initializeDomainButtonLists();
    initializeRectangles();
    initializeButtonPositions();
    initializeContainmentRectangles();
  }
 /**
  * Returns the list of domain-specific context button entries. It was given in the constructor.
  * The domain-specific buttons will be located in the right pad and bottom pad. It must not be
  * null but it can be empty.
  *
  * @return The list of domain-specific context button entries.
  */
 protected final List<SapphireAction> getDomainButtons() {
   return contextButtonPadData.getRightContextButtons();
 }
 /**
  * Returns the list of generic, domain-independent context button entries. It was given in the
  * constructor. The generic buttons will be located in the top pad. It must not be null but it can
  * be empty.
  *
  * @return The list of generic, domain-independent context button entries.
  */
 protected final List<SapphireAction> getGenericButtons() {
   return contextButtonPadData.getTopContextButtons();
 }