use of org.jdesktop.swingx.icon.EmptyIcon in project cytoscape-impl by cytoscape.
the class VisualPropertySheetItem method getIcon.
@SuppressWarnings({ "unchecked", "rawtypes" })
private Icon getIcon(final T value, final int width, final int height) {
// TODO should not be part of this class
Icon icon = null;
final RenderingEngine<?> engine = model.getRenderingEngine();
if (engine != null && value != null)
icon = engine.createIcon((VisualProperty) model.getVisualProperty(), value, width, height);
if (icon == null)
icon = new EmptyIcon(width, height);
return icon;
}