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

goog.provide('org.apache.royale.jewel.beads.controls.TextAlign');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.core.IBead');
goog.require('org.apache.royale.utils.Language');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @constructor
 * @implements {org.apache.royale.core.IBead}
 */
org.apache.royale.jewel.beads.controls.TextAlign = function() {

this.org_apache_royale_jewel_beads_controls_TextAlign__align = org.apache.royale.jewel.beads.controls.TextAlign.LEFT;
};


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


/**
 * @export
 * @const
 * @type {string}
 */
org.apache.royale.jewel.beads.controls.TextAlign.LEFT = "left";


/**
 * @export
 * @const
 * @type {string}
 */
org.apache.royale.jewel.beads.controls.TextAlign.RIGHT = "right";


/**
 * @export
 * @const
 * @type {string}
 */
org.apache.royale.jewel.beads.controls.TextAlign.CENTER = "center";


/**
 * @private
 * @type {string}
 */
org.apache.royale.jewel.beads.controls.TextAlign.prototype.org_apache_royale_jewel_beads_controls_TextAlign__align;


/**
 * @private
 * @type {string}
 */
org.apache.royale.jewel.beads.controls.TextAlign.prototype.org_apache_royale_jewel_beads_controls_TextAlign_oldValue;


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.jewel.beads.controls.TextAlign.prototype.org_apache_royale_jewel_beads_controls_TextAlign__strand;


/**
 * @private
 */
org.apache.royale.jewel.beads.controls.TextAlign.prototype.org_apache_royale_jewel_beads_controls_TextAlign_updateHost = function() {
  var /** @type {org.apache.royale.core.UIBase} */ host = org.apache.royale.utils.Language.as(this.org_apache_royale_jewel_beads_controls_TextAlign__strand, org.apache.royale.core.UIBase);
  if (host) {
    if (this.org_apache_royale_jewel_beads_controls_TextAlign_oldValue == org.apache.royale.jewel.beads.controls.TextAlign.LEFT)
      host.element.classList.remove("alignTextLeft");
    if (this.org_apache_royale_jewel_beads_controls_TextAlign_oldValue == org.apache.royale.jewel.beads.controls.TextAlign.RIGHT)
      host.element.classList.remove("alignTextRight");
    if (this.org_apache_royale_jewel_beads_controls_TextAlign_oldValue == org.apache.royale.jewel.beads.controls.TextAlign.CENTER)
      host.element.classList.remove("alignTextCenter");
    if (this.org_apache_royale_jewel_beads_controls_TextAlign__align == org.apache.royale.jewel.beads.controls.TextAlign.LEFT)
      host.element.classList.add("alignTextLeft");
    if (this.org_apache_royale_jewel_beads_controls_TextAlign__align == org.apache.royale.jewel.beads.controls.TextAlign.RIGHT)
      host.element.classList.add("alignTextRight");
    if (this.org_apache_royale_jewel_beads_controls_TextAlign__align == org.apache.royale.jewel.beads.controls.TextAlign.CENTER)
      host.element.classList.add("alignTextCenter");
  }
};


org.apache.royale.jewel.beads.controls.TextAlign.prototype.get__align = function() {
  return this.org_apache_royale_jewel_beads_controls_TextAlign__align;
};


org.apache.royale.jewel.beads.controls.TextAlign.prototype.set__align = function(value) {
  if (this.org_apache_royale_jewel_beads_controls_TextAlign__align !== value) {
    this.org_apache_royale_jewel_beads_controls_TextAlign_oldValue = this.org_apache_royale_jewel_beads_controls_TextAlign__align;
    this.org_apache_royale_jewel_beads_controls_TextAlign__align = value;
    this.org_apache_royale_jewel_beads_controls_TextAlign_updateHost();
  }
};


org.apache.royale.jewel.beads.controls.TextAlign.prototype.set__strand = function(value) {
  this.org_apache_royale_jewel_beads_controls_TextAlign__strand = value;
  this.org_apache_royale_jewel_beads_controls_TextAlign_updateHost();
};


Object.defineProperties(org.apache.royale.jewel.beads.controls.TextAlign.prototype, /** @lends {org.apache.royale.jewel.beads.controls.TextAlign.prototype} */ {
/**
  * @export
  * @type {string} */
align: {
get: org.apache.royale.jewel.beads.controls.TextAlign.prototype.get__align,
set: org.apache.royale.jewel.beads.controls.TextAlign.prototype.set__align},
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.jewel.beads.controls.TextAlign.prototype.set__strand}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.beads.controls.TextAlign.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'align': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.beads.controls.TextAlign'},
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.jewel.beads.controls.TextAlign'}
      };
    },
    methods: function () {
      return {
        'TextAlign': { type: '', declaredBy: 'org.apache.royale.jewel.beads.controls.TextAlign'}
      };
    }
  };
};