Search in sources :

Example 1 with EmptyIcon

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;
}
Also used : Icon(javax.swing.Icon) EmptyIcon(org.jdesktop.swingx.icon.EmptyIcon) EmptyIcon(org.jdesktop.swingx.icon.EmptyIcon)

Aggregations

Icon (javax.swing.Icon)1 EmptyIcon (org.jdesktop.swingx.icon.EmptyIcon)1