JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / java / awt / image / LookupTable.js
1 Clazz.declarePackage ("java.awt.image");\r
2 Clazz.load (null, "java.awt.image.LookupTable", ["java.lang.IllegalArgumentException"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.numComponents = 0;\r
5 this.offset = 0;\r
6 this.numEntries = 0;\r
7 Clazz.instantialize (this, arguments);\r
8 }, java.awt.image, "LookupTable");\r
9 Clazz.makeConstructor (c$, \r
10 function (offset, numComponents) {\r
11 if (offset < 0) {\r
12 throw  new IllegalArgumentException ("Offset must be greater than 0");\r
13 }if (numComponents < 1) {\r
14 throw  new IllegalArgumentException ("Number of components must  be at least 1");\r
15 }this.numComponents = numComponents;\r
16 this.offset = offset;\r
17 }, "~N,~N");\r
18 Clazz.defineMethod (c$, "getNumComponents", \r
19 function () {\r
20 return this.numComponents;\r
21 });\r
22 Clazz.defineMethod (c$, "getOffset", \r
23 function () {\r
24 return this.offset;\r
25 });\r
26 });\r