Adds a new component to the model, and an editor for this component to this editor
488757
def addComponentEditor(self):
        """"""
        row = self._model.rowCount()

        comp_stack_editor = ExploreComponentEditor()
        self.ui.trackStack.addWidget(comp_stack_editor)

        idx_button = IndexButton(row)
        idx_button.pickMe.connect(self.ui.trackStack.setCurrentIndex)
        self.trackBtnGroup.addButton(idx_button)
        self.ui.trackBtnLayout.addWidget(idx_button)
        self.ui.trackStack.setCurrentIndex(row)

        comp_stack_editor.closePlease.connect(self.removeComponentEditor)

        delay = Silence()
        comp_stack_editor.delaySpnbx.setValue(delay.duration())
        self._model.insertComponent(delay, row,0)

        self._allComponents.append([x() for x in self.stimuli_types if x.explore])
        for stim in self._allComponents[row]:
            editor = wrapComponent(stim).showEditor()
            comp_stack_editor.addWidget(editor, stim.name)

        exvocal = comp_stack_editor.widgetForName("Vocalization")
        if exvocal is not None:
            exvocal.filelistView.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)

        initcomp = self._allComponents[row][0]
        self._model.insertComponent(initcomp, row, 1)

        self.buttons.append(idx_button)

        comp_stack_editor.exploreStimTypeCmbbx.currentIndexChanged.connect(lambda x : self.setStimIndex(row, x))
        comp_stack_editor.delaySpnbx.valueChanged.connect(lambda x : self.setDelay(row, x))
        comp_stack_editor.valueChanged.connect(self.valueChanged.emit)
        return comp_stack_editor
464644
public synchronized void addComponent(ComponentEvent event)
    {
        try
        {
            if(log.isDebugEnabled())log.debug("Component added "+event);
            Object o=event.getComponent();
            
            ModelMBean mbean=ModelMBeanImpl.mbeanFor(o);
            if (mbean==null)
                log.warn("No MBean for "+o);
            else
            {
                ObjectName oName=null;
                if (mbean instanceof ModelMBeanImpl)
                {
                    ((ModelMBeanImpl)mbean).setBaseObjectName(getObjectName().toString());
                    oName=
                        getMBeanServer().registerMBean(mbean,null).getObjectName();
                }
                else
                {
                    oName=uniqueObjectName(getMBeanServer(),
                                           o,
                                           getObjectName().toString());
                    oName=getMBeanServer().registerMBean(mbean,oName)
                        .getObjectName();
                }
                Holder holder = new Holder(oName,mbean);
                _mbeanMap.put(o,holder);
            }
        }
        catch(Exception e)
        {
            log.warn(LogSupport.EXCEPTION,e);
        }
    }
909345
protected Component createCustomEditor() {
		JPanel			panel;

		panel = new JPanel(new BorderLayout());
		panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
		m_EditComponent = (ClassOptionEditComponent) getEditComponent((ClassOption) getValue());
		m_EditComponent.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent e) {
				m_EditComponent.applyState();
				setValue(m_EditComponent.getEditedOption());
			}
		});
		panel.add(m_EditComponent, BorderLayout.CENTER);

		return panel;
	}
514434
public void init() {
        OptionsParam options = Model.getSingleton().getOptionsParam();
        mainFrame = new MainFrame(options, getRequestPanel(), getResponsePanel());
        mainFrame.getWorkbench().addPanel(View.getSingleton().getSiteTreePanel(), WorkbenchPanel.PanelType.SELECT);

        // Install default editor and renderer for TextMessageLocationHighlight
        MessageLocationHighlightRenderersEditors.getInstance().addEditor(
                TextMessageLocationHighlight.class,
                new TextMessageLocationHighlightEditor());
        MessageLocationHighlightRenderersEditors.getInstance().addRenderer(
                TextMessageLocationHighlight.class,
                new TextMessageLocationHighlightRenderer());
        
        String statusString;
        for(Status status : AddOn.Status.values()) {     	
        	// Handle the case AddOn.Status gets out of sync with cfu.status i18n entries
        	String i18nKey = "cfu.status." + status.toString();
        	if (Constant.messages.containsKey(i18nKey)) {
        		statusString = Constant.messages.getString(i18nKey);
        	} else {
        		statusString = status.toString();
        	}
        	statusMap.put(status, new StatusUI(status, statusString));
        }
    }
169271
function(model, options) {
            model = this._prepareModel(model, options);
            this.add(model, options);
            return model;
        }
861471
def add_component_info(self, compinfo):
        
        if self.components is None:
            self.components = {}
        self.components[compinfo.comp_key] = compinfo
91965
function( buttonName, buttonLabel, commandName, commandExec )
			{
				editor.addCommand( commandName, new CKEDITOR.command( editor, { exec : commandExec }) );

				editor.ui.addButton( buttonName,
					{
						label : buttonLabel,
						command : commandName
					});
			}
1083632
function() {
      var t = this,
          val = t.editor.val();
      if (val) {
        try {
          // Throw away parse errors while typing
          t.model.set(JSON.parse(val));
        } catch (e) {
          return false;
        }
      } else {
        // Confirm deletion if user removes everything in the JSON window
        if (window.confirm('Are you sure you want to remove this component?')) {
          t.pageView.model.get('components').remove(t.model);
          $('#nm-cv-settings').modal('hide');
        } else {
          // Reset source data
          t.fillSourceData();
        }
      }
      return true;
    }
1099582
protected function on_created()
    {
        foreach( $this->model['components'] as $args )
        {
            $this->components[$args['name']] = $this->create_component($args);
        }
    }
248090
private void addComponent(final WComponent component) {
		collapsibleList.add(component);
		MemoryUtil.checkSize(collapsibleList.size(), this.getClass().getSimpleName());
	}
314571
def setComponents(self, components):
        
        layout = self.layout()
        for comp in components:
            attrWidget = ComponentAttributerChecker(comp)
            layout.addWidget(attrWidget)
603477
void add(final WComponent component) {
		assertAddSupported(component);
		assertNotReparenting(component);

		if (!(this instanceof Container)) {
			throw new UnsupportedOperationException("Components can only be added to a container");
		}

		ComponentModel model = getOrCreateComponentModel();

		if (model.getChildren() == null) {
			model.setChildren(new ArrayList<WComponent>(1));
		}

		model.getChildren().add(component);

		if (isLocked()) {
			component.setLocked(true);
		}

		if (component instanceof AbstractWComponent) {
			((AbstractWComponent) component).getOrCreateComponentModel().setParent((Container) this);
			((AbstractWComponent) component).addNotify();
		}
	}
5466
function(model) {
      var t = this,
          componentView = new ComponentView({model: model});
      componentView.$el
        .addClass('nm-pv-component')
        .data('view', componentView);
      componentView.render();
      t.canvas.append(componentView.$el);
      t.componentViews[model.get('id')] = componentView;
    }
170309
public void addToToolbar( JComponent comp ) {
		toolbar.add(comp,1+algBoxes.length);
		toolbar.revalidate();
		addedComponents.add(comp);
	}
1505
def setModelData(self, editor, model, index):
        
        value = editor.currentText()
        model.setData(index, wrapVariant(value))
401795
@Override
	public void add(final WComponent component) {
		getCardContainer().add(component);
		CardManagerModel model = getComponentModel();

		if (model.visibleComponent == null) {
			model.visibleComponent = component;
		}
	}
956486
function addAvailableComponents(req, res, next) {
  res.locals.components = files.getComponents();
  next();
}