org.dspace.app.mediafilter
Class Brand

java.lang.Object
  extended by org.dspace.app.mediafilter.Brand

public class Brand
extends Object

Class to attach a footer to an image using ImageMagick. Thanks Ninh Nguyen from the National Library of Australia for providing the source code. This version of the code is basically Ninh's but reorganised a little. Used with permission.


Constructor Summary
Brand(int brandWidth, int brandHeight, Font font, int xOffset)
          Constructor to set up footer image attributes.
 
Method Summary
 BufferedImage create(String brandLeftText, String shortLeftText, String brandRightText)
          Create the brand image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Brand

public Brand(int brandWidth,
             int brandHeight,
             Font font,
             int xOffset)
Constructor to set up footer image attributes.

Parameters:
footerWidth - length of the footer in pixels
footerHeight - height of the footer in pixels
font - font to use for text on the footer
xOffset - number of pixels text should be indented from left-hand side of footer
Method Detail

create

public BufferedImage create(String brandLeftText,
                            String shortLeftText,
                            String brandRightText)
Create the brand image

Parameters:
brandLeftText - text that should appear in the bottom left of the image
shortLeftText - abbreviated form of brandLeftText that will be substituted if the image is resized such that brandLeftText will not fit. null if not required
brandRightText - text that should appear in the bottom right of the image
Returns:
BufferedImage a BufferedImage object describing the brand image file


Copyright © 2010 DuraSpace. All Rights Reserved.