List of usage examples for java.beans BeanInfo ICON_MONO_16x16
int ICON_MONO_16x16
To view the source code for java.beans BeanInfo ICON_MONO_16x16.
Click Source Link
From source file:com.twinsoft.convertigo.beans.core.MySimpleBeanInfo.java
@Override public BeanDescriptor getBeanDescriptor() { BeanDescriptor beanDescriptor = new BeanDescriptor(beanClass, null); beanDescriptor.setDisplayName(displayName); beanDescriptor.setShortDescription(shortDescription); if (iconNameC16 != null) { beanDescriptor.setValue("icon" + BeanInfo.ICON_COLOR_16x16, iconNameC16); }/*from www .jav a2 s.co m*/ if (iconNameC32 != null) { beanDescriptor.setValue("icon" + BeanInfo.ICON_COLOR_32x32, iconNameC32); } if (iconNameM16 != null) { beanDescriptor.setValue("icon" + BeanInfo.ICON_MONO_16x16, iconNameM16); } if (iconNameM32 != null) { beanDescriptor.setValue("icon" + BeanInfo.ICON_MONO_32x32, iconNameM32); } return beanDescriptor; }
From source file:com.twinsoft.convertigo.eclipse.ConvertigoPlugin.java
private Image getDefaultBeanIcon(Class<?> beanClass, int iconKind) { String iconBaseName, iconType; if (Criteria.class.isAssignableFrom(beanClass)) { iconBaseName = "criteria"; } else if (ExtractionRule.class.isAssignableFrom(beanClass)) { iconBaseName = "extractionrule"; } else if (Transaction.class.isAssignableFrom(beanClass)) { iconBaseName = "transaction"; } else if (BlockFactory.class.isAssignableFrom(beanClass)) { iconBaseName = "blockfactory"; } else if (Project.class.isAssignableFrom(beanClass)) { iconBaseName = "project"; } else if (ScreenClass.class.isAssignableFrom(beanClass)) { iconBaseName = "screenclass"; } else if (Sheet.class.isAssignableFrom(beanClass)) { iconBaseName = "sheet"; } else if (Pool.class.isAssignableFrom(beanClass)) { iconBaseName = "pool"; } else {/* w w w. j a v a 2 s .co m*/ iconBaseName = "default"; } switch (iconKind) { case java.beans.BeanInfo.ICON_COLOR_16x16: iconType = "_color_16x16.png"; break; default: case java.beans.BeanInfo.ICON_COLOR_32x32: iconType = "_color_32x32.png"; break; case java.beans.BeanInfo.ICON_MONO_16x16: iconType = "_mono_16x16.png"; break; case java.beans.BeanInfo.ICON_MONO_32x32: iconType = "_mono_32x32.png"; break; } Image beanIcon = (Image) icons.get(iconBaseName + iconType); if (beanIcon == null) { ConvertigoPlugin.studioLog.debug("Getting default icon: " + iconBaseName + iconType); String iconName = "/com/twinsoft/convertigo/beans/core/images/" + iconBaseName + iconType; Device device = getDisplay(); InputStream inputStream = ConvertigoPlugin.class.getResourceAsStream(iconName); beanIcon = new Image(device, inputStream); icons.put(iconBaseName + iconType, beanIcon); } return beanIcon; }