1 2 package org.compiere.model; 3 import java.util.*; 4 import java.sql.*; 5 import java.math.*; 6 import java.io.Serializable ; 7 import org.compiere.util.*; 8 10 public class X_AD_Color extends PO 11 { 12 13 public X_AD_Color (Properties ctx, int AD_Color_ID) 14 { 15 super (ctx, AD_Color_ID); 16 29 } 30 31 public X_AD_Color (Properties ctx, ResultSet rs) 32 { 33 super (ctx, rs); 34 } 35 36 protected POInfo initPO (Properties ctx) 37 { 38 int AD_Table_ID = 457; 39 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 40 return poi; 41 } 42 public String toString() 43 { 44 StringBuffer sb = new StringBuffer ("X_AD_Color[").append(getID()).append("]"); 45 return sb.toString(); 46 } 47 void setAD_Color_ID (int AD_Color_ID) 48 { 49 setValueNoCheck ("AD_Color_ID", new Integer (AD_Color_ID)); 50 } 51 public int getAD_Color_ID() 52 { 53 Integer ii = (Integer )getValue("AD_Color_ID"); 54 if (ii == null) return 0; 55 return ii.intValue(); 56 } 57 public void setAD_Image_ID (int AD_Image_ID) 58 { 59 if (AD_Image_ID == 0) setValue ("AD_Image_ID", null); 60 else 61 setValue ("AD_Image_ID", new Integer (AD_Image_ID)); 62 } 63 public int getAD_Image_ID() 64 { 65 Integer ii = (Integer )getValue("AD_Image_ID"); 66 if (ii == null) return 0; 67 return ii.intValue(); 68 } 69 public void setAlpha (int Alpha) 70 { 71 setValue ("Alpha", new Integer (Alpha)); 72 } 73 public int getAlpha() 74 { 75 Integer ii = (Integer )getValue("Alpha"); 76 if (ii == null) return 0; 77 return ii.intValue(); 78 } 79 public void setAlpha_1 (int Alpha_1) 80 { 81 setValue ("Alpha_1", new Integer (Alpha_1)); 82 } 83 public int getAlpha_1() 84 { 85 Integer ii = (Integer )getValue("Alpha_1"); 86 if (ii == null) return 0; 87 return ii.intValue(); 88 } 89 public void setBlue (int Blue) 90 { 91 setValue ("Blue", new Integer (Blue)); 92 } 93 public int getBlue() 94 { 95 Integer ii = (Integer )getValue("Blue"); 96 if (ii == null) return 0; 97 return ii.intValue(); 98 } 99 public void setBlue_1 (int Blue_1) 100 { 101 setValue ("Blue_1", new Integer (Blue_1)); 102 } 103 public int getBlue_1() 104 { 105 Integer ii = (Integer )getValue("Blue_1"); 106 if (ii == null) return 0; 107 return ii.intValue(); 108 } 109 public static final String COLORTYPE_NormalFlat = "F"; 110 public static final String COLORTYPE_Gradient = "G"; 111 public static final String COLORTYPE_Line = "L"; 112 public static final String COLORTYPE_TexturePicture = "T"; 113 public void setColorType (Object ColorType) 114 { 115 if (ColorType.equals("F") || ColorType.equals("G") || ColorType.equals("L") || ColorType.equals("T")); 116 else throw new IllegalArgumentException ("ColorType Invalid value - Reference_ID=243 - F - G - L - T"); 117 if (ColorType == null) throw new IllegalArgumentException ("ColorType is mandatory"); 118 setValue ("ColorType", ColorType); 119 } 120 public Object getColorType() 121 { 122 return getValue("ColorType"); 123 } 124 public void setGreen (int Green) 125 { 126 setValue ("Green", new Integer (Green)); 127 } 128 public int getGreen() 129 { 130 Integer ii = (Integer )getValue("Green"); 131 if (ii == null) return 0; 132 return ii.intValue(); 133 } 134 public void setGreen_1 (int Green_1) 135 { 136 setValue ("Green_1", new Integer (Green_1)); 137 } 138 public int getGreen_1() 139 { 140 Integer ii = (Integer )getValue("Green_1"); 141 if (ii == null) return 0; 142 return ii.intValue(); 143 } 144 public void setImageAlpha (BigDecimal ImageAlpha) 145 { 146 if (ImageAlpha == null) throw new IllegalArgumentException ("ImageAlpha is mandatory"); 147 setValue ("ImageAlpha", ImageAlpha); 148 } 149 public BigDecimal getImageAlpha() 150 { 151 BigDecimal bd = (BigDecimal)getValue("ImageAlpha"); 152 if (bd == null) return Env.ZERO; 153 return bd; 154 } 155 public void setIsDefault (boolean IsDefault) 156 { 157 setValue ("IsDefault", new Boolean (IsDefault)); 158 } 159 public boolean isDefault() 160 { 161 Boolean bb = (Boolean )getValue("IsDefault"); 162 if (bb != null) return bb.booleanValue(); 163 return false; 164 } 165 public void setLineDistance (int LineDistance) 166 { 167 setValue ("LineDistance", new Integer (LineDistance)); 168 } 169 public int getLineDistance() 170 { 171 Integer ii = (Integer )getValue("LineDistance"); 172 if (ii == null) return 0; 173 return ii.intValue(); 174 } 175 public void setLineWidth (int LineWidth) 176 { 177 setValue ("LineWidth", new Integer (LineWidth)); 178 } 179 public int getLineWidth() 180 { 181 Integer ii = (Integer )getValue("LineWidth"); 182 if (ii == null) return 0; 183 return ii.intValue(); 184 } 185 public void setName (String Name) 186 { 187 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 188 setValue ("Name", Name); 189 } 190 public String getName() 191 { 192 return (String )getValue("Name"); 193 } 194 public void setRed (int Red) 195 { 196 setValue ("Red", new Integer (Red)); 197 } 198 public int getRed() 199 { 200 Integer ii = (Integer )getValue("Red"); 201 if (ii == null) return 0; 202 return ii.intValue(); 203 } 204 public void setRed_1 (int Red_1) 205 { 206 setValue ("Red_1", new Integer (Red_1)); 207 } 208 public int getRed_1() 209 { 210 Integer ii = (Integer )getValue("Red_1"); 211 if (ii == null) return 0; 212 return ii.intValue(); 213 } 214 public void setRepeatDistance (int RepeatDistance) 215 { 216 setValue ("RepeatDistance", new Integer (RepeatDistance)); 217 } 218 public int getRepeatDistance() 219 { 220 Integer ii = (Integer )getValue("RepeatDistance"); 221 if (ii == null) return 0; 222 return ii.intValue(); 223 } 224 public static final String STARTPOINT_North = "1"; 225 public static final String STARTPOINT_NorthEast = "2"; 226 public static final String STARTPOINT_East = "3"; 227 public static final String STARTPOINT_SouthEast = "4"; 228 public static final String STARTPOINT_South = "5"; 229 public static final String STARTPOINT_SouthWest = "6"; 230 public static final String STARTPOINT_West = "7"; 231 public static final String STARTPOINT_NorthWest = "8"; 232 public void setStartPoint (String StartPoint) 233 { 234 if (StartPoint.equals("1") || StartPoint.equals("2") || StartPoint.equals("3") || StartPoint.equals("4") || StartPoint.equals("5") || StartPoint.equals("6") || StartPoint.equals("7") || StartPoint.equals("8")); 235 else throw new IllegalArgumentException ("StartPoint Invalid value - Reference_ID=248 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8"); 236 setValue ("StartPoint", StartPoint); 237 } 238 public String getStartPoint() 239 { 240 return (String )getValue("StartPoint"); 241 } 242 } 243 | Popular Tags |