/** * Creates a new composite title with a default border arrangement. */ public CompositeTitle() { this(new BlockContainer(new BorderArrangement())); }
/** * Sets a black border with the specified line widths. * * @param top the top border line width. * @param left the left border line width. * @param bottom the bottom border line width. * @param right the right border line width. */ public void setBorder(double top, double left, double bottom, double right) { setFrame(new BlockBorder(top, left, bottom, right)); }
/** * Constructs a new (empty) legend for the specified source. * * @param source the source. */ public LegendTitle(LegendItemSource source) { this(source, new FlowArrangement(), new ColumnArrangement()); }
/** * Adds a block to the container. * * @param block the block (<code>null</code> permitted). */ public void add(Block block) { add(block, null); }
/** * Creates a new instance with default settings. */ public BlockContainer() { this(new BorderArrangement()); }
/** * Returns a clone of the block. * * @return A clone. * * @throws CloneNotSupportedException if there is a problem cloning. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Draws the block. Since the block is empty, there is nothing to draw * except the optional border. * * @param g2 the graphics device. * @param area the area. */ public void draw(Graphics2D g2, Rectangle2D area) { draw(g2, area, null); }
/** * Draws the border around the perimeter of the specified area. * * @param g2 the graphics device. * @param area the area. */ protected void drawBorder(Graphics2D g2, Rectangle2D area) { this.frame.draw(g2, area); }
/** * Arranges the contents of the block, within the given constraints, and * returns the block size. * * @param g2 the graphics device. * @param constraint the constraint (<code>null</code> not permitted). * * @return The block size (in Java2D units, never <code>null</code>). */ public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) { return this.arrangement.arrange(this, g2, constraint); }
/** * Draws the block. * * @param g2 the graphics device. * @param area the area. */ public void draw(Graphics2D g2, Rectangle2D area) { draw(g2, area, null); }
/** * Arranges the contents of the block, with no constraints, and returns * the block size. * * @param g2 the graphics device. * * @return The block size (in Java2D units, never <code>null</code>). */ public Size2D arrange(Graphics2D g2) { return arrange(g2, RectangleConstraint.NONE); }
/** * Sets a black border with the specified line widths. * * @param top the top border line width. * @param left the left border line width. * @param bottom the bottom border line width. * @param right the right border line width. */ public void setBorder(double top, double left, double bottom, double right) { setFrame(new BlockBorder(top, left, bottom, right)); }
/** * Creates a new composite title with a default border arrangement. */ public CompositeTitle() { this(new BlockContainer(new BorderArrangement())); }
/** * Constructs a new (empty) legend for the specified source. * * @param source the source. */ public LegendTitle(LegendItemSource source) { this(source, new FlowArrangement(), new ColumnArrangement()); }
/** * Adds a block to the container. * * @param block the block ({@code null} permitted). */ public void add(Block block) { add(block, null); }
/** * Returns a clone of the block. * * @return A clone. * * @throws CloneNotSupportedException if there is a problem cloning. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Draws the block. Since the block is empty, there is nothing to draw * except the optional border. * * @param g2 the graphics device. * @param area the area. */ @Override public void draw(Graphics2D g2, Rectangle2D area) { draw(g2, area, null); }
/** * Returns a clone of this <code>LabelBlock</code> instance. * * @return A clone. * * @throws CloneNotSupportedException if there is a problem cloning. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }