/** * Set small icon. Used for toolbar buttons. If {@code null} is specified, * any existing value is lost (removed). * * @param path Path to small icon. * * @see #SMALL_ICON * @see Icon */ public void setSmallIcon( final String path ) { setSmallIcon( path, -1, -1 ); }
setSmallIcon( new AsyncIcon( path, width, height ) ); if ( icon != null ) setSmallIcon( icon );
/** * Set default icon for action. */ protected void setDefaultIcon() { final ResourceBundle bundle = _bundle; final String key = getActionCommand(); final String iconPath = ResourceBundleTools.getString( bundle, key + "Icon", null ); if ( iconPath != null ) { final int iconSize = ResourceBundleTools.getInt( bundle, key + "IconSize", -1 ); final int iconWidth = ResourceBundleTools.getInt( bundle, key + "IconWidth", iconSize ); final int iconHeight = ResourceBundleTools.getInt( bundle, key + "IconHeight", iconSize ); setSmallIcon( iconPath, iconWidth, iconHeight ); } }