protected Point getInitialSize() { Point initialSize = super.getInitialSize(); if (hasSettings) { return initialSize; } return getDefaultSize(); }
@Override protected Point getInitialSize() { Point initialSize = super.getInitialSize(); if (hasSettings) { return initialSize; } return getDefaultSize(); }
/** * The <code>TitleAreaDialog</code> implementation of this * <code>Window</code> methods returns an initial size which is at least * some reasonable minimum. * * @return the initial size of the dialog */ @Override protected Point getInitialSize() { Point shellSize = super.getInitialSize(); return new Point(Math.max( convertHorizontalDLUsToPixels(MIN_DIALOG_WIDTH), shellSize.x), Math.max(convertVerticalDLUsToPixels(MIN_DIALOG_HEIGHT), shellSize.y)); }
/** * The <code>TitleAreaDialog</code> implementation of this * <code>Window</code> methods returns an initial size which is at least * some reasonable minimum. * * @return the initial size of the dialog */ protected Point getInitialSize() { Point shellSize = super.getInitialSize(); return new Point(Math.max( convertHorizontalDLUsToPixels(MIN_DIALOG_WIDTH), shellSize.x), Math.max(convertVerticalDLUsToPixels(MIN_DIALOG_HEIGHT), shellSize.y)); }
/** * The <code>TitleAreaDialog</code> implementation of this * <code>Window</code> methods returns an initial size which is at least * some reasonable minimum. * * @return the initial size of the dialog */ @Override protected Point getInitialSize() { Point shellSize = super.getInitialSize(); return new Point(Math.max( convertHorizontalDLUsToPixels(MIN_DIALOG_WIDTH), shellSize.x), Math.max(convertVerticalDLUsToPixels(MIN_DIALOG_HEIGHT), shellSize.y)); }
@Override protected Point getInitialSize() { Point initialSize = super.getInitialSize(); if (hasSettings) { return initialSize; } // If we don't have settings we need to come up with a reasonable default // since we can't depend on the compare editor input layout returning a good default size int width= 0; int height= 0; Shell shell= getParentShell(); if (shell != null) { Point parentSize= shell.getSize(); width= parentSize.x-100; height= parentSize.y-100; } if (width < 700) width= 700; if (height < 500) height= 500; return new Point(width, height); } }
protected Point getInitialSize() { Point initialSize = super.getInitialSize(); if (hasSettings) { return initialSize; } // If we don't have settings we need to come up with a reasonable default // since we can't depend on the compare editor input layout returning a good default size int width= 0; int height= 0; Shell shell= getParentShell(); if (shell != null) { Point parentSize= shell.getSize(); width= parentSize.x-100; height= parentSize.y-100; } if (width < 700) width= 700; if (height < 500) height= 500; return new Point(width, height); } }