/** * Creates a new image title with the given image scaled to the given * width and height in the given location. * * @param image the image ({@code null} not permitted). * @param height the height used to draw the image. * @param width the width used to draw the image. * @param position the title position. * @param horizontalAlignment the horizontal alignment. * @param verticalAlignment the vertical alignment. * @param padding the amount of space to leave around the outside of the * title. */ public ImageTitle(Image image, int height, int width, RectangleEdge position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, RectangleInsets padding) { super(position, horizontalAlignment, verticalAlignment, padding); if (image == null) { throw new NullPointerException("Null 'image' argument."); } this.image = image; setHeight(height); setWidth(width); }
/** * Creates a new image title with the given image scaled to the given * width and height in the given location. * * @param image the image (<code>null</code> not permitted). * @param height the height used to draw the image. * @param width the width used to draw the image. * @param position the title position. * @param horizontalAlignment the horizontal alignment. * @param verticalAlignment the vertical alignment. * @param padding the amount of space to leave around the outside of the * title. */ public ImageTitle(Image image, int height, int width, RectangleEdge position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, RectangleInsets padding) { super(position, horizontalAlignment, verticalAlignment, padding); if (image == null) { throw new NullPointerException("Null 'image' argument."); } this.image = image; setHeight(height); setWidth(width); }