called to initialize a captured component, i.e. creating a Component instance from a VirtualElement
779879
function _create (state, vel) {
  let comp = vel._comp
  console.assert(!comp, 'Component instance should not exist when this method is used.')
  let parent = vel.parent._comp
  // making sure the parent components have been instantiated
  if (!parent) {
    parent = _create(state, vel.parent)
  }
  // TODO: probably we should do something with forwarded/forwarding components here?
  if (vel._isVirtualComponent) {
    console.assert(parent, 'A Component should have a parent.')
    comp = state.componentFactory.createComponent(vel.ComponentClass, parent, vel.props)
    // HACK: making sure that we have the right props
    // TODO: instead of HACK add an assertion, and make otherwise sure that vel.props is set correctly
    vel.props = comp.props
    if (vel._forwardedEl) {
      let forwardedEl = vel._forwardedEl
      let forwardedComp = state.componentFactory.createComponent(forwardedEl.ComponentClass, comp, forwardedEl.props)
      // HACK same as before
      forwardedEl.props = forwardedComp.props
      comp._forwardedComp = forwardedComp
    }
  } else if (vel._isVirtualHTMLElement) {
    comp = state.componentFactory.createElementComponent(parent, vel)
  } else if (vel._isVirtualTextNode) {
    comp = state.componentFactory.createTextNodeComponent(parent, vel)
  }
  if (vel._ref) {
    comp._ref = vel._ref
  }
  if (vel._owner) {
    comp._owner = vel._owner._comp
  }
  vel._comp = comp
  return comp
}
310620
@PostConstruct
    void init() {
        LOGGER.info("I'm being created: {}", this);
        setMargin(true);
        setSpacing(true);

        final Label label = new Label(String.format("This is a prototype scoped view. A new instance is created every time this view is shown. " +
                "This particular instance is <b>%s</b>. If you navigate away from this view and back, you'll notice that the instance changes every time.", this));
        label.setContentMode(ContentMode.HTML);
        addComponent(label);

        addComponent(new Button("Invoke a UI scoped business object", new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent event) {
                addComponent(new Label(uiScopedBusinessObject.sayHello()));
            }
        }));
    }
628370
@Override
    public void afterInitialized(BaseComponent comp) {
        super.afterInitialized(comp);
        PluginContainer container = comp.getAncestor(PluginContainer.class, true);
        plugin = (ElementPlugin) ElementUI.getAssociatedElement(container);
    }
23779
function () {
            var domElt = this.getDom();
            var content = (this._cfg.label && this._cfg.waiAria) ? aria.utils.Dom.getDomElementChild(domElt, 1) : aria.utils.Dom.getDomElementChild(domElt, 0);
            this._frame.linkToDom(content);
            this.$Container._init.call(this);
        }
927469
function elementCreate(name, overriddenRenderer) {
    var native;
    var rendererToUse = overriddenRenderer || renderer;
    if (isProceduralRenderer(rendererToUse)) {
        native = rendererToUse.createElement(name, _currentNamespace);
    }
    else {
        if (_currentNamespace === null) {
            native = rendererToUse.createElement(name);
        }
        else {
            native = rendererToUse.createElementNS(_currentNamespace, name);
        }
    }
    return native;
}
202713
function () {
        var Compo = $component ({ init: function () {} })
        var compo = new Compo ({ init: false })

        $assert (!compo.initialized.already)
        $assertEveryCalledOnce (function (mkay) {
            compo.initialized (function () { mkay () })
            compo.init () }) }
943788
private void initComponents() {
        setTitle("Validation Framework Test");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        // Create content pane
        String notForNimbus;
        if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
            notForNimbus = "";
        } else {
            notForNimbus = "related[]";
        }
        JPanel contentPane = new JPanel(new MigLayout("fill, wrap 2", "[]related[grow]", "[]20[]related[]" +
                notForNimbus + "related[]related[]unrelated[]"));
        setContentPane(contentPane);

        JLabel infoLabel = new JLabel("Fill in the fields with less than 10 characters.");
        infoLabel.setForeground(Color.GRAY);
        contentPane.add(infoLabel, "span 2");

        // Input fields
        contentPane.add(new JLabel("Sticker:"));
        textField1 = new JTextField();
        contentPane.add(textField1, "growx");
        contentPane.add(new JLabel("Foreground color:"));
        textField2 = new JTextField();
        contentPane.add(textField2, "growx");
        textField3 = new JTextField();
        if (!notForNimbus.isEmpty()) {
            // Changing the background color of a textfield with the Nimbus is not easy...
            contentPane.add(new JLabel("Background color:"));
            contentPane.add(textField3, "growx");
        }
        contentPane.add(new JLabel("Icon:"));
        textField4 = new JTextField();
        contentPane.add(textField4, "growx");
        contentPane.add(new JLabel("Icon with tooltip:"));
        textField5 = new JTextField();
        contentPane.add(textField5, "growx");

        // Apply button
        applyButton = new JButton("Apply");
        contentPane.add(applyButton, "skip 1, right aligned");

        // Set size
        pack();
        Dimension size = getSize();
        size.width += 100;
        setMinimumSize(size);

        // Set location
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setLocation((screenSize.width - size.width) / 2, (screenSize.height - size.height) / 3);
    }
