/**
 * * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Generated by Apache Flex Cross-Compiler from org/apache/flex/html/supportClasses/DataItemRenderer.as
 * org.apache.flex.html.supportClasses.DataItemRenderer
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.flex.html.supportClasses.DataItemRenderer');

goog.require('org.apache.flex.html.beads.controllers.ItemRendererMouseController');
goog.require('org.apache.flex.html.supportClasses.UIItemRendererBase');
goog.require('org.apache.flex.utils.Language');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion FlexJS 0.0
 * @constructor
 * @extends {org.apache.flex.html.supportClasses.UIItemRendererBase}
 */
org.apache.flex.html.supportClasses.DataItemRenderer = function() {
  org.apache.flex.html.supportClasses.DataItemRenderer.base(this, 'constructor');
};
goog.inherits(org.apache.flex.html.supportClasses.DataItemRenderer, org.apache.flex.html.supportClasses.UIItemRendererBase);


/**
 * @private
 * @type {number}
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype._columnIndex;


/**
 * @private
 * @type {number}
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype._rowIndex;


/**
 * @private
 * @type {string}
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype._dataField;


/**
 * @private
 * @type {org.apache.flex.html.beads.controllers.ItemRendererMouseController}
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype.controller;


/**
 * @asprivate
 * @export
 * @override
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype.updateRenderer = function() {
  
  if (this.selected)
    this.element.style.backgroundColor = '#9C9C9C';
  else if (this.hovered)
    this.element.style.backgroundColor = '#ECECEC';
  else
    this.element.style.backgroundColor = null;
};


/**
 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
 *
 * @protected
 * @override
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype.createElement = function() {
  this.element = document.createElement('div');
  this.positioner = this.element;
  this.positioner.style.position = 'relative';
  this.element.flexjs_wrapper = this;
  this.className = 'DataItemRenderer';
  this.controller = new org.apache.flex.html.beads.controllers.ItemRendererMouseController();
  this.controller.strand = this;
  return this.element;
};


Object.defineProperties(org.apache.flex.html.supportClasses.DataItemRenderer.prototype, /** @lends {org.apache.flex.html.supportClasses.DataItemRenderer.prototype} */ {
/** @export */
columnIndex: {
get: /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */ function() {
  return this._columnIndex;
},
set: /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */ function(value) {
  this._columnIndex = value;
}},
/** @export */
rowIndex: {
get: /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */ function() {
  return this._rowIndex;
},
set: /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */ function(value) {
  this._rowIndex = value;
}},
/** @export */
dataField: {
get: /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */ function() {
  return this._dataField;
},
set: /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */ function(value) {
  this._dataField = value;
}}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'DataItemRenderer', qName: 'org.apache.flex.html.supportClasses.DataItemRenderer'}] };


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.flex.html.supportClasses.DataItemRenderer', org.apache.flex.html.supportClasses.DataItemRenderer);



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.flex.html.supportClasses.DataItemRenderer.prototype.FLEXJS_REFLECTION_INFO = function () {
  return {
    variables: function () {
      return {
      };
    },
    accessors: function () {
      return {
        'columnIndex': { type: 'int', declaredBy: 'org.apache.flex.html.supportClasses.DataItemRenderer'},
        'rowIndex': { type: 'int', declaredBy: 'org.apache.flex.html.supportClasses.DataItemRenderer'},
        'dataField': { type: 'String', declaredBy: 'org.apache.flex.html.supportClasses.DataItemRenderer'}
      };
    },
    methods: function () {
      return {
        'DataItemRenderer': { type: '', declaredBy: 'org.apache.flex.html.supportClasses.DataItemRenderer'},
        'updateRenderer': { type: 'void', declaredBy: 'org.apache.flex.html.supportClasses.DataItemRenderer'}
      };
    }
  };
};