1 29 30 package nextapp.echo2.app; 31 32 import java.io.Serializable ; 33 34 39 public class FillImage 40 implements Serializable { 41 42 public static final int NO_REPEAT = 0; 43 public static final int REPEAT_HORIZONTAL = 1; 44 public static final int REPEAT_VERTICAL = 2; 45 public static final int REPEAT = 3; 46 47 private ImageReference image; 48 private Extent horizontalOffset; 49 private Extent verticalOffset; 50 private int repeat; 51 52 60 public FillImage(ImageReference image) { 61 this(image, null, null, REPEAT); 62 } 63 64 87 public FillImage(ImageReference image, Extent horizontalOffset, Extent verticalOffset, int repeat) { 88 super(); 89 this.image = image; 90 this.horizontalOffset = horizontalOffset; 91 this.verticalOffset = verticalOffset; 92 this.repeat = repeat; 93 } 94 95 98 public boolean equals(Object o) { 99 if (!(o instanceof FillImage)) { 100 return false; 101 } 102 FillImage that = (FillImage) o; 103 if (this.repeat != that.repeat) { 104 return false; 105 } 106 if (!(this.image == that.image || (this.image != null && this.image.equals(that.image)))) { 107 return false; 108 } 109 if (!(this.horizontalOffset == that.horizontalOffset || 110 (this.horizontalOffset != null && this.horizontalOffset.equals(that.horizontalOffset)))) { 111 return false; 112 } 113 if (!(this.verticalOffset == that.verticalOffset || 114 (this.verticalOffset != null && this.verticalOffset.equals(that.verticalOffset)))) { 115 return false; 116 } 117 return true; 118 } 119 120 127 public Extent getHorizontalOffset() { 128 return horizontalOffset; 129 } 130 135 public ImageReference getImage() { 136 return image; 137 } 138 139 150 public int getRepeat() { 151 return repeat; 152 } 153 154 161 public Extent getVerticalOffset() { 162 return verticalOffset; 163 } 164 } 165 | Popular Tags |