@Override public Image getIcon(int iconKind) { return this.delegate.getIcon(iconKind); }
@Override public Image getIcon(int iconKind) { return this.delegate.getIcon(iconKind); }
public Image getIcon(int arg0) { return delegate.getIcon(arg0); }
/** Get an icon for this node in the closed state. * Uses the Bean's icon if possible. * * @param type constant from {@link java.beans.BeanInfo} * @return icon to use */ @Override public Image getIcon(int type) { Image image = beanInfo.getIcon(type); if (image != null) { return image; } return super.getIcon(type); }
/** * BeanInfo implementation. Just forward the call to the delegate. */ public Image getIcon(int i) { return m_delegate.getIcon(i); }
@Override public Image getIcon(int iconKind) { return this.delegate.getIcon(iconKind); }
@Override public java.awt.Image getIcon(int iconKind) { return delegate.getIcon(iconKind); }
@Override public Image getIcon(int iconKind) { return this.delegate.getIcon(iconKind); }
@Override public Image getIcon(int iconKind) { return this.delegate.getIcon(iconKind); }
/** Get an icon for this node in the closed state. * Uses the Bean's icon if possible. * * @param type constant from {@link java.beans.BeanInfo} * @return icon to use */ public Image getIcon (int type) { Image image = beanInfo.getIcon (type); if (image != null) return image; return super.getIcon(type); }
@Override public Image getIcon(int iconKind) { if (normalBeanInfo == null) return super.getIcon(iconKind); return normalBeanInfo.getIcon(iconKind); }
/** Get an icon for this node in the closed state. * Uses the Bean's icon if possible. * * @param type constant from {@link java.beans.BeanInfo} * @return icon to use */ public Image getIcon (int type) { Image image = beanInfo.getIcon (type); if (image != null) return image; return super.getIcon(type); }
/** * Returns an Icon for this object, determined using BeanInfo. If no icon was found a default icon will be returned. */ static public Icon getIcon(BeanInfo info) { Icon icon; try { Image image; image = info.getIcon(BeanInfo.ICON_COLOR_16x16); if (image == null) { image = info.getIcon(BeanInfo.ICON_MONO_16x16); } if (image == null) { icon = new UnknownIcon("B"); } else { icon = new ImageIcon(image); } } catch (Exception err) { icon = new UnknownIcon("E"); } return icon; }
public Image getIcon(int type) { Image img = liveBean.getBeanInfo().getIcon(type); if (img == null) { img = super.getIcon(type); // Falls back to default icon. } return img; }
public Icon getDisplayIcon(boolean enableNode) { if (displayIcon == null) { if (propInstance == null) { propInstance = getPropInstance(bean, propPath); } if (propInstance != null) { try { BeanInfo bi = Introspector.getBeanInfo(propInstance.getClass()); Image img = bi.getIcon(BeanInfo.ICON_COLOR_16x16); if (img != null) { displayIcon = new ImageIcon(img); } } catch (Exception x) {} if (displayIcon == null && (propPath == null || propPath.length == 0)) { if (bean instanceof MarkupDesignBean && ((MarkupDesignBean)bean).getElement() != null) { displayIcon = TargetPanel.TAG_ICON; } } } } if (displayIcon == null/* && propPath == null*/) { displayIcon = TargetPanel.BEAN_ICON; } return displayIcon; } }
public ImageIcon getIcon(boolean enabled) { TestElement testElement = getTestElement(); try { if (testElement instanceof TestBean) { Class<?> testClass = testElement.getClass(); try { Image img = Introspector.getBeanInfo(testClass).getIcon(BeanInfo.ICON_COLOR_16x16); // If icon has not been defined, then use GUI_CLASS property if (img == null) { Object clazz = Introspector.getBeanInfo(testClass).getBeanDescriptor() .getValue(TestElement.GUI_CLASS); if (clazz == null) { log.warn("getIcon(): Can't obtain GUI class from {}", testClass); return null; } return GUIFactory.getIcon(Class.forName((String) clazz), enabled); } return new ImageIcon(img); } catch (IntrospectionException e1) { log.error("Can't obtain icon for class {}", testElement, e1); throw new org.apache.jorphan.util.JMeterError(e1); } } return GUIFactory.getIcon(Class.forName(testElement.getPropertyAsString(TestElement.GUI_CLASS)), enabled); } catch (ClassNotFoundException e) { log.warn("Can't get icon for class {}", testElement, e); return null; } }
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); if (value instanceof ComponentTargetNode) { setIcon(new ImageIcon(((ComponentTargetNode)value).getComponentDesignBean().getBeanInfo().getIcon(BeanInfo.ICON_COLOR_16x16))); } else if (value instanceof FileNode) { try { FileObject fileObject = FileUtil.toFileObject(((FileNode) value).getFile()); Image fileImage = DataObject.find(fileObject).getNodeDelegate().getIcon(BeanInfo.ICON_COLOR_16x16); setIcon(new ImageIcon(fileImage)); } catch (DataObjectNotFoundException e) { } } return this; }
private Image rootIcon(int type) { FileObject orig = obj.getOriginal().getPrimaryFile(); if (orig.isRoot()) { try { FileSystem fs = orig.getFileSystem(); try { Image i = Introspector.getBeanInfo(fs.getClass()).getIcon(type); return fs.getStatus().annotateIcon(i, type, obj.files()); } catch (IntrospectionException ie) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ie); // ignore } } catch (FileStateInvalidException fsie) { // ignore } } return null; }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof DesignBean) { DesignBean b = (DesignBean)value; String prefix = ""; //NOI18N DesignBean p = b.getBeanParent(); while (p != null && p != b.getDesignContext().getRootContainer()) { prefix += " "; //NOI18N p = p.getBeanParent(); } this.setText(prefix + b.getInstanceName()); BeanInfo bi = b.getBeanInfo(); Image img = bi.getIcon(BeanInfo.ICON_COLOR_16x16); if (img != null) { this.setIcon(new ImageIcon(img)); } else { this.setIcon(BEAN_ICON); } } return this; } }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof DesignBean) { DesignBean b = (DesignBean)value; String prefix = ""; //NOI18N DesignBean p = b.getBeanParent(); while (p != null && p != b.getDesignContext().getRootContainer()) { prefix += " "; //NOI18N p = p.getBeanParent(); } this.setText(prefix + b.getInstanceName()); BeanInfo bi = b.getBeanInfo(); Image img = bi.getIcon(BeanInfo.ICON_COLOR_16x16); if (img != null) { this.setIcon(new ImageIcon(img)); } else { this.setIcon(BEAN_ICON); } } return this; } }