IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.presentation.ui.image
Class ImageFileFormat

java.lang.Object
  extended bycom.ibm.xtools.common.core.internal.util.EnumeratedType
      extended bycom.ibm.xtools.presentation.ui.image.ImageFileFormat
All Implemented Interfaces:
Serializable

public class ImageFileFormat
extends com.ibm.xtools.common.core.internal.util.EnumeratedType

An enumeration of image formats supported by the copy diagram to image file utility class CopyToImageUtil.

We use this enumeration rather than int as in SWT.IMAGE_GIF to enforce strict supported format type checking.

See Also:
com.ibm.xtools.uml.diagram.internal.ui.image.CopyToImageUtil, Serialized Form

Field Summary
static ImageFileFormat BMP
          supported format Windows Bitmap format (BMP).
static ImageFileFormat GIF
          supported format Graphics Interchange Format (GIF).
static int IMAGE_SVG
           
static ImageFileFormat JPEG
          supported format Joint Photographic Experts Group format (JPEG and JPG).
static ImageFileFormat JPG
           
static ImageFileFormat SVG
          supported format Scalable Vector Graphics (SVG).
static ImageFileFormat[] VALUES
          The list of values for this enumerated type.
 
Constructor Summary
protected ImageFileFormat(String name, int ordinal)
          Constructs a new type with the specified name and ordinal.
 
Method Summary
static ImageFileFormat getDefaultImageFormat()
          Retrieves the default image format.
protected  List getValues()
          Retrieves the list of constants for this enumerated type.
static ImageFileFormat resolveImageFormat(int ordinal)
          resolve the selected image format to an enumerated type.
static ImageFileFormat resolveImageFormat(String imageFormat)
          Resolve the selected image format to an enumerated type.
 
Methods inherited from class com.ibm.xtools.common.core.internal.util.EnumeratedType
equals, getName, getOrdinal, hashCode, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IMAGE_SVG

public static final int IMAGE_SVG
See Also:
Constant Field Values

GIF

public static final ImageFileFormat GIF
supported format Graphics Interchange Format (GIF).


JPEG

public static final ImageFileFormat JPEG
supported format Joint Photographic Experts Group format (JPEG and JPG).


JPG

public static final ImageFileFormat JPG

BMP

public static final ImageFileFormat BMP
supported format Windows Bitmap format (BMP).


SVG

public static final ImageFileFormat SVG
supported format Scalable Vector Graphics (SVG).


VALUES

public static final ImageFileFormat[] VALUES
The list of values for this enumerated type.

Constructor Detail

ImageFileFormat

protected ImageFileFormat(String name,
                          int ordinal)
Constructs a new type with the specified name and ordinal.

Parameters:
name - The name of the new type.
ordinal - The ordinal for the new type.
Method Detail

getValues

protected List getValues()
Retrieves the list of constants for this enumerated type.

Returns:
The list of constants for this enumerated type.
See Also:
EnumeratedType.getValues()

getDefaultImageFormat

public static ImageFileFormat getDefaultImageFormat()
Retrieves the default image format.

Returns:
the default image format.

resolveImageFormat

public static ImageFileFormat resolveImageFormat(int ordinal)
resolve the selected image format to an enumerated type.

Parameters:
ordinal - the selected format in the pulldown
Returns:
the image format enumerated type

resolveImageFormat

public static ImageFileFormat resolveImageFormat(String imageFormat)
Resolve the selected image format to an enumerated type.

Parameters:
imageFormat - the selected format.
Returns:
the image format enumerated type

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.