if (value instanceof DefaultMutableTreeNode) {
value = ((DefaultMutableTreeNode) value).getUserObject();
}
Component component = null;
ImageManager imageManager = ImageManager.getInstance();
Icon icon = null;
if (value instanceof Datastore) {
component = _rendererDelegate.getTreeCellRendererComponent(tree, ((Datastore) value).getName(), selected,
expanded, leaf, row, hasFocus);
icon = IconUtils.getDatastoreIcon((Datastore) value, IconUtils.ICON_SIZE_SMALL);
} else if (value instanceof Schema) {
Schema schema = ((Schema) value);
String schemaName = schema.getName();
component = _rendererDelegate.getTreeCellRendererComponent(tree, schemaName, selected, expanded, leaf, row,
hasFocus);
icon = imageManager.getImageIcon("images/model/schema.png", IconUtils.ICON_SIZE_SMALL);
if (SchemaComparator.isInformationSchema(schema)) {
icon = imageManager.getImageIcon("images/model/schema_information.png", IconUtils.ICON_SIZE_SMALL);
}
} else if (value instanceof Table) {
component = _rendererDelegate.getTreeCellRendererComponent(tree, ((Table) value).getName(), selected, expanded,
leaf, row, hasFocus);
icon = imageManager.getImageIcon("images/model/table.png", IconUtils.ICON_SIZE_SMALL);
} else if (value instanceof Column) {
Column column = (Column) value;
component = _rendererDelegate.getTreeCellRendererComponent(tree, column.getName(), selected, expanded, leaf,
row, hasFocus);
icon = imageManager.getImageIcon("images/model/column.png", IconUtils.ICON_SIZE_SMALL);
} else if (value instanceof String) {
component = _rendererDelegate.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
}
if (component == null) {