Updates the navigation preferences, which are contained by the adapter.
335175
private void updateNavigationPreferences() {
        List<NavigationPreference> oldNavigationPreferences =
                new ArrayList<>(navigationPreferences);
        navigationPreferences.clear();
        boolean selectedNavigationPreferenceFound = selectedNavigationPreference == null;

        for (int i = 0; i < getItemCount(); i++) {
            Preference item = getItem(i);

            if (item instanceof NavigationPreference) {
                NavigationPreference navigationPreference = (NavigationPreference) item;
                navigationPreferences.add(navigationPreference);

                if (selectedNavigationPreference == navigationPreference) {
                    selectedNavigationPreferenceFound = true;
                }

                if (!oldNavigationPreferences.contains(navigationPreference)) {
                    notifyOnNavigationPreferenceAdded(navigationPreference);
                    oldNavigationPreferences.remove(navigationPreference);
                }
            }
        }

        for (NavigationPreference removedNavigationPreference : oldNavigationPreferences) {
            notifyOnNavigationPreferenceRemoved(removedNavigationPreference);
        }

        if (!selectedNavigationPreferenceFound) {
            if (getNavigationPreferenceCount() > 0) {
                selectNavigationPreference(Math.min(selectedNavigationPreferenceIndex,
                        getNavigationPreferenceCount() - 1), null);
            } else {
                selectNavigationPreference(null, null);
            }
        }
    }
1202053
private void updateRequiredOptions(Option option) throws AlreadySelectedException
    {
        if (option.isRequired())
        {
            expectedOpts.remove(option.getKey());
        }

        // if the option is in an OptionGroup make that option the selected option of the group
        if (options.getOptionGroup(option) != null)
        {
            OptionGroup group = options.getOptionGroup(option);

            if (group.isRequired())
            {
                expectedOpts.remove(group);
            }

            group.setSelected(option);
        }
    }
180890
public void changeCurrentAppState(String state) {

        String completeState = m_navigationStateManager.getState();
        String view = getViewName(completeState);
        String newCompleteState = view;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(state)) {
            newCompleteState += NavigationState.PARAM_SEPARATOR + state;
        }
        m_navigationStateManager.setState(newCompleteState);

    }
333060
private void adaptButtonBarDividerMargin() {
        if (buttonBarDivider != null) {
            LinearLayout.LayoutParams layoutParams =
                    (LinearLayout.LayoutParams) buttonBarDivider.getLayoutParams();
            layoutParams.leftMargin = buttonBarDividerMargin;
            layoutParams.rightMargin = buttonBarDividerMargin;
            buttonBarDivider.setLayoutParams(layoutParams);
        }
    }
1192138
function updateRectGuides(parent) {
	var guide = parent._guide;
	if (guide) {
		guide.x = parent.x;
		guide.y = parent.y;
		guide.width = parent.width;
		guide.height = parent.height;
		guide.fromCenter = parent.fromCenter;
	}
}
932741
def update(self, **kwargs):
        
        # Update inherited configurations
        super(VrfConf, self).update(**kwargs)
        vrf_id = kwargs.get(ConfWithId.ID)
        vrf_rd = kwargs.get(ROUTE_DISTINGUISHER)
        vrf_rf = kwargs.get(VRF_RF)
        if (vrf_id != self.id or
                vrf_rd != self.route_dist or
                vrf_rf != self.route_family):
            raise ConfigValueError(desc='id/route-distinguisher/route-family'
                                   ' do not match configured value.')

        # Validate and update individual settings
        new_imp_rts, old_imp_rts = \
            self._update_import_rts(**kwargs)
        export_rts_changed = self._update_export_rts(**kwargs)
        soos_list_changed = self._update_soo_list(**kwargs)
        med_changed = self._update_med(**kwargs)
        re_export_needed = (export_rts_changed or
                            soos_list_changed or
                            med_changed)
        import_maps = kwargs.get(IMPORT_MAPS, [])
        re_import_needed = self._update_importmaps(import_maps)

        # If we did have any change in value of any settings, we notify
        # listeners
        if (new_imp_rts is not None or
                old_imp_rts is not None or
                re_export_needed or re_import_needed):
            evt_value = (
                new_imp_rts,
                old_imp_rts,
                import_maps,
                re_export_needed,
                re_import_needed
            )
            self._notify_listeners(VrfConf.VRF_CHG_EVT, evt_value)
        return True
968448
public void update() {
        if (settings != null && getWidth() > 0 && getHeight() > 0) {
            // Updating finder area rectangle
            GravityUtils.getMovementAreaPosition(settings, tmpRect);
            rect.set(tmpRect);
            rect.offset(getPaddingLeft(), getPaddingTop());

            // We want to stroke outside of finder rectangle, while by default stroke is centered
            strokeRect.set(rect);
            float halfStroke = 0.5f * paintStroke.getStrokeWidth();
            strokeRect.inset(-halfStroke, -halfStroke);

            invalidate();
        }
    }
432988
public void setPreferences(OperaPreferences newPreferences) {
    if (!(newPreferences instanceof OperaFilePreferences)) {
      OperaFilePreferences convertedPreferences = new OperaFilePreferences(preferenceFile);
      convertedPreferences.merge(newPreferences);
      preferences = convertedPreferences;
    } else {
      preferences = newPreferences;
    }
  }
