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

goog.provide('org.apache.royale.svg.beads.ImageView');

goog.require('org.apache.royale.core.ImageViewBase');
goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.core.ValuesManager');
goog.require('org.apache.royale.utils.Language');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.core.ImageViewBase}
 */
org.apache.royale.svg.beads.ImageView = function() {
  org.apache.royale.svg.beads.ImageView.base(this, 'constructor');
};
goog.inherits(org.apache.royale.svg.beads.ImageView, org.apache.royale.core.ImageViewBase);


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


/**
 * @protected
 * @override
 */
org.apache.royale.svg.beads.ImageView.prototype.sizeChangedHandler = function(event) {
  org.apache.royale.svg.beads.ImageView.superClass_.sizeChangedHandler.apply(this, [ event] );
  var /** @type {org.apache.royale.core.UIBase} */ host = org.apache.royale.utils.Language.as(this._strand, org.apache.royale.core.UIBase);
  var /** @type {*} */ left = org.apache.royale.core.ValuesManager["valuesImpl"].getValue(host, "left");
  var /** @type {*} */ right = org.apache.royale.core.ValuesManager["valuesImpl"].getValue(host, "right");
  var /** @type {number} */ l = Number(isNaN(left) ? NaN : left);
  var /** @type {number} */ r = Number(isNaN(right) ? NaN : right);
  var /** @type {*} */ top = org.apache.royale.core.ValuesManager["valuesImpl"].getValue(host, "top");
  var /** @type {*} */ bottom = org.apache.royale.core.ValuesManager["valuesImpl"].getValue(host, "bottom");
  var /** @type {number} */ t = Number(isNaN(top) ? NaN : top);
  var /** @type {number} */ b = Number(isNaN(bottom) ? NaN : bottom);
  var /** @type {Object} */ p = host.positioner;
  if (!isNaN(l) && !isNaN(r)) {
    var /** @type {number} */ computedWidth = org.apache.royale.utils.Language.as(host.positioner.offsetParent, HTMLElement).offsetWidth - l - r;
    p.setAttribute("width", computedWidth);
  }
  if (!isNaN(t) && !isNaN(b)) {
    var /** @type {number} */ computedHeight = org.apache.royale.utils.Language.as(host.positioner.offsetParent, HTMLElement).offsetHeight - t - b;
    p.setAttribute("height", computedHeight);
  }
};


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.svg.beads.ImageView.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'ImageView': { type: '', declaredBy: 'org.apache.royale.svg.beads.ImageView'}
      };
    }
  };
};