public void setIconType ( IconType type ) { IconType prevType = iconType ; iconType = type ; if ( iconType != prevType && iconElement != null ) { iconElement . removeFromParent ( ) ; iconElement = null ; DomEvent . fireNativeEvent ( Document . get ( ) . createChangeEvent ( ) , this ) ; } }
Sets the icon type . If the icon type changes programatically then the icon is removed from the dom and recreated .