650637
private void initComponents()//GEN-BEGIN:initComponents
    {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        lblEnabled = new javax.swing.JLabel();
        cbEnabled = new javax.swing.JCheckBox();
        lblDisabledByParent = new javax.swing.JLabel();
        cbDisabledByParent = new javax.swing.JCheckBox();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        lblSchemaName = new javax.swing.JLabel();
        tfSchemaName = new javax.swing.JTextField();

        setLayout(new java.awt.GridBagLayout());

        addComponentListener(new java.awt.event.ComponentAdapter()
        {
            public void componentShown(java.awt.event.ComponentEvent evt)
            {
                formComponentShown(evt);
            }
            public void componentHidden(java.awt.event.ComponentEvent evt)
            {
                formComponentHidden(evt);
            }
        });

        addHierarchyListener(new java.awt.event.HierarchyListener()
        {
            public void hierarchyChanged(java.awt.event.HierarchyEvent evt)
            {
                formHierarchyChanged(evt);
            }
        });

        jPanel1.setLayout(new java.awt.GridLayout(4, 2));

        lblEnabled.setText("enabled");
        lblEnabled.setDisplayedMnemonic('e');
        jPanel1.add(lblEnabled);

        cbEnabled.setMnemonic('e');
        cbEnabled.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                cbEnabledActionPerformed(evt);
            }
        });

        jPanel1.add(cbEnabled);

        lblDisabledByParent.setText("disabled by Parent:");
        jPanel1.add(lblDisabledByParent);

        cbDisabledByParent.setEnabled(false);
        cbDisabledByParent.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                cbDisabledByParentActionPerformed(evt);
            }
        });

        jPanel1.add(cbDisabledByParent);

        jPanel1.add(jLabel4);

        jPanel1.add(jLabel3);

        lblSchemaName.setText("Schema Name:");
        lblSchemaName.setLabelFor(tfSchemaName);
        jPanel1.add(lblSchemaName);

        tfSchemaName.setEditable(false);
        tfSchemaName.setText("jTextField1");
        tfSchemaName.setBorder(null);
        jPanel1.add(tfSchemaName);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        add(jPanel1, gridBagConstraints);

    }
575497
protected void initObject() {

        Object o;

        if (CmsStringUtil.isEmpty(getParamAction()) || CmsDialog.DIALOG_INITIAL.equals(getParamAction())) {
            // this is the initial dialog call
            o = new ArrayList();
            ((List)o).add("/");
        } else {
            // this is not the initial call, get module from session
            o = getDialogObject();
        }

        if (!(o instanceof List)) {
            m_resources = new ArrayList();
            m_resources.add("/");
        } else {
            // reuse object stored in session
            m_resources = (List)o;
        }
    }
1339530
private void initialize() {
    this.setSize(300, 200);
    this.setTitle("Connect");
    this.setContentPane(getJContentPane());
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter() {
      public void windowClosed(WindowEvent e) {
        cancelTimeout();
      }
    });

    Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
      public void eventDispatched(AWTEvent e) {
        if ((e instanceof KeyEvent && ((KeyEvent) e).getID() == KeyEvent.KEY_PRESSED)
            || (e instanceof MouseEvent && ((MouseEvent) e).getID() == MouseEvent.MOUSE_PRESSED)) {
          if (ConnectionDialog.this.isAncestorOf(((ComponentEvent) e).getComponent())) {
            cancelTimeout();
          }
        }
      }
    }, AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
    restore();
  }
299124
@Override
    public void afterInitialized(BaseComponent comp) {
        super.afterInitialized(comp);
        propertyGrid = PropertyGrid.create(null, comp, true);
        getPlugin().registerProperties(this, "provider", "group");
    }
631703
function createViewModel(initialData, hasDataBinding, bindingState) {

			if(bindingState && bindingState.isSettingOnViewModel === true) {
				// If we are setting a value like `x:from="y"`,
				// we need to make a variable scope.
				newScope = tagData.scope.addLetContext(initialData);
				return newScope._context;

			} else {
				// If we are setting the ViewModel itself, we
				// stick the value in an observable: `this:from="value"`.
				return vm = new SimpleObservable(initialData);
			}
		}
