Initializes the listener, which should be notified, when the selection of a list item of the
dialog has been changed.
195001
private void initializeSelectionListener() {
        ChoiceMode choiceMode = adapter.getChoiceMode();

        if (choiceMode instanceof MultipleChoiceMode) {
            adapter.setOnItemClickListener(
                    new OnMultiChoiceClickListenerWrapper(multiChoiceListener, getDialog(), 0));
        } else if (choiceMode instanceof SingleChoiceMode) {
            adapter.setOnItemClickListener(
                    new OnItemClickListenerWrapper(singleChoiceListener, getDialog(), 0));
        } else {
            adapter.setOnItemClickListener(
                    new OnItemClickListenerWrapper(singleChoiceListener, getDialog(),
                            DialogInterface.BUTTON_POSITIVE));
        }
    }
931132
def init_widget(self):
        
        super(AndroidListView, self).init_widget()
        d = self.declaration
        self.set_arrangement(d.arrangement)
1019370
def init_widget(self):
        
        w = self.dialog
        # Listen for events
        w.setOnDismissListener(w.getId())
        w.onDismiss.connect(self.on_dismiss)
        w.setOnCancelListener(w.getId())
        w.onCancel.connect(self.on_cancel)
        super(AndroidDialog, self).init_widget()
569481
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType)
    {
        boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType);
        if (bChanged)
        { // Notify all the listSelectionListeners
            this.fireMySelectionChanged(new MyListSelectionEvent(source, this, m_iSelectedRow, iSelectType));
        }
        return bChanged;
    }
1016187
private void initializeShowSingleChoiceListDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_single_choice_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeSingleChoiceListDialog();
                singleChoiceListDialog
                        .setShowAnimation(createRectangularRevealAnimation(preference));
                singleChoiceListDialog
                        .setDismissAnimation(createRectangularRevealAnimation(preference));
                singleChoiceListDialog
                        .setCancelAnimation(createRectangularRevealAnimation(preference));
                singleChoiceListDialog.show();
                return true;
            }

        });
    }
79025
public T itemSelected(AdapterView.OnItemSelectedListener listener) {

        if (view instanceof AdapterView) {
            AdapterView<?> alv = (AdapterView<?>) view;
            alv.setOnItemSelectedListener(listener);
        }

        return self();

    }
706886
def initialize_state(self):
        
        if self.__hardware_source:
            self.__data_item_states_changed_event_listener = self.__hardware_source.data_item_states_changed_event.listen(self.__data_item_states_changed)
            self.__acquisition_state_changed_event_listener = self.__hardware_source.acquisition_state_changed_event.listen(self.__acquisition_state_changed)
        if self.on_display_name_changed:
            self.on_display_name_changed(self.display_name)
        self.__update_buttons()
        if self.on_data_item_states_changed:
            self.on_data_item_states_changed(list())
