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

goog.provide('org.apache.royale.core.FilledRectangle');

goog.require('org.apache.royale.core.UIBase');



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


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


/**
 * @private
 * @type {number}
 */
org.apache.royale.core.FilledRectangle.prototype.org_apache_royale_core_FilledRectangle__fillColor = 0x000000;


/**
 *  @asprivate 
 * @export
 * @override
 */
org.apache.royale.core.FilledRectangle.prototype.addedToParent = function() {
  org.apache.royale.core.FilledRectangle.superClass_.addedToParent.apply(this);
  this.drawRect(0, 0, this.width, this.height);
};


/**
 *  Draw the rectangle.
 *  @asparam x The x position of the top-left corner of the rectangle.
 *  @asparam y The y position of the top-left corner.
 *  @asparam width The width of the rectangle.
 *  @asparam height The height of the rectangle.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @param {number} x
 * @param {number} y
 * @param {number} width
 * @param {number} height
 */
org.apache.royale.core.FilledRectangle.prototype.drawRect = function(x, y, width, height) {
  
  this.element.style.position = 'absolute';
  this.element.style.backgroundColor = '#' + this.org_apache_royale_core_FilledRectangle__fillColor.toString(16);
  if (!isNaN(x))
    this.x = x;
  if (!isNaN(y))
    this.y = y;
  if (!isNaN(width))
    this.width = width;
  if (!isNaN(height))
    this.height = height;
};


org.apache.royale.core.FilledRectangle.prototype.get__fillColor = function() {
  return this.org_apache_royale_core_FilledRectangle__fillColor;
};


org.apache.royale.core.FilledRectangle.prototype.set__fillColor = function(value) {
  this.org_apache_royale_core_FilledRectangle__fillColor = value;
};


Object.defineProperties(org.apache.royale.core.FilledRectangle.prototype, /** @lends {org.apache.royale.core.FilledRectangle.prototype} */ {
/**
  * @export
  * @type {number} */
fillColor: {
get: org.apache.royale.core.FilledRectangle.prototype.get__fillColor,
set: org.apache.royale.core.FilledRectangle.prototype.set__fillColor}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.core.FilledRectangle.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'fillColor': { type: 'uint', access: 'readwrite', declaredBy: 'org.apache.royale.core.FilledRectangle'}
      };
    },
    methods: function () {
      return {
        'FilledRectangle': { type: '', declaredBy: 'org.apache.royale.core.FilledRectangle'},
        'addedToParent': { type: 'void', declaredBy: 'org.apache.royale.core.FilledRectangle'},
        'drawRect': { type: 'void', declaredBy: 'org.apache.royale.core.FilledRectangle', parameters: function () { return [  { index: 1, type: 'Number', optional: false },{ index: 2, type: 'Number', optional: false },{ index: 3, type: 'Number', optional: false },{ index: 4, type: 'Number', optional: false } ]; }}
      };
    }
  };
};