com.atlassian.jira.image.dropdown
Class DefaultDropDownCreatorService

java.lang.Object
  extended by com.atlassian.jira.image.dropdown.DefaultDropDownCreatorService
All Implemented Interfaces:
DropDownCreatorService

public class DefaultDropDownCreatorService
extends Object
implements DropDownCreatorService

Default implementation that uses raws the image on a created buffered image. This is not cached so consumers should look after their own caching.

Since:
v4.0

Constructor Summary
DefaultDropDownCreatorService(ImageUtils imageUtils)
           
 
Method Summary
 byte[] getDropdown(String colorHex, String backgroundColorHex)
          Get the bytes for a dropdown image for the given colours.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDropDownCreatorService

public DefaultDropDownCreatorService(ImageUtils imageUtils)
Method Detail

getDropdown

public byte[] getDropdown(String colorHex,
                          String backgroundColorHex)
Description copied from interface: DropDownCreatorService
Get the bytes for a dropdown image for the given colours. Allows for easy streaming.

Input strings can ontain a leading hash (#) and can be a 3 char or 6 char hex string. See any web tutorial for what colour the string represents. If hex colors are wrong, default colours are returned. Black arrow and a transparent white background.

Specified by:
getDropdown in interface DropDownCreatorService
Parameters:
colorHex - The main color of the dropdown
backgroundColorHex - The background colour of the dropdown. This will also be transparent. Useful for IE6
Returns:
An array of bytes representing an image.


Copyright © 2002-2014 Atlassian. All Rights Reserved.