/** * removes a content from layout * @param content */ public void remove(Content content) { if(null == content) { throw new NullPointerException("Content can't be null"); } content.removeParent(this); contents.remove(content); refresh(); }
/** * 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(); }