Creates a group element in the technology (SVG/VML/...) of this context. A group is meant to group other elements
together.

@param parent
parent group object
@param object
group object
969395
public void drawGroup(Object parent, Object object) {
		if (isAttached()) {
			helper.createOrUpdateGroup(parent, object, null, null);
		}
	}
942594
function(parentEl) {
      
      this.fieldset = inputEx.cn('fieldset');
      this.legend = inputEx.cn('legend', {className: 'inputEx-Group-legend'});
   
      // Option Collapsible
      if(this.options.collapsible) {
         var collapseImg = inputEx.cn('div', {className: 'inputEx-Group-collapseImg'}, null, ' ');
         this.legend.appendChild(collapseImg);
         inputEx.sn(this.fieldset,{className:'inputEx-Expanded'});
      }
   
      if(!lang.isUndefined(this.options.legend) && this.options.legend !== ''){
         this.legend.appendChild( inputEx.cn("span", null, null, " "+this.options.legend) );
      }
   
      if( this.options.collapsible || (!lang.isUndefined(this.options.legend) && this.options.legend !== '') ) {
         this.fieldset.appendChild(this.legend);
      }
  	   
      // Iterate this.createInput on input fields
      for (var i = 0 ; i < this.options.fields.length ; i++) {
         var fieldOptions = this.options.fields[i];
        
			// Throw Error if input is undefined
			if(!fieldOptions) {
				throw new Error("inputEx.Form: One of the provided fields is undefined ! (check trailing comma)");
			}
			
         // Render the field
			this.addField(fieldOptions);
  	   }
  	
  	   // Collapsed at creation ?
  	   if(this.options.collapsed) {
  	      this.toggleCollapse();
  	   }
  	
  	   // Append the fieldset
  	   parentEl.appendChild(this.fieldset);
   }
638418
private void setParentElement(Element parentElement) {
		synchronized(lock) {
			checkNotFrozen();
			if(this.parentElement != null) throw new IllegalStateException("parentElement already set");
			this.parentElement = parentElement;
		}
		assert checkPageAndParentElement();
	}
554388
public void deleteElement(Object parent, String name) {
		Element element = getElement(parent, name);
		if (element != null) {
			Element group = (Element) element.getParentElement();
			if (group != null) {
				deleteRecursively(group, element);
			}
		}
	}
254028
protected final void setParentNode(final DiffNode parentNode)
	{
		if (this.parentNode != null && this.parentNode != parentNode)
		{
			throw new IllegalStateException("The parent of a node cannot be changed, once it's set.");
		}
		this.parentNode = parentNode;
	}
