Coverage Report - ar.com.fdvs.dj.domain.ImageBanner
 
Classes in this File Line Coverage Branch Coverage Complexity
ImageBanner
62%
17/27
N/A
1
 
 1  
 /*
 2  
  * DynamicJasper: A library for creating reports dynamically by specifying
 3  
  * columns, groups, styles, etc. at runtime. It also saves a lot of development
 4  
  * time in many cases! (http://sourceforge.net/projects/dynamicjasper)
 5  
  *
 6  
  * Copyright (C) 2008  FDV Solutions (http://www.fdvsolutions.com)
 7  
  *
 8  
  * This library is free software; you can redistribute it and/or
 9  
  * modify it under the terms of the GNU Lesser General Public
 10  
  *
 11  
  * License as published by the Free Software Foundation; either
 12  
  *
 13  
  * version 2.1 of the License, or (at your option) any later version.
 14  
  *
 15  
  * This library is distributed in the hope that it will be useful,
 16  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  
  *
 18  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 19  
  *
 20  
  * Lesser General Public License for more details.
 21  
  *
 22  
  * You should have received a copy of the GNU Lesser General Public
 23  
  * License along with this library; if not, write to the Free Software
 24  
  *
 25  
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 26  
  *
 27  
  *
 28  
  */
 29  
 
 30  
 package ar.com.fdvs.dj.domain;
 31  
 
 32  
 import ar.com.fdvs.dj.domain.constants.ImageScaleMode;
 33  
 import ar.com.fdvs.dj.domain.entities.Entity;
 34  
 
 35  
 public class ImageBanner extends DJBaseElement {
 36  
 
 37  
         private static final long serialVersionUID = Entity.SERIAL_VERSION_UID;
 38  
 
 39  
         public static final byte ALIGN_LEFT = 0;
 40  
         public static final byte ALIGN_RIGHT = 1;
 41  
         public static final byte ALIGN_CENTER = 2;
 42  
 
 43  
         private String imagePath;
 44  19
         private int width = 0;
 45  19
         private int height= 0;
 46  19
         private byte align = 0;
 47  19
         private ImageScaleMode scaleMode = ImageScaleMode.FILL_PROPORTIONALLY;
 48  
         
 49  0
         public ImageBanner(){
 50  0
         };
 51  
 
 52  
         public int getHeight() {
 53  48
                 return height;
 54  
         }
 55  
         public void setHeight(int height) {
 56  0
                 this.height = height;
 57  0
         }
 58  
         public String getImagePath() {
 59  19
                 return imagePath;
 60  
         }
 61  
         public void setImagePath(String imagePath) {
 62  0
                 this.imagePath = imagePath;
 63  0
         }
 64  
         public byte getAlign() {
 65  29
                 return align;
 66  
         }
 67  
         public void setAlign(byte orientation) {
 68  0
                 this.align = orientation;
 69  0
         }
 70  
         public int getWidth() {
 71  29
                 return width;
 72  
         }
 73  
         public void setWidth(int width) {
 74  0
                 this.width = width;
 75  0
         }
 76  
         
 77  
         public ImageScaleMode getScaleMode() {
 78  19
                 return scaleMode;
 79  
         }
 80  
 
 81  
         public void setScaleMode(ImageScaleMode scaleMode) {
 82  4
                 this.scaleMode = scaleMode;
 83  4
         }
 84  
         
 85  19
         public ImageBanner(String imagePath, int width, int height, byte align) {
 86  19
                 this.imagePath = imagePath;
 87  19
                 this.width = width;
 88  19
                 this.height = height;
 89  19
                 this.align = align;
 90  19
         }
 91  
 
 92  
 }