/** * @see Content#refreshDown() */ @Override protected void refreshDown() { updateOffsetPoint(); super.refreshDown(); content.refreshDown(); }
/** * @see Content#refreshDown() */ @Override protected void refreshDown() { setOptimalSize(); super.refreshDown(); }
/** * @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(); } }
public ContentBorder(ContentInsideShape contentShape, Color color) { contentShape.addParent(this); this.setBorderColor(color); this.setContent(contentShape); }
/** * Set the same width for all elements in the layout * @param width */ protected final void setContentsWidth(double width) { for (Content content: getContents()) { content.setWidth(width); content.refreshDown(); } } }
/** * Set the same height for all elements in the layout * @param height */ protected final void setContentsHeight(double height) { for (Content content: getContents()) { content.setHeight(height); content.refreshDown(); } } }
/** * @see ContentInsideShape#getShape() */ protected Shape getShape() { return ((ContentInsideShape)getContent()).getShape(); }
/** * @see ContentInsideShape#getShape() */ protected Shape getShape() { return ((ContentInsideShape)getContent()).getShape(); }
/** * @see Content#draw(Graphics2D) */ @Override public void draw(Graphics2D graphics) { content.draw(graphics, getShapeOffset()); }
/** * @see Content#refreshUp() */ @Override protected void refreshUp() { setOptimalSize(); super.refreshUp(); }
/** * Refresh all the elements in layout * * @see Content#refreshDown() */ @Override protected void refreshDown() { for (Content content: getContents()) { content.refreshDown(); } super.refreshDown(); }
public final void setTopPadding(double top) { if(0>top) { throw new IllegalArgumentException("top padding can't be negative"); } this.top.setMinHeight(top); refreshUp(); }
@Override public void setBorderColor(Color borderColor) { this.borderColor = borderColor; if(null != border) { border.setBorderColor(borderColor); } }
/** * @return minimal bounds of this element */ public Rectangle2D getMinimalBounds() { return layout.getMinimalBounds(); }
/** * Recalculates dimensions of objects listening and self */ protected void refreshUp() { for (Content parent: parents ) { parent.refreshUp(); } }
@Override public void setBackgroundColor(Color bgColor) { backgroundColor = bgColor; if(null != background) { background.setBackgroundColor(bgColor); } }
/** * @see Content#refreshDown() */ @Override protected void refreshDown() { content.refreshDown(); super.refreshDown(); }