1107265
function Group(options) {

	this.__proto__ = new Control();

	this.init = function(options) {
		this.type = options.type = 'Group';
		this.parent = options.parent;

		this.childopts = {};
		for (var o in options) {
			if ((o != 'childopts') && (o != 'type')) this.childopts[o] = options[o];
		}
		if (options.childopts) {
			for (var o in options.childopts) this.childopts[o] = options.childopts[o];
		}
		if (this.childopts.type == 'Group') this.childopts.type = 'Button';

		this.defaults = {
			x:48, y:48,
			w: this.childopts.w || 120,
			h: this.childopts.h || 48,

			value: 0,
			text: '',
			script: undefined,
			onload: undefined,
			fill: this.parent.fill,
			stroke: this.parent.stroke,
			'stroke-width': this.parent.control_stroke,
			fontsize: this.parent.fontsize,
			repeat: 0,
			running: 0,
			corner: this.parent.button_corner,
			subtype: undefined,
			group: undefined,
			row: undefined,
			col: undefined,
			autorun: undefined,
			highlighttrue: undefined,
			source: undefined,
			refresh: 0,

			noreadout: undefined,
			radio: undefined,
			//r: options.r || this.w/2,
			reversebits: undefined,
			numx: 1,
			numy: 3
		};
		this.fill_highlight = this.parent.lighter(this.stroke);
		this.setoptions(options);

		if (options.gutterx !== undefined) this.gutterx = options.gutterx;
		else if (options.gutter !== undefined) this.gutterx = options.gutter;
		else this.gutterx = 20;
		if (options.guttery !== undefined) this.guttery = options.guttery;
		else if (options.gutter !== undefined) this.guttery = options.gutter;
		else this.guttery = 20;

		this.nextstroke = 0;
		this.strokes = this.childopts.stroke || this.stroke;
		if (!(this.strokes instanceof Array)) this.strokes = [this.strokes];

		this.nextfill = 0;
		this.fills = this.childopts.fill || this.fill;
		if (!(this.fills instanceof Array)) this.fills = [this.fills];

		this.nexttext = 0;
		this.texts = this.childopts.text || this.text;
		if (!(this.texts instanceof Array)) this.texts = [this.texts];

		this.nextscript = 0;
		this.scripts = this.childopts.script || this.script;
		if (!(this.scripts instanceof Array)) this.scripts = [this.scripts];

		this.nextsource = 0;
		this.sources = this.childopts.source || this.source;
		if (!(this.sources instanceof Array)) this.sources = [this.sources];

		this.render();
		return this;
	};

	this.layout = function() {
		this.outerh = this.numy * (this.h + this.guttery) + this.guttery;
		if (this.childopts.type == 'Slider') {
			this.outerh += 3 * this.fontsize;
		}
	};

	this.render = function() {
		this.layout();

console.log('New group:', this);

		// bug: we don't have accurate this.w and this.h for path buttons here
		this.elt = this.parent.paper.rect(
			this.x - this.gutterx,
			this.y - this.guttery,
			this.numx * (this.w + this.gutterx) + this.gutterx,
			this.outerh, this.corner)
				.attr({fill:this.fill, stroke:this.stroke, 'stroke-width': this['stroke-width']});

		this.elts.push(this.elt);
		this.sethandlers();

		var x;
		var y = this.y;
		for (var row = 0; row < this.numy; row++) {
			x = this.x;
			for (var col=0; col< this.numx; col++) {
				var opts = {};
				for (var o in this.childopts) opts[o] = this.childopts[o];
				opts.id = this.itemid(row, col);
				opts.group = this.id;
				opts.x = x;
				opts.y = y;
				opts.row = row;
				opts.col = col;

				opts.stroke = this.strokes[this.nextstroke];
				if (++this.nextstroke >= this.strokes.length) this.nextstroke = 0;

				opts.fill = this.fills[this.nextfill];
				if (++this.nextfill >= this.fills.length) this.nextfill = 0;

				opts.text = this.texts[this.nexttext];
				if (++this.nexttext >= this.texts.length) this.nexttext = 0;

				opts.script = this.scripts[this.nextscript];
				if (++this.nextscript >= this.scripts.length) this.nextscript = 0;

				opts.source = this.sources[this.nextsource];
				if (++this.nextsource >= this.sources.length) this.nextsource = 0;

	console.log('Group add:', opts.type, opts);
				if (opts.type) this.parent.add([opts]);
				else this.parent.addButton(opts);
				x += (this.w + this.gutterx);
			}
			y += (this.h + this.guttery);
		}
	};

	this.itemid = function(row, col) {
		return  '' + this.id + '-' + row + '-' + col;
	};

	this.each = function(callback) {
		for (var row = 0; row < this.numy; row++) {
			for (var col = 0; col < this.numx; col++) {
				callback(this.parent.controls[this.itemid(row, col)]);
			}
		}
	};

	this.remove = function() {
		this.each(function(control) { control.parent.deletecontrol(control.id); });
		this.__proto__.remove.call(this);
	};

	this.attr = function(attrs) {
		this.each(function(control) { control.attr(attrs); });
		this.__proto__.attr.call(this);
	};

	// when a button in our group moves, it calls here to notify
	this.dragNotify = function(moved) {
		// calculate x,y of group from row, col of button[id]
		var newx = moved.x - moved.col * (this.w + this.gutterx);
		var newy = moved.y - moved.row * (this.h + this.guttery);
		console.log('dragNotify', moved, this.x, this.y, newx, newy);
		this.move(newx, newy);
	};

	this.move = function(newx, newy) {
		this.options.x = this.x = newx;
		this.options.y = this.y = newy;
		this.elt.attr({x:this.x - this.gutterx, y:this.y - this.guttery, width:this.w, height:this.h});

		var x;
		var y = this.y;
		for (var row = 0; row < this.numy; row++) {
			x = this.x;
			for (var col=0; col< this.numx; col++) {
				var control = this.parent.controls[this.itemid(row, col)];
				control.move(x, y);
				control.toFront();
				x += (this.w + this.gutterx);
			}
			y += (this.h + this.guttery);
		}
	};

	this.setValue = function(value) {
		console.log('Group setValue:', value);
		var bit = 0;
		this.value = value;
		if (typeof value == 'string') {
			for (var row = 0; row < this.numy; row++) {
				for (var col = 0; col < this.numx; col++) {
					var control = this.parent.controls[this.itemid(row, col)];
					if (this.value == control.text) control.highlight();
					else control.dehighlight();
				}
			}
		}
		else if (typeof value == 'number') {
			if (this.reversebits) {
				//console.log('reversing bits');
				for (var row = this.numy-1; row >= 0; row--) {
					for (var col = this.numx-1; col >= 0; col--) {
						var control = this.parent.controls[this.itemid(row, col)];
						var bitvalue = ((value & (1<<bit++)) !== 0) ? 1 : 0;
						if (bitvalue) control.highlight();
						else control.dehighlight();
					}
				}
			}
			else {
				for (var row = 0; row < this.numy; row++) {
					for (var col = 0; col < this.numx; col++) {
						var control = this.parent.controls[this.itemid(row, col)];
						var bitvalue = ((value & (1<<bit++)) !== 0) ? 1 : 0;
						if (bitvalue) control.highlight();
						else control.dehighlight();
					}
				}
			}
		}
		var update = {id: this.id, value: this.value};
		this.fire('update', update);
	};

	return this.init(options || {});
}
96691
@Override public final VH onCreateViewHolder(ViewGroup parent, int viewType) {
    VH viewHolder;
    if (isHeaderType(viewType)) {
      viewHolder = onCreateHeaderViewHolder(parent, viewType);
    } else if (isFooterType(viewType)) {
      viewHolder = onCreateFooterViewHolder(parent, viewType);
    } else {
      viewHolder = onCreateItemViewHolder(parent, viewType);
    }
    return viewHolder;
  }
