Shells { public Shells setSize(@Nullable Point size) { if (size == null) { this.size.x = SWT.DEFAULT; this.size.y = SWT.DEFAULT; } else { setSize(size.x, size.y); } return this; } private  Shells(int style, Coat coat); static Shells builder(int style, Coat coat); Shells setTitle(String title); Shells setImage(Image image); Shells setAlpha(int alpha); Shells setBounds(Rectangle bounds); Shells setBounds(Control control); Shells setBounds(ControlWrapper wrapper); Shells setRectangle(Rectangle rect); Shells setSize(@Nullable Point size); Shells setSize(int x, int y); Shells setLocation(Point openPosition); Shells setLocation(Corner corner, Point position); Shells setPositionIncludesTrim(boolean positionIncludesTrim); Shells setDontOpen(boolean dontOpen); Shells setCloseOnEscape(boolean closeOnEscape); Shell openOn(Shell parent); @Deprecated void openOnAndBlock(Shell parent); void openOnBlocking(Shell parent); static Shell active(); Shell openOnActive(); Shells dontSetPositionOrSize(); void openOnActiveBlocking(); Shell openOnDisplay(); void openOnDisplayBlocking(); static Disposable confirmClose(Shell shell, String title, String question, Runnable runOnClose);  }
@Test public void testPack() { testCase("The shell should be a rectangle just large enough to see all the content.", shells -> { shells.setSize(null); }); }
@Test public void testSquare() { testCase("The shell should be a square too small to see all the content.", shells -> { shells.setSize(new Point(UNIT, UNIT)); }); }
@Test public void testWidthFixed() { testCase("The shell should be a skinny rectangle just big enough to see all the content.", shells -> { shells.setSize(new Point(UNIT, 0)); }); }
@Test public void testHeightFixed() { testCase("The shell should be a really wide rectangle too short to see all the content.", shells -> { shells.setSize(new Point(0, UNIT)); }); }