Initializes the button, which allows to show a default {@link PreferenceActivity}.
518150
private void initializePreferenceButton() {
        Button preferenceButton = findViewById(R.id.preference_button);
        preferenceButton.setOnClickListener(createPreferenceButtonListener());
    }
1113357
def init_layout(self):
        
        super(AndroidDialog, self).init_layout()

        #: Set the content
        for view in self.child_widgets():
            self.dialog.setContentView(view)
            break

        #: Show it if needed
        d = self.declaration
        if d.show:
            self.set_show(d.show)
602677
private OnClickListener createDynamicPreferenceButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final View v) {
                Intent intent = new Intent(MainActivity.this, DynamicSettingsActivity.class);
                startActivity(intent);
            }

        };
    }
557531
protected void initDownloadButton() {

        if (m_fileDownloader != null) {
            m_fileDownloader.remove();
        }
        m_fileDownloader = new FileDownloader(getDownloadResource());
        m_fileDownloader.extend(getDownloadButton());
    }
1071022
public void setDefaultButton(SBaseButton button)
    {
        this.getScreenFieldView().setDefaultButton(button == null ? null : button.getScreenFieldView());
    }
621412
private void initializeThemePreference() {
        Preference themePreference = findPreference(getString(R.string.theme_preference_key));
        themePreference.setOnPreferenceChangeListener(createThemeChangeListener());
    }
63076
public void initPreferences(CmsWorkplaceManager wpManager) {

        CURRENT_DEFAULT_SETTINGS = this;
        Class<?> accessorClass = CmsUserSettingsStringPropertyWrapper.class;

        // first initialize all built-in preferences. these are:
        // a) Bean properties of CmsUserSettingsStringPropertyWrapper
        // b) Editor setting preferences
        // c) Gallery setting preferences
        PropertyDescriptor[] propDescs = PropertyUtils.getPropertyDescriptors(accessorClass);
        for (PropertyDescriptor descriptor : propDescs) {
            String name = descriptor.getName();
            Method getter = descriptor.getReadMethod();
            Method setter = descriptor.getWriteMethod();
            if ((getter == null) || (setter == null)) {
                continue;
            }

            PrefMetadata metadata = getter.getAnnotation(PrefMetadata.class);
            if (metadata == null) {
                CmsBuiltinPreference preference = new CmsBuiltinPreference(name);
                m_preferences.put(preference.getName(), preference);
            } else {
                try {
                    Constructor<?> constructor = metadata.type().getConstructor(String.class);
                    I_CmsPreference pref = (I_CmsPreference)constructor.newInstance(name);
                    m_preferences.put(pref.getName(), pref);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        Map<String, String> editorValues = getEditorSettings();
        if (wpManager.getWorkplaceEditorManager() != null) {
            for (String resType : wpManager.getWorkplaceEditorManager().getConfigurableEditors().keySet()) {
                if (!editorValues.containsKey(resType)) {
                    editorValues.put(resType, null);
                }
            }
        }
        for (Map.Entry<String, String> editorSettingEntry : editorValues.entrySet()) {
            CmsEditorPreference pref = new CmsEditorPreference(
                editorSettingEntry.getKey(),
                editorSettingEntry.getValue());
            m_preferences.put(pref.getName(), pref);
        }

        Map<String, String> galleryValues = new HashMap<String, String>(getStartGalleriesSettings());
        for (String key : wpManager.getGalleries().keySet()) {
            if (!galleryValues.containsKey(key)) {
                galleryValues.put(key, null);
            }
        }
        for (Map.Entry<String, String> galleryEntry : galleryValues.entrySet()) {
            CmsStartGallleryPreference pref = new CmsStartGallleryPreference(
                galleryEntry.getKey(),
                galleryEntry.getValue());
            m_preferences.put(pref.getName(), pref);
        }

        // Now process configured preferences. Each configuration entry is either
        // for a built-in preference, in which case we create a wrapper around the existing preference,
        // or for a custom user-defined preference.
        for (CmsPreferenceData prefData : m_preferenceData) {
            String name = prefData.getName();
            I_CmsPreference pref = null;
            if (m_preferences.containsKey(name)) {
                // we first remove the existing preference, because in a LinkedHashMap, put(key, value) will not
                // update the position of the entry if the key already exists
                pref = new CmsWrapperPreference(prefData, m_preferences.remove(name));
            } else {
                pref = new CmsUserDefinedPreference(
                    prefData.getName(),
                    prefData.getDefaultValue(),
                    prefData.getPropertyDefinition(),
                    prefData.getTab());
            }
            m_preferences.put(pref.getName(), pref);
            pref.setValue(this, prefData.getDefaultValue());
        }
    }
745742
def init_widget(self):
        
        super(AndroidPicker, self).init_widget()
        d = self.declaration
        w = self.widget
        if d.items:
            self.set_items(d.items)
        else:
            if d.max_value:
                self.set_max_value(d.max_value)
            if d.min_value:
                self.set_min_value(d.min_value)
        self.set_value(d.value)
        if d.wraps:
            self.set_wraps(d.wraps)

        if d.long_press_update_interval:
            self.set_long_press_update_interval(d.long_press_update_interval)

        w.setOnValueChangedListener(w.getId())
        w.onValueChange.connect(self.on_value_change)
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;
            }

        });
    }
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);
    }
