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

goog.provide('org.apache.royale.svg.GraphicContainer');
goog.provide('org.apache.royale.svg.GraphicContainer.GraphicGroup');

goog.require('org.apache.royale.core.GroupBase');
goog.require('org.apache.royale.core.IChild');
goog.require('org.apache.royale.core.ValuesManager');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.ValueEvent');
goog.require('org.apache.royale.utils.MXMLDataInterpreter');
goog.require('org.apache.royale.core.IMXMLDocument');
goog.require('org.apache.royale.core.ITransformHost');



/**
 * @constructor
 * @extends {org.apache.royale.core.GroupBase}
 * @implements {org.apache.royale.core.ITransformHost}
 * @implements {org.apache.royale.core.IMXMLDocument}
 */
org.apache.royale.svg.GraphicContainer = function() {
  
  this.org_apache_royale_svg_GraphicContainer__mxmlDocument = this;
  org.apache.royale.svg.GraphicContainer.base(this, 'constructor');
};
goog.inherits(org.apache.royale.svg.GraphicContainer, org.apache.royale.core.GroupBase);


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


/**
 * @private
 * @type {org.apache.royale.core.GroupBase}
 */
org.apache.royale.svg.GraphicContainer.prototype.org_apache_royale_svg_GraphicContainer_graphicGroup;


/**
 * @private
 * @type {Array}
 */
org.apache.royale.svg.GraphicContainer.prototype.org_apache_royale_svg_GraphicContainer__mxmlDescriptor;


/**
 * @private
 * @type {Object}
 */
org.apache.royale.svg.GraphicContainer.prototype.org_apache_royale_svg_GraphicContainer__mxmlDocument;


/**
 * @private
 * @type {boolean}
 */
org.apache.royale.svg.GraphicContainer.prototype.org_apache_royale_svg_GraphicContainer__initialized;


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @protected
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.createElement = function() {
  this.element = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
  this.org_apache_royale_svg_GraphicContainer_graphicGroup = new org.apache.royale.svg.GraphicContainer.GraphicGroup();
  org.apache.royale.svg.GraphicContainer.superClass_.addElement.apply(this, [ this.org_apache_royale_svg_GraphicContainer_graphicGroup] );
  return this.element;
};


/**
 * @protected
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.setClassName = function(value) {
  this.element.setAttribute('class', value);
};


/**
 *  @copy org.apache.royale.core.IParent#getElementAt()
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.getElementAt = function(index) {
  return this.org_apache_royale_svg_GraphicContainer_graphicGroup.getElementAt(index);
};


/**
 *  @copy org.apache.royale.core.IParent#addElement()
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.addElement = function(c, dispatchEvent) {
  dispatchEvent = typeof dispatchEvent !== 'undefined' ? dispatchEvent : true;
  this.org_apache_royale_svg_GraphicContainer_graphicGroup.addElement(c, dispatchEvent);
  if (dispatchEvent)
    this.dispatchEvent(new org.apache.royale.events.ValueEvent("childrenAdded", c));
};


/**
 *  @copy org.apache.royale.core.IParent#addElementAt()
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.addElementAt = function(c, index, dispatchEvent) {
  dispatchEvent = typeof dispatchEvent !== 'undefined' ? dispatchEvent : true;
  this.org_apache_royale_svg_GraphicContainer_graphicGroup.addElementAt(c, index, dispatchEvent);
  if (dispatchEvent)
    this.dispatchEvent(new org.apache.royale.events.ValueEvent("childrenAdded", c));
};


/**
 *  @copy org.apache.royale.core.IParent#removeElement()
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.removeElement = function(c, dispatchEvent) {
  dispatchEvent = typeof dispatchEvent !== 'undefined' ? dispatchEvent : true;
  this.org_apache_royale_svg_GraphicContainer_graphicGroup.removeElement(c, dispatchEvent);
  if (dispatchEvent)
    this.dispatchEvent(new org.apache.royale.events.ValueEvent("childrenRemoved", c));
};


/**
 *  @copy org.apache.royale.core.IParent#getElementIndex()
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.getElementIndex = function(c) {
  return this.org_apache_royale_svg_GraphicContainer_graphicGroup.getElementIndex(c);
};


/**
 *  @asprivate
 * @export
 * @param {Object} document
 * @param {Array} value
 */
org.apache.royale.svg.GraphicContainer.prototype.setMXMLDescriptor = function(document, value) {
  this.org_apache_royale_svg_GraphicContainer__mxmlDocument = document;
  this.org_apache_royale_svg_GraphicContainer__mxmlDescriptor = value;
};


/**
 * @asprivate
 * @export
 * @override
 */
org.apache.royale.svg.GraphicContainer.prototype.addedToParent = function() {
  if (!this.org_apache_royale_svg_GraphicContainer__initialized) {
    org.apache.royale.core.ValuesManager["valuesImpl"].init(this);
  }
  org.apache.royale.svg.GraphicContainer.superClass_.addedToParent.apply(this);
  if (!this.org_apache_royale_svg_GraphicContainer__initialized) {
    org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances(this.org_apache_royale_svg_GraphicContainer__mxmlDocument, this, this.MXMLDescriptor);
    this.dispatchEvent(new org.apache.royale.events.Event("initBindings"));
    this.dispatchEvent(new org.apache.royale.events.Event("initComplete"));
    this.org_apache_royale_svg_GraphicContainer__initialized = true;
  }
};


