1 package org.telscenter.pas.otrunk;
2
3 import java.beans.BeanInfo;
4 import java.net.URL;
5
6 public class BeanIcons {
7 URL color32x32;
8 URL color16x16;
9 URL mono32x32;
10 URL mono16x16;
11
12 public URL getColor16x16() {
13 return color16x16;
14 }
15 public void setColor16x16(URL color16x16) {
16 this.color16x16 = color16x16;
17 }
18 public URL getColor32x32() {
19 return color32x32;
20 }
21 public void setColor32x32(URL color32x32) {
22 this.color32x32 = color32x32;
23 }
24 public URL getMono16x16() {
25 return mono16x16;
26 }
27 public void setMono16x16(URL mono16x16) {
28 this.mono16x16 = mono16x16;
29 }
30 public URL getMono32x32() {
31 return mono32x32;
32 }
33 public void setMono32x32(URL mono32x32) {
34 this.mono32x32 = mono32x32;
35 }
36
37 public URL getIcon(int iconKind) {
38 switch (iconKind) {
39 case BeanInfo.ICON_COLOR_32x32:
40 return getColor32x32();
41 case BeanInfo.ICON_COLOR_16x16:
42 return getColor16x16();
43 case BeanInfo.ICON_MONO_32x32:
44 return getMono32x32();
45 case BeanInfo.ICON_MONO_16x16:
46 return getMono16x16();
47 default:
48 throw new RuntimeException("unsupported icon kind");
49 }
50 }
51 }