523051
function updateNavButtonsState() {
            // Item navigation
            if (itemNav) {
                var isFirst = rel.activeItem === 0,
                    isLast  = rel.activeItem >= items.length - 1,
                    itemsButtonState = isFirst ? 'first' : isLast ? 'last' : 'middle';

                if (last.itemsButtonState !== itemsButtonState) {
                    last.itemsButtonState = itemsButtonState;

                    if ($prevButton.is('button,input')) {
                        $prevButton.prop('disabled', isFirst);
                    }

                    if ($nextButton.is('button,input')) {
                        $nextButton.prop('disabled', isLast);
                    }

                    $prevButton[isFirst ? 'removeClass' : 'addClass'](o.disabledClass);
                    $nextButton[isLast ? 'removeClass' : 'addClass'](o.disabledClass);
                }
            }

            // Page navigation
            if ($pages[0]) {
                var isStart = pos.dest <= pos.start,
                    isEnd = pos.dest >= pos.end,
                    pagesButtonState = isStart ? 'first' : isEnd ? 'last' : 'middle';

                // Update paging buttons only if there has been a change in their state
                if (last.pagesButtonState !== pagesButtonState) {
                    last.pagesButtonState = pagesButtonState;

                    if ($prevPageButton.is('button,input')) {
                        $prevPageButton.prop('disabled', isStart);
                    }

                    if ($nextPageButton.is('button,input')) {
                        $nextPageButton.prop('disabled', isEnd);
                    }

                    $prevPageButton[isStart ? 'removeClass' : 'addClass'](o.disabledClass);
                    $nextPageButton[isEnd ? 'removeClass' : 'addClass'](o.disabledClass);
                }
            }
        }
1110699
private void adaptButtonBarDividerVisibility() {
        if (buttonBarDivider != null) {
            buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
            buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
        }
    }
877717
public void updateFeedback(FeedbackItem feedbackItem) {
    if (!TextUtils.isEmpty(feedbackId)) {
      navigation.updateFeedback(feedbackId, feedbackItem.getFeedbackType(), feedbackItem.getDescription(), screenshot);
      sendEventFeedback(feedbackItem);
      feedbackId = null;
      screenshot = null;
    }
  }
1197867
def update(self, new_options):
        """"""
        for option in new_options:
            if option.key in self.options:
                del self.options[option.key]
            self.options[option.key] = option
67489
public void updateShownOptions(boolean showModeSwitch, boolean showAddKeyOption) {

        if (showModeSwitch != m_showModeSwitch) {
            m_upperLeftComponent.removeAllComponents();
            m_upperLeftComponent.addComponent(m_languageSwitch);
            if (showModeSwitch) {
                m_upperLeftComponent.addComponent(m_modeSwitch);
            }
            m_upperLeftComponent.addComponent(m_filePathLabel);
            m_showModeSwitch = showModeSwitch;
        }
        if (showAddKeyOption != m_showAddKeyOption) {
            if (showAddKeyOption) {
                m_optionsComponent.addComponent(m_lowerLeftComponent, 0, 1);
                m_optionsComponent.addComponent(m_lowerRightComponent, 1, 1);
            } else {
                m_optionsComponent.removeComponent(0, 1);
                m_optionsComponent.removeComponent(1, 1);
            }
            m_showAddKeyOption = showAddKeyOption;
        }
    }
1047574
private void updateEnabledItems() {
        PickerSpinnerAdapter adapter = (PickerSpinnerAdapter) getAdapter();
        // if the current item is out of range, we have no choice but to reset it
        if(!isInDateRange(getSelectedDate())) {
            final Calendar today = Calendar.getInstance();
            if(isInDateRange(today))
                setSelectedDate(today);
            else
                // if today itself is not a valid date, we will just use the minimum date (which is always set here)
                setSelectedDate(minDate);
        }

        for(int position = getLastItemPosition(); position >= 0; position--) {
            DateItem item = (DateItem) adapter.getItem(position);
            if(isInDateRange(item.getDate()))
                item.setEnabled(true);
            else
                item.setEnabled(false);
        }
    }
107103
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, UserGroup.USER_ICON, UserGroup.USER_DETAIL, null);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        super.addNavButtons();
    }
732269
function updatePossibleNavigations(element) {
  let canSelectNext;
  let canSelectPrevious;
  const items = element.items;
  if (items == null || items.length === 0) {
    // No items to select.
    canSelectNext = false;
    canSelectPrevious = false;
  } if (element.selectionWraps) {
    // Since there are items, can always go next/previous.
    canSelectNext = true;
    canSelectPrevious = true;
  } else {
    const index = element.selectedIndex;
    if (index < 0 && items.length > 0) {
      // Special case. If there are items but no selection, declare that it's
      // always possible to go next/previous to create a selection.
      canSelectNext = true;
      canSelectPrevious = true;
    } else {
      // Normal case: we have an index in a list that has items.
      canSelectPrevious = (index > 0);
      canSelectNext = (index < items.length - 1);
    }
  }
  if (element.canSelectNext !== canSelectNext) {
    element.canSelectNext = canSelectNext;
  }
  if (element.canSelectPrevious !== canSelectPrevious) {
    element.canSelectPrevious = canSelectPrevious;
  }
}
593892
private void addNavigationPreference() {
        NavigationPreference navigationPreference = new NavigationPreference(this);
        navigationPreference.setTitle(getPreferenceHeaderTitle());
        navigationPreference.setFragment(NewPreferenceHeaderFragment.class.getName());
        getNavigationFragment().getPreferenceScreen().addPreference(navigationPreference);
        invalidateOptionsMenu();
    }