Runtime

## org.eclipse.gmf.runtime.diagram.ui.image
Class ImageFileFormat

    java.lang.Object
      org.eclipse.gmf.runtime.common.core.util.EnumeratedType
          org.eclipse.gmf.runtime.diagram.ui.image.ImageFileFormat

All Implemented Interfaces:
  java.io.Serializable

public class ImageFileFormat
extends 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:
  Serialized Form

Field Summary
`static ImageFileFormat` `BMP` supported format Windows Bitmap format (BMP).
`static ImageFileFormat` `GIF` supported format Graphics Interchange Format (GIF).
`static ImageFileFormat` `JPEG` supported format Joint Photographic Experts Group format (JPEG).
`static ImageFileFormat` `JPG` supported format Joint Photographic Experts Group format (JPG).
`static ImageFileFormat` `PNG` supported format PNG.
`static ImageFileFormat` `SVG` supported format Scalable Vector Graphics (SVG).
`static ImageFileFormat[]` `VALUES` The list of values for this enumerated type.

Method Summary
`static ImageFileFormat` `getDefaultImageFormat()` Retrieves the default image format.
`protected java.util.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(java.lang.String imageFormat)` Resolve the selected image format to an enumerated type.

Methods inherited from class org.eclipse.gmf.runtime.common.core.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

### 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).

### JPG

    public static final ImageFileFormat JPG

  supported format Joint Photographic Experts Group format (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).

### PNG

    public static final ImageFileFormat PNG

  supported format PNG.

### VALUES

    public static final ImageFileFormat[] VALUES

  The list of values for this enumerated type.

Method Detail

### getValues

    protected java.util.List getValues()

  Retrieves the list of constants for this enumerated type.

  Specified by:
    `getValues` in class `EnumeratedType`
  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(java.lang.String imageFormat)

  Resolve the selected image format to an enumerated type.

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

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.