Used to initialize the View object on first use.
514628
def _initialize_rest(self):
        
        if self._submit_context is None:
            raise ValueError("View has not been created.")
        job = self._submit_context._job_access()
        self._view_object = job.get_views(name=self.name)[0]
174060
function View(attrs) {
  var view = this;
  if (typeof attrs !== 'undefined') {
    Object.keys(attrs).forEach(function (attr) {
      view[attr] = attrs[attr];
    });
  }
  if (typeof this.initialize === 'function')
    this.initialize();
}
849558
def _init_view(self):
        
        views_engine = get_config('rails.views.engine', 'jinja')
        templates_dir = os.path.join(self._project_dir, "views", "templates")
        self._view = View(views_engine, templates_dir)
890771
private void initialize() {
        this.setLayout(new GridBagLayout());
        if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
            this.setSize(375, 204);
        }
        this.setName(Constant.messages.getString("pscan.options.policy.title"));
    	JPanel passiveScannersFilterPanel = new TableFilterPanel<JXTable>(getTableTest());
        
        // 'Apply to' controls
        JPanel applyToPanel = new JPanel();
        applyToPanel.setLayout(new GridBagLayout());
        applyToPanel.add(new JLabel(Constant.messages.getString("pscan.options.policy.apply.label")), 
        		LayoutHelper.getGBC(0, 0, 1, 0.0, new Insets(2, 2, 2, 2)));
        applyToPanel.add(getApplyToThreshold(), LayoutHelper.getGBC(1, 0, 1, 0.0));
        applyToPanel.add(new JLabel(Constant.messages.getString("pscan.options.policy.thresholdTo.label")), 
        		LayoutHelper.getGBC(2, 0, 1, 0.0, new Insets(2, 2, 2, 2)));
        applyToPanel.add(getApplyToThresholdTarget(), LayoutHelper.getGBC(3, 0, 1, 0.0));
        applyToPanel.add(new JLabel(Constant.messages.getString("pscan.options.policy.rules.label")), LayoutHelper.getGBC(4, 0, 1, 0.0, new Insets(2, 2, 2, 2)));
        JButton applyThresholdButton = new JButton(Constant.messages.getString("pscan.options.policy.go.button"));
        applyThresholdButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				applyThreshold (strToThreshold((String)getApplyToThreshold().getSelectedItem()),
						(String)getApplyToThresholdTarget().getSelectedItem());
				getPassiveScanTableModel().fireTableDataChanged();
				
			}});
        applyToPanel.add(applyThresholdButton, LayoutHelper.getGBC(5, 0, 1, 0.0));
        applyToPanel.add(new JLabel(""), LayoutHelper.getGBC(6, 0, 1, 1.0));	// Spacer
        
        
        this.add(applyToPanel,
                LayoutHelper.getGBC(0, 0, 3, 0.0D, 0.0D, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0)));

        this.add(passiveScannersFilterPanel,LayoutHelper.getGBC(0, 1, 1, 1.0D, 0.0D,
                        GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, new Insets(0, 0, 0, 0)));

        this.add(getJScrollPane(), 
        		LayoutHelper.getGBC(0, 2, 1, 1.0, 1.0,
        				GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, new Insets(0, 0, 0, 0)));
    }
463578
@PostConstruct
    public void init() {
        if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
            configurationViews.add(defaultDistributionSetTypeLayout);
        }
        configurationViews.add(repositoryConfigurationView);
        configurationViews.add(rolloutConfigurationView);
        configurationViews.add(authenticationConfigurationView);
        configurationViews.add(pollingConfigurationView);
        if (customConfigurationViews != null) {
            configurationViews.addAll(
                    customConfigurationViews.stream().filter(ConfigurationGroup::show).collect(Collectors.toList()));
        }

        final Panel rootPanel = new Panel();
        rootPanel.setStyleName("tenantconfig-root");

        final VerticalLayout rootLayout = new VerticalLayout();
        rootLayout.setSizeFull();
        rootLayout.setMargin(true);
        rootLayout.setSpacing(true);

        configurationViews.forEach(rootLayout::addComponent);

        final HorizontalLayout buttonContent = saveConfigurationButtonsLayout();
        rootLayout.addComponent(buttonContent);
        rootLayout.setComponentAlignment(buttonContent, Alignment.BOTTOM_LEFT);
        rootPanel.setContent(rootLayout);
        setCompositionRoot(rootPanel);

        configurationViews.forEach(view -> view.addChangeListener(this));
    }
