View Javadoc
1 package edu.psu.geovista.app.matrix; 2 3 /*** 4 * <p>Title: UniPlotMatrixBeanInfo</p> 5 * <p>Description: Bean info for UniPlotMatrix</p> 6 * <p>Copyright: GeoVISTA Center Copyright (c) 2001</p> 7 * <p>Company: GeoVISTA Center</p> 8 * @author Xiping Dai 9 * @version 1.0 10 */ 11 12 import java.beans.*; 13 14 public class UniPlotMatrixBeanInfo extends SimpleBeanInfo { 15 Class beanClass = UniPlotMatrix.class; 16 String iconColor16x16Filename = "matrix16.gif"; 17 String iconColor32x32Filename = "matrix32.gif"; 18 String iconMono16x16Filename; 19 String iconMono32x32Filename; 20 21 public UniPlotMatrixBeanInfo() { 22 } 23 24 public PropertyDescriptor[] getPropertyDescriptors() { 25 try { 26 PropertyDescriptor _background = new PropertyDescriptor("background", beanClass, "getBackground", "setBackground"); 27 PropertyDescriptor _selectionColor = new PropertyDescriptor("selectionColor", beanClass, "getSelectionColor", "setSelectionColor"); 28 PropertyDescriptor _selOriginalColorMode = new PropertyDescriptor("selOriginalColorMode", beanClass, "getSelOriginalColorMode", "setSelOriginalColorMode"); 29 PropertyDescriptor _maxNumArrays = new PropertyDescriptor("maxNumArrays", beanClass, "getMaxNumArrays", "setMaxNumArrays"); 30 PropertyDescriptor _plottedBegin = new PropertyDescriptor("plottedBegin", beanClass, "getPlottedBegin", "setPlottedBegin"); 31 PropertyDescriptor _elementClassName = new PropertyDescriptor("elementClassName", beanClass); 32 PropertyDescriptor[] pds = new PropertyDescriptor[] { 33 _background, 34 _selectionColor, _selOriginalColorMode, _maxNumArrays, _plottedBegin, _elementClassName}; 35 return pds; 36 37 } 38 catch(IntrospectionException ex) { 39 ex.printStackTrace(); 40 return null; 41 } 42 } 43 public java.awt.Image getIcon(int iconKind) { 44 switch (iconKind) { 45 case BeanInfo.ICON_COLOR_16x16: 46 return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null; 47 case BeanInfo.ICON_COLOR_32x32: 48 return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null; 49 case BeanInfo.ICON_MONO_16x16: 50 return iconMono16x16Filename != null ? loadImage(iconMono16x16Filename) : null; 51 case BeanInfo.ICON_MONO_32x32: 52 return iconMono32x32Filename != null ? loadImage(iconMono32x32Filename) : null; 53 } 54 return null; 55 } 56 public BeanInfo[] getAdditionalBeanInfo() { 57 Class superclass = beanClass.getSuperclass(); 58 try { 59 BeanInfo superBeanInfo = Introspector.getBeanInfo(superclass); 60 return new BeanInfo[] { superBeanInfo }; 61 } 62 catch(IntrospectionException ex) { 63 ex.printStackTrace(); 64 return null; 65 } 66 } 67 68 }

This page was automatically generated by Maven