View Javadoc

1   /*
2    * $Id: GeneratedImageInformation.java,v 1.3 2010/08/10 14:02:30 oeuillot Exp $
3    */
4   package org.rcfaces.core.image;
5   
6   import org.apache.commons.logging.Log;
7   import org.apache.commons.logging.LogFactory;
8   import org.rcfaces.core.internal.contentAccessor.BasicGeneratedResourceInformation;
9   
10  /**
11   * 
12   * @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
13   * @version $Revision: 1.3 $ $Date: 2010/08/10 14:02:30 $
14   */
15  public class GeneratedImageInformation extends
16          BasicGeneratedResourceInformation implements IGeneratedImageInformation {
17      private static final String REVISION = "$Revision: 1.3 $";
18  
19      private static final Log LOG = LogFactory
20              .getLog(GeneratedImageInformation.class);
21  
22      public GeneratedImageInformation() {
23          super();
24      }
25  
26      public final int getImageHeight() {
27          Integer i = (Integer) getAttribute(HEIGHT_PROPERTY);
28          if (i == null) {
29              return 0;
30          }
31  
32          return i.intValue();
33      }
34  
35      public final void setImageHeight(int imageHeight) {
36          setAttribute(HEIGHT_PROPERTY, new Integer(imageHeight));
37      }
38  
39      public final int getImageWidth() {
40          Integer i = (Integer) getAttribute(WIDTH_PROPERTY);
41          if (i == null) {
42              return 0;
43          }
44  
45          return i.intValue();
46      }
47  
48      public final void setImageWidth(int imageWidth) {
49          setAttribute(WIDTH_PROPERTY, new Integer(imageWidth));
50      }
51  
52      public final String getEncoderMimeType() {
53          return (String) getAttribute(ENCODER_MIME_TYPE_PROPERTY);
54      }
55  
56      public final void setEncoderMimeType(String contentType) {
57          setAttribute(ENCODER_MIME_TYPE_PROPERTY, contentType);
58      }
59  
60  }