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

goog.provide('org.apache.royale.jewel.itemRenderers.StringItemRenderer');

goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.html.supportClasses.DataItemRenderer');
goog.require('org.apache.royale.html.util.addElementToWrapper');
goog.require('org.apache.royale.jewel.beads.controls.TextAlign');
goog.require('org.apache.royale.jewel.supportClasses.util.getLabelFromData');
goog.require('org.apache.royale.jewel.beads.itemRenderers.ITextItemRenderer');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @constructor
 * @extends {org.apache.royale.html.supportClasses.DataItemRenderer}
 * @implements {org.apache.royale.jewel.beads.itemRenderers.ITextItemRenderer}
 */
org.apache.royale.jewel.itemRenderers.StringItemRenderer = function() {
  org.apache.royale.jewel.itemRenderers.StringItemRenderer.base(this, 'constructor');
  this.typeNames = "jewel item string";
  
  this.org_apache_royale_jewel_itemRenderers_StringItemRenderer_textAlign = new org.apache.royale.jewel.beads.controls.TextAlign();
  this.addBead(this.org_apache_royale_jewel_itemRenderers_StringItemRenderer_textAlign);
};
goog.inherits(org.apache.royale.jewel.itemRenderers.StringItemRenderer, org.apache.royale.html.supportClasses.DataItemRenderer);


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


/**
 * @private
 * @type {org.apache.royale.jewel.beads.controls.TextAlign}
 */
org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.org_apache_royale_jewel_itemRenderers_StringItemRenderer_textAlign;


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @protected
 * @override
 */
org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.createElement = function() {
  return org.apache.royale.html.util.addElementToWrapper(this, 'span');
};


org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.get__text = function() {
  
  return this.element.textContent;
};


org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.set__text = function(value) {
  
  this.element.textContent = value;
};


org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.get__align = function() {
  return this.org_apache_royale_jewel_itemRenderers_StringItemRenderer_textAlign.align;
};


org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.set__align = function(value) {
  this.org_apache_royale_jewel_itemRenderers_StringItemRenderer_textAlign.align = value;
};


org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.set__data = function(value) {
  org.apache.royale.jewel.itemRenderers.StringItemRenderer.superClass_.set__data.apply(this, [ value] );
  this.text = org.apache.royale.jewel.supportClasses.util.getLabelFromData(this, value);
};


Object.defineProperties(org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype, /** @lends {org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype} */ {
/**
  * @export
  * @type {string} */
text: {
get: org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.get__text,
set: org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.set__text},
/**
  * @export
  * @type {string} */
align: {
get: org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.get__align,
set: org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.set__align},
/**
  * @export
  * @type {Object} */
data: {
get: org.apache.royale.html.supportClasses.UIItemRendererBase.prototype.get__data,
set: org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.set__data}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.itemRenderers.StringItemRenderer.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'text': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.itemRenderers.StringItemRenderer'},
        'align': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.itemRenderers.StringItemRenderer'},
        'data': { type: 'Object', access: 'writeonly', declaredBy: 'org.apache.royale.jewel.itemRenderers.StringItemRenderer'}
      };
    },
    methods: function () {
      return {
        'StringItemRenderer': { type: '', declaredBy: 'org.apache.royale.jewel.itemRenderers.StringItemRenderer'}
      };
    }
  };
};