public void setIcon ( Icon icon ) { Icon old = null ; if ( iconInfo == CommandButtonIconInfo . BLANK_ICON_INFO ) { if ( icon != null ) { // New IconInfo fires event setIconInfo ( new CommandButtonIconInfo ( icon ) ) ; } } else { old = iconInfo . getIcon ( ) ; this . iconInfo . setIcon ( icon ) ; } firePropertyChange ( ICON_PROPERTY , old , icon ) ; }
Set the main default icon to be associated with the command .