/** * Sets the icon which is normally shown on the view. * @param modifier the context in which to use the icon, not <code>null</code> * @param icon the new icon, can be <code>null</code> */ public void setIcon( ActionContentModifier modifier, Icon icon ){ Icon oldIcon = icons.remove( modifier ); if( icon == null ){ icons.remove( modifier ); } else{ icons.put( modifier, icon ); } disabledIcons.remove( modifier ); for( BasicButtonModelListener listener : listeners() ){ listener.iconChanged( this, modifier, oldIcon, icon ); } changed(); }