Ejemplo n.º 1
0
 @Override
 public void draw(Graphics graphics) {
   background.ifPresent(graphics::fillBackground);
   graphics.drawBorder(border);
   super.draw(graphics.restrict(padding.include(border).apply(graphics.getArea().getDimension())));
 }
Ejemplo n.º 2
0
 @Override
 public void setArea(Rectangle area) {
   super.setArea(padding.include(border).apply(area));
 }
Ejemplo n.º 3
0
 public Panel(
     final Layout<Widget> layout,
     final Occupation preferredWith,
     final Occupation preferredHeight) {
   this(layout, preferredWith, preferredHeight, Border.no(), Padding.no(), Optional.empty());
 }