Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## net.sf.jasperreports.engine.type
Enum ScaleImageEnum

    java.lang.Object
      java.lang.Enum<ScaleImageEnum>
          net.sf.jasperreports.engine.type.ScaleImageEnum

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<ScaleImageEnum>, JREnum

    public enum ScaleImageEnum

extends java.lang.Enum<ScaleImageEnum>
implements JREnum

Version:
  $Id: ScaleImageEnum.java 3585 2010-03-12 12:58:24Z shertage $
Author:
  sanda zaharia (shertage@users.sourceforge.net)

Enum Constant Summary
`CLIP` A constant value specifying that if the actual image is larger than the image element size, it will be cut off so that it keeps its original resolution, and only the region that fits the specified size will be displayed.
`FILL_FRAME` A constant value specifying that if the dimensions of the actual image do not fit those specified for the image element that displays it, the image can be forced to obey them and stretch itself so that it fits in the designated output area.
`REAL_HEIGHT` A scale image type that instructs the engine to stretch the image height to fit the actual height of the image.
`REAL_SIZE` A scale image type that stretches the images height in the same way as `REAL_HEIGHT`, and in addition it changes the image width to the actual with of the image.
`RETAIN_SHAPE` A constant value specifying that if the actual image does not fit into the image element, it can be adapted to those dimensions without needing to change its original proportions.

Method Summary
`static ScaleImageEnum` | `getByName(java.lang.String name)`
`static ScaleImageEnum` | `getByValue(byte value)`
`static ScaleImageEnum` | `getByValue(java.lang.Byte value)`
`java.lang.String` | `getName()`
`byte` | `getValue()`
`java.lang.Byte` | `getValueByte()`
`static ScaleImageEnum` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static ScaleImageEnum[]` | `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

### CLIP

    public static final ScaleImageEnum CLIP

  A constant value specifying that if the actual image is larger than the image element size, it will be cut off so that it keeps its original resolution, and only the region that fits the specified size will be displayed.

### FILL_FRAME

    public static final ScaleImageEnum FILL_FRAME

  A constant value specifying that if the dimensions of the actual image do not fit those specified for the image element that displays it, the image can be forced to obey them and stretch itself so that it fits in the designated output area.

### RETAIN_SHAPE

    public static final ScaleImageEnum RETAIN_SHAPE

  A constant value specifying that if the actual image does not fit into the image element, it can be adapted to those dimensions without needing to change its original proportions.

### REAL_HEIGHT

    public static final ScaleImageEnum REAL_HEIGHT

  A scale image type that instructs the engine to stretch the image height to fit the actual height of the image.

  Several restrictions apply to the image stretching mechanism:

  - It only works when the image renderer implements `JRRenderable.getDimension()`.
  - If the actual image width exceeds the declared image element width, the image is proportionally stretched to fit the declared width.
  - Images with delayed evaluation (see `JRImage.getEvaluationTime()`) do not stretch and is proportionally shrunk to fit the declared height/width.
  - An image overflows (to the next page/column) only once, after this the image gets rendered on the available space by proportionally shrinking its size.

  See Also:
    `REAL_SIZE`

### REAL_SIZE

    public static final ScaleImageEnum REAL_SIZE

  A scale image type that stretches the images height in the same way as `REAL_HEIGHT`, and in addition it changes the image width to the actual with of the image. This can be useful when, for instance, a border has to be drawn around the image, respecting its actual size.

Method Detail

### values

    public static ScaleImageEnum[] 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 (ScaleImageEnum c : ScaleImageEnum.values())
          System.out.println(c);

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

### valueOf

    public static ScaleImageEnum valueOf(java.lang.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:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
    `java.lang.NullPointerException` - if the argument is null

### getValueByte

    public java.lang.Byte getValueByte()

  Specified by:
    `getValueByte` in interface `JREnum`

### getValue

    public final byte getValue()

  Specified by:
    `getValue` in interface `JREnum`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `JREnum`

### getByName

    public static ScaleImageEnum getByName(java.lang.String name)

### getByValue

    public static ScaleImageEnum getByValue(java.lang.Byte value)

### getByValue

    public static ScaleImageEnum getByValue(byte value)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com