1143646
private static void addChildNodes(ProductPartitionNode parentNode,
      ListMultimap<Long, AdGroupCriterion> parentIdMap) {
    if (parentIdMap.containsKey(parentNode.getProductPartitionId())) {
      parentNode = parentNode.asSubdivision();
    }
    for (AdGroupCriterion adGroupCriterion : parentIdMap.get(parentNode.getProductPartitionId())) {
      ProductPartition partition = (ProductPartition) adGroupCriterion.getCriterion();
      ProductPartitionNode childNode = parentNode.addChild(partition.getCaseValue());
      childNode = childNode.setProductPartitionId(partition.getId());
      if (ProductPartitionType.SUBDIVISION.equals(partition.getPartitionType())) {
        childNode = childNode.asSubdivision();
      } else {
        if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
          childNode = childNode.asBiddableUnit();
          BiddableAdGroupCriterion biddableAdGroupCriterion =
              (BiddableAdGroupCriterion) adGroupCriterion;
          Money cpcBidAmount = getBid(biddableAdGroupCriterion);
          if (cpcBidAmount != null) {
            childNode = childNode.setBid(cpcBidAmount.getMicroAmount());
          }
          childNode =
              childNode.setTrackingUrlTemplate(biddableAdGroupCriterion.getTrackingUrlTemplate());
          childNode = copyCustomParametersToNode(biddableAdGroupCriterion, childNode);
        } else {
          childNode = childNode.asExcludedUnit();
        }
      }
      addChildNodes(childNode, parentIdMap);
    }
  }
977804
function (parent) {
		var wrapper = this,
			renderer = wrapper.renderer,
			element = wrapper.element,
			box = renderer.box,
			inverted = parent && parent.inverted,

			// get the parent node
			parentNode = parent ?
				parent.element || parent :
				box;


		// if the parent group is inverted, apply inversion on all children
		if (inverted) { // only on groups
			renderer.invertChild(element, parentNode);
		}

		// append it
		parentNode.appendChild(element);

		// align text after adding to be able to read offset
		wrapper.added = true;
		if (wrapper.alignOnAdd && !wrapper.deferUpdateTransform) {
			wrapper.updateTransform();
		}

		// fire an event for internal hooks
		fireEvent(wrapper, 'add');

		return wrapper;
	}
571397
@SuppressWarnings("unchecked")
  public void setParent(PvmExecutionImpl parent) {
    PvmExecutionImpl currentParent = getParent();

    setParentExecution(parent);

    if (currentParent != null) {
      currentParent.getExecutions().remove(this);
    }

    if (parent != null) {
      ((List<PvmExecutionImpl>) parent.getExecutions()).add(this);
    }
  }