1087694
@EventHandler("change")
    private void onChange(ChangeEvent event) {
        // When the custom range item is selected, triggers the display of the date range dialog.
        if (event.getRelatedTarget() == customItem) {
            event.stopPropagation();
            DateRangeDialog.show((range) -> {
                setSelectedItem(range == null ? lastSelectedItem : addChoice(range, true));
                checkSelection(false);
            });
            
        }
424310
private void initializeAlertDialog() {
        MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
        configureHeaderDialogBuilder(builder);
        configureButtonBarDialogBuilder(builder);
        alertDialog = builder.create();
    }
3762
public void displayDialog() {

        if (DIALOG_CHANGEITEMTITLE.equals(getParamAction())) {
            // build the JSON object for the current item with changed title property
            changeItemTitle(getJsp().getRequest().getParameter(PARAM_ITEMPATH));
        } else if (DIALOG_CHANGEITEMLINKURL.equals(getParamAction())) {
            // build the JSON object for the current item with changed resource content (CmsResourcePointer)
            changeItemLinkUrl(getJsp().getRequest().getParameter(PARAM_ITEMPATH));
        } else if (DIALOG_GETCATEGORIES.equals(getParamAction())) {
            // get the available categories as JSON array
            buildJsonCategoryList();
        } else if (DIALOG_GETGALLERIES.equals(getParamAction())) {
            // get the available galleries as JSON array
            buildJsonGalleryList();
        } else if (DIALOG_GETGALLERY.equals(getParamAction())) {
            // get the desired gallery as JSON object
            buildJsonGalleryItem(getJsp().getRequest().getParameter(PARAM_GALLERYPATH));
        } else if (DIALOG_GETITEMS.equals(getParamAction())) {
            if (LISTMODE_CATEGORY.equals(getParamListMode())) {
                // get the items of selected category
                buildJsonResourceItems(getCategoryItems(), null);
            } else {
                // get the items of a selected gallery
                buildJsonResourceItems(getGalleryItems(), getParamGalleryPath());
            }
        } else if (DIALOG_GETACTIVEITEM.equals(getParamAction())) {
            // build the JSON object for the currently active item
            buildJsonActiveItem(getJsp().getRequest().getParameter(PARAM_ITEMPATH));
        }
    }
111620
private void initializeMultipleChoiceListDialog() {
        MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
        configureHeaderDialogBuilder(builder);
        configureButtonBarDialogBuilder(builder);
        builder.setMultiChoiceItems(R.array.list_items, new boolean[]{true, false, false},
                createMultiChoiceListener());
        multipleChoiceListDialog = builder.create();
    }
1041753
private void initializeShowListDialogPreference() {
        Preference preference = findPreference(getString(R.string.show_list_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeListDialog();
                listDialog.setShowAnimation(createRectangularRevealAnimation(preference));
                listDialog.setDismissAnimation(createRectangularRevealAnimation(preference));
                listDialog.setCancelAnimation(createRectangularRevealAnimation(preference));
                listDialog.show();
                return true;
            }

        });
    }
16974
protected void onSelectedItemsChanged() {
        final Collection<ItemT> selectedItems = getSelectedItems();
        if (selectedItems.isEmpty()) {
            anchorLabel();
            getInputWidget().setText("");
        } else {
            getInputWidget().setText(getItemPrinter().printCollection(selectedItems));
            floatLabel();
        }
        if (itemPickerListener != null) itemPickerListener.onSelectionChanged(this, selectedItems);
    }
1074553
private void initialize() {
        this.setTitle(Constant.messages.getString("siteselect.dialog.title"));
        this.setContentPane(getJPanel());
        this.addWindowListener(new java.awt.event.WindowAdapter() {   
        	@Override
        	public void windowOpened(java.awt.event.WindowEvent e) {    
        	} 

        	@Override
        	public void windowClosing(java.awt.event.WindowEvent e) {    
        	    cancelButton.doClick();
        	}
        });
		pack();
	}
565216
function (newItems) {

            var itemsListener = this._itemsListener;
            var json = this.json;
            var oldItems = this._data.items;
            var numberOfItems;

            if (oldItems == newItems) {
                // items did not change
                // return;
                numberOfItems = newItems.length;
            } else {
                if (oldItems) {
                    // remove the listener on the old items object:
                    for (var i = 0, l = oldItems.length; i < l; i++) {
                        json.removeListener(oldItems[i], null, itemsListener);
                    }
                }
                json.setValue(this._data, "items", newItems);

                if (newItems) {
                    numberOfItems = newItems.length;
                    // add the listener on the new items object:
                    for (var i = 0, l = newItems.length; i < l; i++) {
                        json.addListener(newItems[i], null, itemsListener);
                    }
                    var view = this._data.itemsView;
                    if (view) {
                        view.initialArray = newItems;
                        view.refresh(view.CHANGED_INITIAL_ARRAY);
                    }
                }
            }

            if (this._data.displayOptions) {
                this._calcRowCols(this._data.displayOptions.flowOrientation, this._data.numberOfRows, this._data.numberOfColumns, numberOfItems);
            }

        }
830302
public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener l) {
        if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE)
            return;
        ((AutoCompleteTextView)mInputView).setOnItemSelectedListener(l);
    }
471701
public void initListeners() {
        schemaChangedListener.watch(ChangedType.UPDATED, ChangedType.DELETED);
        propertiesChangedListener.watch(ChangedType.UPDATED);
        authenticationChangedListener.watch(ChangedType.UPDATED);
    }