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

goog.provide('org.apache.royale.html.beads.GetScrollbarWidth');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.core.IBead');



/**
 * @constructor
 * @implements {org.apache.royale.core.IBead}
 */
org.apache.royale.html.beads.GetScrollbarWidth = function() {
};


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


/**
 * @private
 * @type {number}
 */
org.apache.royale.html.beads.GetScrollbarWidth.prototype.org_apache_royale_html_beads_GetScrollbarWidth__scrollbarWidth;


org.apache.royale.html.beads.GetScrollbarWidth.prototype.set__strand = function(value) {
  var /** @type {org.apache.royale.core.WrappedHTMLElement} */ outerDiv = document.createElement("div");
  document.body.appendChild(outerDiv);
  outerDiv.style.overflow = "scroll";
  outerDiv.style.width = "50px";
  var /** @type {org.apache.royale.core.WrappedHTMLElement} */ innerDiv = document.createElement("div");
  innerDiv.style.width = "100%";
  outerDiv.appendChild(innerDiv);
  this.org_apache_royale_html_beads_GetScrollbarWidth__scrollbarWidth = outerDiv.offsetWidth - innerDiv.offsetWidth;
  document.body.removeChild(outerDiv);
};


org.apache.royale.html.beads.GetScrollbarWidth.prototype.get__scrollbarWidth = function() {
  return this.org_apache_royale_html_beads_GetScrollbarWidth__scrollbarWidth;
};


Object.defineProperties(org.apache.royale.html.beads.GetScrollbarWidth.prototype, /** @lends {org.apache.royale.html.beads.GetScrollbarWidth.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.GetScrollbarWidth.prototype.set__strand},
/**
  * @export
  * @type {number} */
scrollbarWidth: {
get: org.apache.royale.html.beads.GetScrollbarWidth.prototype.get__scrollbarWidth}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.GetScrollbarWidth.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.beads.GetScrollbarWidth'},
        'scrollbarWidth': { type: 'Number', access: 'readonly', declaredBy: 'org.apache.royale.html.beads.GetScrollbarWidth'}
      };
    },
    methods: function () {
      return {
        'GetScrollbarWidth': { type: '', declaredBy: 'org.apache.royale.html.beads.GetScrollbarWidth'}
      };
    }
  };
};