291168
public B group(EventLoopGroup group) {
        if (group == null) {
            throw new NullPointerException("group");
        }
        if (this.group != null) {
            throw new IllegalStateException("group set already");
        }
        this.group = group;
        return self();
    }
580048
private void createVNodes(VCompound parent,List<Glyph> glyphs)
    {
        for(Glyph glyph: glyphs )
        {
            if (!glyphClazzOneOf(glyph, GlyphClazz.UNIT_OF_INFORMATION, GlyphClazz.STATE_VARIABLE))
            {
//                if(glyph.getClazz().equals(GlyphClazz.PROCESS.getClazz()))
//                {
//                    VCompound v = new VCompound(glyph); //TODO: v is never used; wat's the idea?
//                }

                if(!isChildless(glyph))
                {
                    VCompound v = new VCompound(glyph);
                    idToGLyph.put(glyph.getId(), glyph);
                    glyphToVNode.put(glyph, v);
                    parent.children.add(v);
                    createVNodes(v, glyph.getGlyph());
                }
                else
                {
                    VNode v = new VNode(glyph);
                    idToGLyph.put(glyph.getId(), glyph);
                    glyphToVNode.put(glyph, v);
                    parent.children.add(v);
                }
            }
        }
    }
1317126
private void addChild(Session session, GroupImpl parent, GroupImpl child, boolean broadcast) throws Exception
   {
      Node parentNode = utils.getGroupNode(session, parent);
      Node groupNode =
         parentNode.addNode(child.getGroupName(), JCROrganizationServiceImpl.JOS_HIERARCHY_GROUP_NODETYPE);

      String parentId = parent == null ? null : parent.getId();

      child.setParentId(parentId);
      child.setInternalId(groupNode.getUUID());

      if (broadcast)
      {
         preSave(child, true);
      }

      writeGroup(child, groupNode);
      session.save();

      putInCache(child);

      if (broadcast)
      {
         postSave(child, true);
      }
   }
1152013
public void deleteGroup(Object object) {
		Element element = getGroup(object);
		if (element != null) {
			Element parent = (Element) element.getParentElement();
			if (parent != null) {
				deleteRecursively(parent, element);
			}
		}
	}
9789
protected void _createChildren(DocumentRootNode parentNode, SarlScript modelElement) {
		if (!Strings.isNullOrEmpty(modelElement.getPackage())) {
			// Create the node for the package declaration.
			createEStructuralFeatureNode(
					parentNode, modelElement,
					XtendPackage.Literals.XTEND_FILE__PACKAGE,
					this.imageDispatcher.invoke(getClass().getPackage()),
					// Do not use the text dispatcher below for avoiding to obtain
					// the filename of the script.
					modelElement.getPackage(),
					true);
		}
		// Create the nodes for the import declarations.
		/*if (modelElement.getImportSection() != null && !modelElement.getImportSection().getImportDeclarations().isEmpty()) {
			createNode(parentNode, modelElement.getImportSection());
		}*/
		// Create a node per type declaration.
		for (final XtendTypeDeclaration topElement : modelElement.getXtendTypes()) {
			createNode(parentNode, topElement);
		}
	}
310604
private void addAttributeGroup(XsdAttributeGroup attributeGroup) {
        String interfaceName = firstToUpper(attributeGroup.getName());

        if (!attributeGroupInterfaces.containsKey(interfaceName)){
            List<XsdAttribute> ownElements = attributeGroup.getXsdElements()
                    .filter(attribute -> attribute.getParent().equals(attributeGroup))
                    .map(attribute -> (XsdAttribute) attribute)
                    .collect(Collectors.toList());

            List<String> parentNames = attributeGroup.getAttributeGroups().stream().map(XsdNamedElements::getName).collect(Collectors.toList());
            AttributeHierarchyItem attributeHierarchyItemItem = new AttributeHierarchyItem(parentNames, ownElements);

            attributeGroupInterfaces.put(interfaceName, attributeHierarchyItemItem);

            attributeGroup.getAttributeGroups().forEach(this::addAttributeGroup);
        }
    }
271576
private Renderer createRenderer(T content, ViewGroup parent) {
    int prototypeIndex = getPrototypeIndex(content);
    Renderer renderer = getPrototypeByIndex(prototypeIndex).copy();
    renderer.onCreate(content, layoutInflater, parent);
    return renderer;
  }