1342752
protected void initializeButton(final Button button, final Color foreground,
		final Color background)
	{
		button.setForeground(foreground);
		button.setBackground(background);
	}
1016154
private void setupSimplePreferencesScreen() {
        if (!isSimplePreferences(this)) {
            return;
        }

        // In the simplified UI, fragments are not used at all and we instead
        // use the older PreferenceActivity APIs.

        // Add 'general' preferences.
        addPreferencesFromResource(R.xml.pref_general);

        // Add 'notifications' preferences, and a corresponding header.
        PreferenceCategory fakeHeader = new PreferenceCategory(this);
        fakeHeader.setTitle(R.string.pref_header_notifications);
        getPreferenceScreen().addPreference(fakeHeader);
        addPreferencesFromResource(R.xml.pref_notification);

        // Add 'data and sync' preferences, and a corresponding header.
        fakeHeader = new PreferenceCategory(this);
        fakeHeader.setTitle(R.string.pref_header_data_sync);
        getPreferenceScreen().addPreference(fakeHeader);
        addPreferencesFromResource(R.xml.pref_data_sync);

        // Bind the summaries of EditText/List/Dialog/Ringtone preferences to
        // their values. When their values change, their summaries are updated
        // to reflect the new value, per the Android Design guidelines.
        bindPreferenceSummaryToValue(findPreference("example_text"));
        bindPreferenceSummaryToValue(findPreference("example_list"));
        bindPreferenceSummaryToValue(findPreference("notifications_new_message_ringtone"));
        bindPreferenceSummaryToValue(findPreference("sync_frequency"));
    }
127283
private void initButtons()
	{
		JButton selectAll = new JButton("Select all");
		selectAll.addActionListener(new ActionListener()
		{

			@Override
			public void actionPerformed(ActionEvent arg0)
			{
				for (int i = 0; i < 22; i++) {
					namespaces.getModel().setValueAt(new Boolean(true), i, 1);
				}

			}
		});
		selectAll.setBounds(380, 10, 120, 25);
		this.add(selectAll);

		JButton unselectAll = new JButton("Unselect all");

		unselectAll.addActionListener(new ActionListener()
		{

			@Override
			public void actionPerformed(ActionEvent e)
			{
				for (int i = 0; i < 22; i++) {
					namespaces.getModel().setValueAt(new Boolean(false), i, 1);
				}

			}
		});

		unselectAll.setBounds(380, 40, 120, 25);
		this.add(unselectAll);
	}
60855
public String getPreferencesButton() {

        int buttonStyle = getSettings().getUserSettings().getWorkplaceButtonStyle();
        if (!getCms().getRequestContext().getCurrentUser().isManaged()) {
            return button(
                "../commons/preferences.jsp",
                "body",
                "preferences.png",
                Messages.GUI_BUTTON_PREFERENCES_0,
                buttonStyle);
        } else {
            return button(null, null, "preferences_in.png", Messages.GUI_BUTTON_PREFERENCES_0, buttonStyle);
        }
    }
1028757
protected function initDefaultButtons()
    {
        $this->initDefaultButton('view', $this->useIcon ? 'eye-open' : false);
        $this->initDefaultButton('update', $this->useIcon ? 'pencil' : false);
        $this->initDefaultButton('delete', $this->useIcon ? 'trash' : false, [
            'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),
            'data-method' => 'post',
        ]);
    }
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();
	}
590473
private void initButtons() {

        m_addButton.addChoice(
            m_attributeHandler.getWidgetService(),
            new CmsChoiceMenuEntryBean(m_attributeHandler.getAttributeName()),
            new AsyncCallback<CmsChoiceMenuEntryBean>() {

                public void onFailure(Throwable caught) {

                    // will not be called

                }

                public void onSuccess(CmsChoiceMenuEntryBean selectedEntry) {

                    // nothing to do
                }
            });
        m_addButton.addDomHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {

                m_addButton.hide();
                addNewAttributeValue();
                event.preventDefault();
                event.stopPropagation();

            }
        }, ClickEvent.getType());

        m_editButton.setImageClass(I_CmsButton.PEN_SMALL);
        m_editButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        m_removeButton.setImageClass(I_CmsButton.CUT_SMALL);
        m_removeButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        m_upButton.setImageClass(I_CmsButton.EDIT_UP_SMALL);
        m_upButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        m_downButton.setImageClass(I_CmsButton.EDIT_DOWN_SMALL);
        m_downButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        if (CmsEditorBase.hasDictionary()) {
            String label = m_widgetService.getAttributeLabel(m_attributeHandler.getAttributeName());
            m_addButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_ADD_1, label));
            m_removeButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_DELETE_1, label));
            m_upButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_MOVE_UP_0));
            m_downButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_MOVE_DOWN_0));
            m_title = CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_EDIT_1, label);
            m_editButton.setTitle(m_title);
        }
    }