1183033
@Override
    public void afterInitialized(BaseComponent comp) {
        super.afterInitialized(comp);
        window = (Window) comp;
        sessionId = (String) comp.getAttribute("id");
        lstParticipants.setRenderer(new ParticipantRenderer(chatService.getSelf(), null));
        model.add(chatService.getSelf());
        lstParticipants.setModel(model);
        clearMessage();
        
        if (comp.getAttribute("originator") != null) {
            invite((result) -> {
                if (!result) {
                    close();
                } else {
                    initSession();
                }
            });
        }
985943
function initialize() {
    var getRenderer = require( config.getRenderer ?
      path.join( './../../../', config.getRenderer ) :
      markedRenderer
    );
    var renderer = getRenderer( marked );
    filingCabinet = new FilingCabinet( config );

    readControls(
      config.controls,
      filingCabinet
    );
    readReferences(
      config.components,
      config.referenceFile,
      filingCabinet
    );
    readComponents(
      config.components,
      config.referenceFile,
      config.localeFile,
      config.layoutSegment,
      config.contentSegment,
      filingCabinet,
      renderer
    );
    readContents(
      config.contents,
      config.submenuFile,
      filingCabinet,
      renderer
    );

    logger.showInfo( '*** Validating elements...' );
    filingCabinet.finalize();
    logger.showInfo( '*** Content manager is initialized.' );

    contextFactory = new ContextFactory( config, filingCabinet );
  }
941505
@Override
	protected void onInitializeComponents()
	{
		lpNoProxy = new JLayeredPane();
		lpNoProxy.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));

		lpHostOrIpaddress = new JLayeredPane();
		lpHostOrIpaddress.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));

		rdbtnManualProxyConfiguration = new JRadioButton("Manual proxy configuration");
		rdbtnManualProxyConfiguration.setBounds(6, 7, 313, 23);
		lpHostOrIpaddress.add(rdbtnManualProxyConfiguration);

		lblHostOrIpaddress = new JLabel("Host or IP-address:");
		lblHostOrIpaddress.setBounds(26, 37, 109, 14);
		lpHostOrIpaddress.add(lblHostOrIpaddress);

		txtHostOrIpaddress = new JTextField();
		txtHostOrIpaddress.setBounds(145, 37, 213, 20);
		lpHostOrIpaddress.add(txtHostOrIpaddress);
		txtHostOrIpaddress.setColumns(10);

		lblPort = new JLabel("Port:");
		lblPort.setBounds(368, 40, 46, 14);
		lpHostOrIpaddress.add(lblPort);

		txtPort = new JTextField();
		txtPort.setBounds(408, 37, 67, 20);
		lpHostOrIpaddress.add(txtPort);
		txtPort.setColumns(10);

		rdbtnNoProxy = new JRadioButton("Direct connection to internet (no proxy)");
		rdbtnNoProxy.setBounds(6, 7, 305, 23);

		lpNoProxy.add(rdbtnNoProxy);

		lpUseSystemSettings = new JLayeredPane();
		lpUseSystemSettings.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));

		rdbtnUseSystemSettings = new JRadioButton("Use proxy settings from system");
		rdbtnUseSystemSettings.setBounds(6, 7, 305, 23);
		lpUseSystemSettings.add(rdbtnUseSystemSettings);

		// Group the radio buttons.
		btngrpProxySettings = new ButtonGroup();
		btngrpProxySettings.add(rdbtnNoProxy);
		btngrpProxySettings.add(rdbtnManualProxyConfiguration);

		chckbxSocksProxy = new JCheckBox("SOCKS-Proxy?");
		chckbxSocksProxy.setToolTipText("Is it a SOCKS-Proxy?");
		chckbxSocksProxy.setBounds(26, 63, 97, 23);
		lpHostOrIpaddress.add(chckbxSocksProxy);
		btngrpProxySettings.add(rdbtnUseSystemSettings);
	}
814656
@JsIgnore
  public static void initWithoutVueLib() {
    if (!isVueLibInjected()) {
      throw new RuntimeException(
          "Couldn't find Vue.js on init. Either include it Vue.js in your index.html or call VueGWT.init() instead of initWithoutVueLib.");
    }

    // Register custom observers for Collection and Maps
    VueGWTObserverManager.get().registerVueGWTObserver(new CollectionObserver());
    VueGWTObserverManager.get().registerVueGWTObserver(new MapObserver());

    isReady = true;

    // Call on ready callbacks
    for (Runnable onReadyCbk : onReadyCallbacks) {
      onReadyCbk.run();
    }
    onReadyCallbacks.clear();
  }
983089
private void initEngine() {
    engine = (NashornScriptEngine) new ScriptEngineManager().getEngineByName("nashorn");

    try {
      engine.eval("(function(global){global.global = global})(this);");
      engine.eval(NashornVueTemplateCompiler.NASHORN_VUE_TEMPLATE_COMPILER);
    } catch (ScriptException e) {
      e.printStackTrace();
    }
  }