@Override protected void createContentStructure() { setContent(new ContentInsideRectangle(new EmptyContent())); }
public final void setTopPadding(double top) { if(0>top) { throw new IllegalArgumentException("top padding can't be negative"); } this.top.setMinHeight(top); refreshUp(); }
public final void setRightPadding(double right) { if(0>right) { throw new IllegalArgumentException("right padding can't be negative"); } this.right.setMinWidth(right); refreshUp(); }
/** * @see Content#setMinWidth(double) */ @Override public void setMinWidth(double minWidth){ super.setMinWidth(minWidth); super.setWidth(minWidth); refreshUp(); }
/** * @see Content#setMinHeight(double) */ @Override public void setMinHeight(double minHeight){ super.setMinHeight(minHeight); super.setHeight(minHeight); refreshUp(); } }
protected void createContentStructure() { setBorder(new ContentBorder(new ContentInsideRoundRectangle(new EmptyContent()), getBorderColor())); setBackground(new ContentBackground(getBorder(), getBackgroundColor())); setContent(getBackground()); }
public final void setBottomPadding(double bottom) { if(0>bottom) { throw new IllegalArgumentException("bottom padding can't be negative"); } this.bottom.setMinHeight(bottom); refreshUp(); }
public final void setLeftPadding(double left) { if(0>left) { throw new IllegalArgumentException("left padding can't be negative"); } this.left.setMinWidth(left); refreshUp(); }
/** * set new content for shape * @param content */ protected final void setContent(Content content) { if(null != this.content) { this.content.removeParent(this); } if(null == content) { content = new EmptyContent(); } content.addParent(this); this.content = content; refreshUp(); }
public PaddingContent(Content content, double top, double left, double bottom, double right) { this.content = content; this.top = new EmptyContent(); this.left = new EmptyContent(); this.bottom = new EmptyContent(); this.right = new EmptyContent(); setTopPadding(top); setLeftPadding(left); setBottomPadding(bottom); setRightPadding(right); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.add(this.left); horizontalLayout.add(this.content); horizontalLayout.add(this.right); layout = new VerticalLayout(); layout.add(this.top); layout.add(horizontalLayout); layout.add(this.bottom); this.content.addParent(this); }