fr.opensagres.xdocreport.core.document
Enum ImageFormat

java.lang.Object
  extended by java.lang.Enum<ImageFormat>
      extended by fr.opensagres.xdocreport.core.document.ImageFormat
All Implemented Interfaces:
Serializable, Comparable<ImageFormat>

public enum ImageFormat
extends Enum<ImageFormat>

Image format.


Enum Constant Summary
bmp
           
gif
           
jfif
           
jpe
           
jpeg
           
jpg
           
png
           
tif
           
tiff
           
 
Method Summary
static ImageFormat getFormatByExtension(String extension)
          Returns the image format retrieved by the given extension (bmp, jpeg...).
static ImageFormat getFormatByResourceName(String resourceName)
          Returns the image format retrieved by the extension of the given resource name.
 String getType()
           
static ImageFormat valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ImageFormat[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

bmp

public static final ImageFormat bmp

jpg

public static final ImageFormat jpg

jpeg

public static final ImageFormat jpeg

jpe

public static final ImageFormat jpe

jfif

public static final ImageFormat jfif

gif

public static final ImageFormat gif

tif

public static final ImageFormat tif

tiff

public static final ImageFormat tiff

png

public static final ImageFormat png
Method Detail

values

public static ImageFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ImageFormat c : ImageFormat.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ImageFormat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getType

public String getType()

getFormatByExtension

public static ImageFormat getFormatByExtension(String extension)
Returns the image format retrieved by the given extension (bmp, jpeg...).

Parameters:
extension -
Returns:

getFormatByResourceName

public static ImageFormat getFormatByResourceName(String resourceName)
Returns the image format retrieved by the extension of the given resource name.

Parameters:
resourceName -
Returns:


Copyright © 2013. All rights reserved.