710601
protected void initFirstView() {
        isPrimaryStageView = true;
	    stage = GUIState.getStage();
        Scene scene = getView().getScene() != null ? getView().getScene() : new Scene(getView());
        stage.setScene(scene);
        GUIState.setScene(scene);
    }
928562
private void initVariables() {
		if (this.currentWindow == null) {
			this.currentWindow = new int[this.windowSize];
		}

		if (this.classDistributions == null) {
			this.classDistributions = new long[this.getModelContext().classAttribute().numValues()];
		}
	}
1023710
public function init() {

		parent::init();

		if( isset( $this->viewPath ) ) {

			$this->controller->setViewPath( $this->viewPath );
		}
	}
1097256
private void initializeViews() {
        buttonContainer = (LinearLayout) findViewById(R.id.button_container);

        selectButton = (Button) findViewById(R.id.select_button);
        selectButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (requestCode == Request.DIRECTORY) {
                    if (currentFile.isDirectory()) {
                        curDirectory = currentFile;
                        data = new Intent();
                        data.putExtra(FILE_EXTRA_DATA_PATH, currentFile.getAbsolutePath());
                        setResult(RESULT_OK, data);
                        finish();
                    } else {
                        Snackbar.make(getWindow().getDecorView(), R.string.file_picker_snackbar_select_directory_message, Snackbar.LENGTH_SHORT).show();
                    }
                } else { //request code is for a file
                    if (currentFile.isDirectory()) {
                        curDirectory = currentFile;
                        new UpdateFilesTask(FilePicker.this).execute(curDirectory);
                    } else {
                        if (!TextUtils.isEmpty(mimeType)) {
                            MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
                            String requiredExtension = "." + mimeTypeMap.getExtensionFromMimeType(mimeType);
                            if (requiredExtension.equalsIgnoreCase(fileExt(currentFile.toString()))) {
                                data = new Intent();
                                data.putExtra(FILE_EXTRA_DATA_PATH, currentFile.getAbsolutePath());
                                setResult(RESULT_OK, data);
                                finish();
                            } else {
                                Snackbar.make(getWindow().getDecorView(), String.format(getString(R.string.file_picker_snackbar_select_file_ext_message), requiredExtension), Snackbar.LENGTH_SHORT).show();
                            }
                        } else {
                            data = new Intent();
                            data.putExtra(FILE_EXTRA_DATA_PATH, currentFile.getAbsolutePath());
                            setResult(RESULT_OK, data);
                            finish();
                        }
                    }
                }
            }
        });

        openButton = (Button) findViewById(R.id.open_button);
        openButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (currentFile.isDirectory()) {
                    curDirectory = currentFile;
                    toolbar.setTitle(curDirectory.getName());
                    new UpdateFilesTask(FilePicker.this).execute(curDirectory);
                } else {
                    Intent newIntent = new Intent(Intent.ACTION_VIEW);
                    String file = currentFile.toString();
                    if (file != null) {
                        newIntent.setDataAndType(Uri.fromFile(currentFile), mimeType);
                        newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        try {
                            startActivity(newIntent);
                        } catch (ActivityNotFoundException e) {
                            Snackbar.make(getWindow().getDecorView(), R.string.file_picker_snackbar_no_file_type_handler, Snackbar.LENGTH_SHORT).show();
                        }
                    } else {
                        Snackbar.make(getWindow().getDecorView(), R.string.file_picker_snackbar_no_read_type, Snackbar.LENGTH_SHORT).show();
                    }

                }
            }
        });

        buttonContainer.setVisibility(View.INVISIBLE);
    }
217194
private void initialize() {
		cardLayout = new CardLayout();
        this.setLayout(cardLayout);
        this.setName("AlertView");

        if (! editable) {
        	this.add(getDefaultPane(), getDefaultPane().getName());
        }
        this.add(getAlertPane(), getAlertPane().getName());
			
	}
616038
protected void setFirstView() {
        final AbstractLmlView firstView = getCurrentView();
        if (firstView == null) {
            throw new GdxRuntimeException("No view marked as first. Unable to start application.");
        }
        setCurrentView(null);
        initiateView(firstView);
        setView(firstView, null);
    }
884815
public function init(): void
    {
        parent::init();

        if ($this->viewFile === null) {
            throw new InvalidConfigException('ContentDecorator::viewFile must be set.');
        }
        ob_start();
        ob_implicit_flush(false);
    }
