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

goog.provide('org.apache.royale.jewel.debugger.ResponsiveSizeMonitor');

goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.jewel.Label');
goog.require('org.apache.royale.jewel.supportClasses.ResponsiveSizes');
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
 * @extends {org.apache.royale.jewel.Label}
 */
org.apache.royale.jewel.debugger.ResponsiveSizeMonitor = function() {
  org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.base(this, 'constructor');
  this.typeNames = "responsiveSizeMonitor";
  this.multiline = true;
  this.text = "ResponsiveSizeMonitor";
};
goog.inherits(org.apache.royale.jewel.debugger.ResponsiveSizeMonitor, org.apache.royale.jewel.Label);


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


/**
 * @export
 * @override
 */
org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.prototype.addedToParent = function() {
  org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.superClass_.addedToParent.apply(this);
  this.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_setUpListener();
};


/**
 * @private
 */
org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.prototype.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_setUpListener = function() {
  window.addEventListener('resize', org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_autoResizeHandler, this, 'autoResizeHandler'), false);
  this.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_autoResizeHandler();
};


/**
 * @private
 */
org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.prototype.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_removeListener = function() {
  window.removeEventListener('resize', org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_autoResizeHandler, this, 'autoResizeHandler'), false);
};


/**
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @private
 * @param {org.apache.royale.events.Event=} event
 */
org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.prototype.org_apache_royale_jewel_debugger_ResponsiveSizeMonitor_autoResizeHandler = function(event) {
  event = typeof event !== 'undefined' ? event : null;
  this.html = "<strong>Screen size (px):</strong> " + document.body.getBoundingClientRect().width + "x" + document.body.getBoundingClientRect().height + "</br>";
  this.html += "<strong>PHONE_BREAKPOINT: </strong> " + org.apache.royale.jewel.supportClasses.ResponsiveSizes.PHONE_BREAKPOINT + "</br>";
  this.html += "<strong>TABLET_BREAKPOINT:</strong> " + org.apache.royale.jewel.supportClasses.ResponsiveSizes.TABLET_BREAKPOINT + "</br>";
  this.html += "<strong>DESKTOP_BREAKPOINT:</strong> " + org.apache.royale.jewel.supportClasses.ResponsiveSizes.DESKTOP_BREAKPOINT + "</br>";
  this.html += "<strong>WIDESCREEN_BREAKPOINT:</strong> " + org.apache.royale.jewel.supportClasses.ResponsiveSizes.WIDESCREEN_BREAKPOINT + "</br>";
};


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.debugger.ResponsiveSizeMonitor.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'ResponsiveSizeMonitor': { type: '', declaredBy: 'org.apache.royale.jewel.debugger.ResponsiveSizeMonitor'},
        'addedToParent': { type: 'void', declaredBy: 'org.apache.royale.jewel.debugger.ResponsiveSizeMonitor'}
      };
    }
  };
};