/**
 * Generated by Apache Royale Compiler from org\apache\royale\jewel\IconButton.as
 * org.apache.royale.jewel.IconButton
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.jewel.IconButton');

goog.require('org.apache.royale.core.IIcon');
goog.require('org.apache.royale.jewel.Button');
goog.require('org.apache.royale.core.IIconSupport');



/**
 *  Constructor.
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @constructor
 * @extends {org.apache.royale.jewel.Button}
 * @implements {org.apache.royale.core.IIconSupport}
 */
org.apache.royale.jewel.IconButton = function() {
  org.apache.royale.jewel.IconButton.base(this, 'constructor');
};
goog.inherits(org.apache.royale.jewel.IconButton, org.apache.royale.jewel.Button);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.jewel.IconButton', org.apache.royale.jewel.IconButton);


/**
 * @private
 * @type {org.apache.royale.core.IIcon}
 */
org.apache.royale.jewel.IconButton.prototype.org_apache_royale_jewel_IconButton__icon;


org.apache.royale.jewel.IconButton.prototype.get__icon = function() {
  return this.org_apache_royale_jewel_IconButton__icon;
};


org.apache.royale.jewel.IconButton.prototype.set__icon = function(value) {
  this.org_apache_royale_jewel_IconButton__icon = value;
  var /** @type {string} */ iconClass = "icon";
  if (this.text != "") {
    iconClass += "WithSpace";
  }
  this.toggleClass(iconClass, (this.org_apache_royale_jewel_IconButton__icon != null));
  this.addElementAt(this.org_apache_royale_jewel_IconButton__icon, 0);
  
};


Object.defineProperties(org.apache.royale.jewel.IconButton.prototype, /** @lends {org.apache.royale.jewel.IconButton.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IIcon} */
icon: {
get: org.apache.royale.jewel.IconButton.prototype.get__icon,
set: org.apache.royale.jewel.IconButton.prototype.set__icon}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.jewel.IconButton.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'IconButton', qName: 'org.apache.royale.jewel.IconButton', kind: 'class' }], interfaces: [org.apache.royale.core.IIconSupport] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.IconButton.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'icon': { type: 'org.apache.royale.core.IIcon', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.IconButton'}
      };
    },
    methods: function () {
      return {
        'IconButton': { type: '', declaredBy: 'org.apache.royale.jewel.IconButton'}
      };
    }
  };
};