DetailsGenerator, setHeight of the details component

Is it possible to set the height of the generated details component. This code doesn’t work, the height is the same as for any grid row:

	setDetailsGenerator(new DetailsGenerator() {
		  @Override
		  public Component getDetails(RowReference rowReference) {
			  Component historyGridItem = getHistoryGridItem(rowReference.getItemId());
			  historyGridItem.setHeight(300, Unit.PIXELS);
			  VerticalLayout verticalLayout = new VerticalLayout();
			  verticalLayout.addComponent(historyGridItem);
			  verticalLayout.setHeight(300, Unit.PIXELS);
			  verticalLayout.setSpacing(true);
			  verticalLayout.setMargin(true);
			  return verticalLayout;
		  }
	});