1 18 package org.apache.batik.swing; 19 20 import java.awt.Image ; 21 import java.beans.SimpleBeanInfo ; 22 23 29 public class JSVGCanvasBeanInfo extends SimpleBeanInfo { 30 31 32 protected Image iconColor16x16; 33 34 35 protected Image iconMono16x16; 36 37 38 protected Image iconColor32x32; 39 40 41 protected Image iconMono32x32; 42 43 46 public JSVGCanvasBeanInfo() { 47 iconColor16x16 = loadImage("resources/batikColor16x16.gif"); 48 iconMono16x16 = loadImage("resources/batikMono16x16.gif"); 49 iconColor32x32 = loadImage("resources/batikColor32x32.gif"); 50 iconMono32x32 = loadImage("resources/batikMono32x32.gif"); 51 } 52 53 56 public Image getIcon(int iconType) { 57 switch(iconType) { 58 case ICON_COLOR_16x16: 59 return iconColor16x16; 60 case ICON_MONO_16x16: 61 return iconMono16x16; 62 case ICON_COLOR_32x32: 63 return iconColor32x32; 64 case ICON_MONO_32x32: 65 return iconMono32x32; 66 default: 67 return null; 68 } 69 } 70 } 71 72 | Popular Tags |