/**
 *  @copy org.apache.royale.core.Application#generateMXMLAttributes()
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @export
 * @param {Array} data
 */
org.apache.royale.svg.GraphicContainer.prototype.generateMXMLAttributes = function(data) {
  org.apache.royale.utils.MXMLDataInterpreter.generateMXMLProperties(this, data);
};


/**
 * @export
 * @type {Array}
 */
org.apache.royale.svg.GraphicContainer.prototype.mxmlContent;


org.apache.royale.svg.GraphicContainer.prototype.get__transformElement = function() {
  return this.org_apache_royale_svg_GraphicContainer_graphicGroup.element;
};


org.apache.royale.svg.GraphicContainer.prototype.get__numElements = function() {
  return this.org_apache_royale_svg_GraphicContainer_graphicGroup.numElements;
};


org.apache.royale.svg.GraphicContainer.prototype.set__x = function(value) {
  org.apache.royale.svg.GraphicContainer.superClass_.set__x.apply(this, [ value] );
  this.element.setAttribute("x", value);
};


org.apache.royale.svg.GraphicContainer.prototype.set__y = function(value) {
  org.apache.royale.svg.GraphicContainer.superClass_.set__y.apply(this, [ value] );
  this.element.setAttribute("y", value);
};


org.apache.royale.svg.GraphicContainer.prototype.get__MXMLDescriptor = function() {
  return this.org_apache_royale_svg_GraphicContainer__mxmlDescriptor;
};


Object.defineProperties(org.apache.royale.svg.GraphicContainer.prototype, /** @lends {org.apache.royale.svg.GraphicContainer.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.WrappedHTMLElement} */
transformElement: {
get: org.apache.royale.svg.GraphicContainer.prototype.get__transformElement},
/**
  * @export
  * @type {number} */
numElements: {
get: org.apache.royale.svg.GraphicContainer.prototype.get__numElements},
/**
  * @export
  * @type {number} */
x: {
get: org.apache.royale.core.UIBase.prototype.get__x,
set: org.apache.royale.svg.GraphicContainer.prototype.set__x},
/**
  * @export
  * @type {number} */
y: {
get: org.apache.royale.core.UIBase.prototype.get__y,
set: org.apache.royale.svg.GraphicContainer.prototype.set__y},
/**
  * @export
  * @type {Array} */
MXMLDescriptor: {
get: org.apache.royale.svg.GraphicContainer.prototype.get__MXMLDescriptor}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.svg.GraphicContainer.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {
      return {
        'mxmlContent': { type: 'Array'}
      };
    },
    accessors: function () {
      return {
        'transformElement': { type: 'org.apache.royale.core.WrappedHTMLElement', access: 'readonly', declaredBy: 'org.apache.royale.svg.GraphicContainer'},
        'numElements': { type: 'int', access: 'readonly', declaredBy: 'org.apache.royale.svg.GraphicContainer'},
        'x': { type: 'Number', access: 'writeonly', declaredBy: 'org.apache.royale.svg.GraphicContainer'},
        'y': { type: 'Number', access: 'writeonly', declaredBy: 'org.apache.royale.svg.GraphicContainer'},
        'MXMLDescriptor': { type: 'Array', access: 'readonly', declaredBy: 'org.apache.royale.svg.GraphicContainer'}
      };
    },
    methods: function () {
      return {
        'GraphicContainer': { type: '', declaredBy: 'org.apache.royale.svg.GraphicContainer'},
        'getElementAt': { type: 'org.apache.royale.core.IChild', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'int', optional: false } ]; }},
        'addElement': { type: 'void', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'org.apache.royale.core.IChild', optional: false },{ index: 2, type: 'Boolean', optional: true } ]; }},
        'addElementAt': { type: 'void', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'org.apache.royale.core.IChild', optional: false },{ index: 2, type: 'int', optional: false },{ index: 3, type: 'Boolean', optional: true } ]; }},
        'removeElement': { type: 'void', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'org.apache.royale.core.IChild', optional: false },{ index: 2, type: 'Boolean', optional: true } ]; }},
        'getElementIndex': { type: 'int', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'org.apache.royale.core.IChild', optional: false } ]; }},
        'setMXMLDescriptor': { type: 'void', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'Object', optional: false },{ index: 2, type: 'Array', optional: false } ]; }},
        'addedToParent': { type: 'void', declaredBy: 'org.apache.royale.svg.GraphicContainer'},
        'generateMXMLAttributes': { type: 'void', declaredBy: 'org.apache.royale.svg.GraphicContainer', parameters: function () { return [  { index: 1, type: 'Array', optional: false } ]; }}
      };
    },
    metadata: function () { return [  ]; }
  };
};



/**
 * @constructor
 * @extends {org.apache.royale.core.GroupBase}
 */
org.apache.royale.svg.GraphicContainer.GraphicGroup = function() {
  org.apache.royale.svg.GraphicContainer.GraphicGroup.base(this, 'constructor');
};
goog.inherits(org.apache.royale.svg.GraphicContainer.GraphicGroup, org.apache.royale.core.GroupBase);


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


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @protected
 * @override
 */
org.apache.royale.svg.GraphicContainer.GraphicGroup.prototype.createElement = function() {
  this.element = document.createElementNS('http://www.w3.org/2000/svg', 'g');
  return this.element;
};


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



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