@Override public Component getTreeCellRendererComponent( JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { JLabel label = (JLabel) super.getTreeCellRendererComponent( tree, value, selected, expanded, leaf, row, hasFocus); if (value instanceof Tag) { label.setIcon(iconProducer.getIcon(((Tag) value).getStyle())); } else if (value instanceof TagStyle) { label.setIcon(iconProducer.getIcon((TagStyle) value)); } else if (value instanceof TagTypeTreeNode) { label.setIcon(IconUtils.getTagIcon(((TagTypeTreeNode) value).getType())); } else if (value instanceof TagStylesTreeNode) { label.setIcon(IconUtils.getPaletteIcon()); } else if (value instanceof Document) { ManagedDocumentType type = ManagedDocumentType.getForClass(((Document) value).getClass()); Icon icon = null; if (type != null) { icon = type.getIcon(); } if (icon != null) { label.setIcon(icon); } } return label; }
public AnalyzeAction() { super(_("Analyze tag differences")); putValue(AbstractAction.SMALL_ICON, IconUtils.loadClassPathIcon("org/signalml/app/icon/analyze.png")); putValue(AbstractAction.SHORT_DESCRIPTION,_("Show analytical comparison summary")); }