@Override protected void initializeBounds(){
  super.initializeBounds();
  final Shell dialogShell=getShell();
  if (enforceMinimumSize) {
    final Point computedSize=defaultComputeMinimumSize();
    final Rectangle constrainedBounds=getConstrainedShellBounds(new Rectangle(0,0,computedSize.x,computedSize.y));
    minimumSizeEnforcer=new ShellMinimumSizeEnforcer(dialogShell,constrainedBounds.width,constrainedBounds.height);
    final String messageFormat="enforcing minimum size: {0},{1}";
    final String message=MessageFormat.format(messageFormat,Integer.toString(constrainedBounds.width),Integer.toString(constrainedBounds.height));
    log.trace(message);
  }
  if (resizableDirections != (SWT.HORIZONTAL | SWT.VERTICAL)) {
    resizeEnforcer=new ShellResizeEnforcer(dialogShell,resizableDirections);
  }
}

@ Override protected void initializeBounds ( ) { super . initializeBounds ( ) ; final Shell dialogShell = getShell ( ) ; if ( enforceMinimumSize ) { final Point computedSize = defaultComputeMinimumSize ( ) ; final Rectangle constrainedBounds = getConstrainedShellBounds ( new Rectangle ( 0 , 0 , computedSize . x , computedSize . y ) ) ; minimumSizeEnforcer = new ShellMinimumSizeEnforcer ( dialogShell , constrainedBounds . width , constrainedBounds . height ) ; final String messageFormat = "enforcing minimum size: {0},{1}" ; final String message = MessageFormat . format ( messageFormat , Integer . toString ( constrainedBounds . width ) , Integer . toString ( constrainedBounds . height ) ) ; log . trace ( message ) ; } if ( resizableDirections != ( SWT . HORIZONTAL | SWT . VERTICAL ) ) { resizeEnforcer = new ShellResizeEnforcer ( dialogShell , resizableDirections ) ; } }
this base class overrides initializebounds ( ) to enforce a minimum size on the dialog ' s shell after the shell has been sized and placed on the screen . subclasses can modify the minimum size behavior by calling setoptionenforceminimumsize ( ) .
