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

goog.provide('org.apache.royale.core.StyledMXMLItemRenderer');

goog.require('org.apache.royale.html.supportClasses.MXMLItemRenderer');
goog.require('org.apache.royale.utils.ClassSelectorList');
goog.require('org.apache.royale.utils.IClassSelectorListSupport');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.3
 * @constructor
 * @extends {org.apache.royale.html.supportClasses.MXMLItemRenderer}
 * @implements {org.apache.royale.utils.IClassSelectorListSupport}
 */
org.apache.royale.core.StyledMXMLItemRenderer = function() {
  org.apache.royale.core.StyledMXMLItemRenderer.base(this, 'constructor');
  this.typeNames = "";
  this.classSelectorList = new org.apache.royale.utils.ClassSelectorList(this);
};
goog.inherits(org.apache.royale.core.StyledMXMLItemRenderer, org.apache.royale.html.supportClasses.MXMLItemRenderer);


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


/**
 * @protected
 * @type {org.apache.royale.utils.ClassSelectorList}
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.classSelectorList;


/**
 * @protected
 * @override
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.setClassName = function(value) {
  this.classSelectorList.addNames(value);
};


/**
 * Add a class selector to the list.
 * 
 * @asparam name Name of selector to add.
 * 
 * @langversion 3.0
 * @playerversion Flash 10.2
 * @playerversion AIR 2.6
 * @productversion Royale 0.9.3
 * @export
 * @param {string} name
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.addClass = function(name) {
  this.classSelectorList.add(name);
};


/**
 * Removes a class selector from the list.
 * 
 * @asparam name Name of selector to remove.
 *
 * @royaleignorecoercion HTMLElement
 * @royaleignorecoercion DOMTokenList
 * 
 * @langversion 3.0
 * @playerversion Flash 10.2
 * @playerversion AIR 2.6
 * @productversion Royale 0.9.3
 * @export
 * @param {string} name
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.removeClass = function(name) {
  this.classSelectorList.remove(name);
};


/**
 * Add or remove a class selector to/from the list.
 * 
 * @asparam name Name of selector to add or remove.
 * @asparam value True to add, False to remove.
 * 
 * @langversion 3.0
 * @playerversion Flash 10.2
 * @playerversion AIR 2.6
 * @productversion Royale 0.9.3
 * @export
 * @param {string} name
 * @param {boolean} value
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.toggleClass = function(name, value) {
  this.classSelectorList.toggle(name, value);
};


/**
 *  Search for the name in the element class list 
 *
 *  @asparam name Name of selector to find.
 *  @asreturn return true if the name is found or false otherwise.
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.3
 * @export
 * @param {string} name
 * @return {boolean}
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.containsClass = function(name) {
  return this.classSelectorList.contains(name);
  
};


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.core.StyledMXMLItemRenderer.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'StyledMXMLItemRenderer': { type: '', declaredBy: 'org.apache.royale.core.StyledMXMLItemRenderer'},
        'addClass': { type: 'void', declaredBy: 'org.apache.royale.core.StyledMXMLItemRenderer', parameters: function () { return [  { index: 1, type: 'String', optional: false } ]; }},
        'removeClass': { type: 'void', declaredBy: 'org.apache.royale.core.StyledMXMLItemRenderer', parameters: function () { return [  { index: 1, type: 'String', optional: false } ]; }},
        'toggleClass': { type: 'void', declaredBy: 'org.apache.royale.core.StyledMXMLItemRenderer', parameters: function () { return [  { index: 1, type: 'String', optional: false },{ index: 2, type: 'Boolean', optional: false } ]; }},
        'containsClass': { type: 'Boolean', declaredBy: 'org.apache.royale.core.StyledMXMLItemRenderer', parameters: function () { return [  { index: 1, type: 'String', optional: false } ]; }}
      };
    }
  };
};