725508
@PostConstruct
  public void initialize() {

    if (this.pojoDescriptorBuilderFactory == null) {
      this.pojoDescriptorBuilderFactory = PojoDescriptorBuilderFactoryImpl.getInstance();
    }
    if (this.pojoDescriptorBuilder == null) {
      this.pojoDescriptorBuilder = this.pojoDescriptorBuilderFactory.createPrivateFieldDescriptorBuilder();
    }
    this.descriptor = this.pojoDescriptorBuilder.getDescriptor(EntityTo.class);
  }
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;
        }
    }
628439
private void initView(){
        LinearLayout mProgressContainer = (LinearLayout) mLayout.findViewById(R.id.progress_container);

        int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, mLayout.getResources().getDisplayMetrics());
        mLayout.setPadding(padding, padding, padding, padding);

        // Based on configuration from Builder, construct the Layout
        switch (mProgressStyle){
            case HORIZONTAL:
                mProgress = new ProgressBar(mCtx, null, android.R.attr.progressBarStyleHorizontal);
                break;
            case SMALL:
                mIsIndeterminate = true;
                mProgressText.setVisibility(View.GONE);
                mProgressMax.setVisibility(View.GONE);
                mProgress = new ProgressBar(mCtx, null, android.R.attr.progressBarStyleSmall);
                break;
            case NORMAL:
                mIsIndeterminate = true;
                mProgressText.setVisibility(View.GONE);
                mProgressMax.setVisibility(View.GONE);
                mProgress = new ProgressBar(mCtx);
                break;
            case LARGE:
                mIsIndeterminate = true;
                mProgressText.setVisibility(View.GONE);
                mProgressMax.setVisibility(View.GONE);
                mProgress = new ProgressBar(mCtx, null, android.R.attr.progressBarStyleLarge);
                break;
        }

        // The ProgressBar parameters
        LinearLayout.LayoutParams progressParams;

        // Generate the message parameters
        int margin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, mCtx.getResources().getDisplayMetrics());
        LinearLayout.LayoutParams messageParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT);
        messageParams.weight = 1f;
        messageParams.gravity = Gravity.CENTER_VERTICAL;
        messageParams.setMargins(margin, 0, margin, 0);

        // Now based on the provided message content, change up hte LayoutParameters of the progresses
        if(mProgressStyle == HORIZONTAL){
            progressParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        }else{
            if(mMessage != null){
                progressParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            }else{
                progressParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            }
        }

        Log.d("ProgressStyle", "Setting ProgressBar LayoutParams(" + progressParams.width + "," + progressParams.height + ")");

        // Add the stylized progress bar to the layout
        mProgress.setLayoutParams(progressParams);
        mProgressContainer.addView(mProgress);

        // If the message isn't null, and it's not the progress style
        if(mMessage != null && mProgressStyle != HORIZONTAL){

            // Create and add the text view
            TextView message = new TextView(mCtx);
            message.setId(R.id.progress_mesage);
            FontLoader.applyTypeface(message, Types.ROBOTO_REGULAR);
            message.setText(mMessage);

            // Add this to the layout
            mProgressContainer.addView(message, messageParams);
        }

        // Now based on other attributes style the progressBar
        if(mProgressStyle == HORIZONTAL) {
            if (mIsIndeterminate) {
                Log.d(ProgressStyle.class.getName(), "Setting Indeterminate for Horizontal ProgressStyle");

                // Update the ProgressBar
                mProgress.setIndeterminate(true);

                // Hide the auxillary text
                mProgressText.setVisibility(View.GONE);
                mProgressMax.setVisibility(View.GONE);

            } else {
                Log.d(ProgressStyle.class.getName(), "Setting Progress for Horizontal ProgressStyle");

                // Only if the progress style is horizontal, should
                // we attempt to set the progress and max
                mProgress.setIndeterminate(false);
                setProgress(mInitProgress);
                setMax(mInitMax);

            }
        }
    }
1187439
private void initializeListView() {
    placesListView.setAdapter(placesAdapter);
    placesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
      @Override
      public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
        lastLoadedPlacePosition = position;
        showPlace(position);
      }
    });
  }
735834
@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
	
		super.onViewCreated(view, savedInstanceState);
		EventUtils.link(EVENT_CONFIGURATION);
	}