Update the button states. Overwrite this method for activate or disable the navigation
buttons.
483065
protected void updateButtonState()
	{
		getNavigationPanel().getBtnPrevious()
			.setEnabled(getStateMachine().getCurrentState().hasPrevious());
		getNavigationPanel().getBtnNext().setEnabled(getStateMachine().getCurrentState().hasNext());
	}
953072
protected void updateState() {
        final WidgetState.State state;
        if (useParentState() || getFollowParentState()) {
            state = mParent.getState();
        } else {
            state = getState();
        }

        Log.d(Log.SUBSYSTEM.WIDGET, TAG, "updateState(): %s for '%s'", state, getName());
        if (!mLevelInfo.isEmpty() && mLevel >= 0) {
            mLevelInfo.get(mLevel).setState(state);
        }

        boolean updateChildren = isInFollowStateGroup()
                || getChildrenFollowState();
        for (Widget child : getChildren()) {
            if (updateChildren || child.getFollowParentState()) {
                child.updateState();
            }
        }
    }
343063
void changeState(State state) {

        m_state = state;
        switch (state) {
            case validationRunning:
                m_cancelButton.setEnabled(false);
                m_okButton.setEnabled(false);
                clearValidationError();
                break;
            case validationFailed:
                m_okButton.setEnabled(false);
                m_cancelButton.setEnabled(true);
                break;
            case validationUnknown:
            default:
                m_cancelButton.setEnabled(true);
                m_okButton.setEnabled(true);
                clearValidationError();
                break;

        }
    }
1027500
protected void updateSubNav(List<NavEntry> subEntries) {

        m_rootLayout.clearSubNav();
        if ((subEntries == null) || subEntries.isEmpty()) {
            m_rootLayout.setSubNavVisible(false);
        } else {
            m_rootLayout.setSubNavVisible(true);
            for (NavEntry entry : subEntries) {
                addSubNavEntry(entry);
            }
        }
    }
1122705
protected void update() {
        putValue(Action.ACTION_COMMAND_KEY, command.getActionCommand());
        CommandFaceDescriptor face = command.getFaceDescriptor();
        if (face != null) {
            face.configure(this);
        }
        setEnabled(command.isEnabled());
    }
643023
private void updateButtonIconsAndStates(Canvas[] toolStripMembers) {
		for (Canvas toolStripMember : toolStripMembers) {
			if (toolStripMember instanceof LayerTreeModalButton) {
				((LayerTreeModalButton) toolStripMember).update();
			} else if (toolStripMember instanceof LayerTreeButton) {
				((LayerTreeButton) toolStripMember).update();
			}
		}
	}
1257245
private void enableRefresh() {
        this.refreshButton.setEnabled(true);
        this.autoRefreshLabel.setEnabled(true);
        this.autoRefreshComboBox.setEnabled(true);
        updateAutoRefreshTimer();
    }
276994
function() {
		if (this._bindingState.child === false && this._childToParent === true) {
			var options = this._options;
			this._bindingState.child = true;
			turnOnListeningAndUpdate(options.child, options.parent, this._updateParent, options.queue);
		}
	}
989910
def update_button_action(self):
        
        if self.mode.get() == 3:  # threecolor
            self.configure_threecolor_image()
        elif self.mode.get() == 1:  # singlecolor
            self.configure_singlecolor_image()
        else:
            raise ValueError("mode can only be singlecolor or threecolor")

        self.imageplot.set_data(self.image)
        if self.mode.get() == 1:  # singlecolor
            self.imageplot.set_cmap('gist_gray')
        self.fig.canvas.draw_idle()
1104657
public function editButtonAction()
    {
        $this->view->categoryId = $this->categoryId;
        $this->view->originalId = $this->originalId;
    }
555174
private void update()
    {
        boolean hasEvents = false;
        // set the newly received key and motion events.
        synchronized (eventLock)
        {
            hasEvents = (keyEvent.size() > 0) || (motionEvent.size() > 0);
            processedKeyEvent.addAll(keyEvent);
            keyEvent.clear();
            processedMotionEvent.addAll(motionEvent);
            motionEvent.clear();
        }
        previousActive = active;
        if ((scene != null) && (mPicker != null))
        {
            updatePicker(getMotionEvent(), active);
        }
        context.getEventManager().sendEvent(this, IControllerEvent.class, "onEvent", this, active);

        // reset the set key and motion events.
        synchronized (eventLock)
        {
            processedKeyEvent.clear();
            processedMotionEvent.clear();
        }
    }
44360
protected void updateOverwriteExisting() {

        if (m_overwriteExisting != null) {
            boolean move = (m_dialogMode == DialogMode.move) || (m_actionCombo.getValue() == Action.move);
            if (move) {
                m_overwriteExisting.setValue(Boolean.FALSE);
                m_overwriteExisting.setVisible(false);
            } else {
                m_overwriteExisting.setVisible(true);
            }
        }
    }
846987
public void update() {
		super.update();

		if (!canModifyEditor()) {
			setEnabled(false);
			return;
		}

		ITextEditor editor= getTextEditor();
		if (fOperationTarget == null && editor != null)
			fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);

		boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(ITextOperationTarget.PREFIX) && fOperationTarget.canDoOperation(ITextOperationTarget.STRIP_PREFIX));
		setEnabled(isEnabled);
	}
1110699
private void adaptButtonBarDividerVisibility() {
        if (buttonBarDivider != null) {
            buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
            buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
        }
    }
357065
private void enableButtons() {
		final int itemCount = this.list.getTable().getItemCount();
		final boolean hasElement = itemCount > 0;
		IStructuredSelection selection;
		if (hasElement) {
			selection = this.list.getStructuredSelection();
			final int selectionCount = selection.size();
			if (selectionCount <= 0 || selectionCount > itemCount) {
				selection = null;
			}
		} else {
			selection = null;
		}
		this.removeButton.setEnabled(selection != null);
		this.clearButton.setEnabled(hasElement);
		if (this.isSortedElements) {
			final Object firstElement = selection != null ? this.list.getTable().getItem(0).getData() : null;
			final Object lastElement = selection != null ? this.list.getTable().getItem(this.list.getTable().getItemCount() - 1).getData() : null;
			final boolean isNotFirst = firstElement != null && selection != null && firstElement != selection.getFirstElement();
			final boolean isNotLast = lastElement != null && selection != null && lastElement != selection.getFirstElement();
			this.moveTopButton.setEnabled(isNotFirst);
			this.moveUpButton.setEnabled(isNotFirst);
			this.moveDownButton.setEnabled(isNotLast);
			this.moveBottomButton.setEnabled(isNotLast);
		}
	}
875438
@Override
    public void setComponentEnabled(boolean enabled) {
        super.setComponentEnabled(enabled);

        boolean enable = enabled && getTable().getSelectionModel().getMinSelectionIndex() >= 0;
        if (enable) {
            updateMoveButtons();
        } else {
            disableMoveButtons();
        }
    }
181303
private void updateButtonsLayout() {
		// Get the buttons layout.
		LinearLayout root = this.chooser.getRootLayout();
		LinearLayout buttonsLayout = (LinearLayout) root.findViewById(R.id.linearLayoutButtons);

		// Verify if the 'Add' button is visible or not.
		View addButton = root.findViewById(R.id.buttonAdd);
		addButton.setVisibility(this.canCreateFiles? View.VISIBLE : View.INVISIBLE);
		addButton.getLayoutParams().width = this.canCreateFiles? ViewGroup.LayoutParams.MATCH_PARENT : 0;

		// Verify if the 'Ok' button is visible or not.
		View okButton = root.findViewById(R.id.buttonOk);
		okButton.setVisibility(this.folderMode? View.VISIBLE : View.INVISIBLE);
		okButton.getLayoutParams().width = this.folderMode? ViewGroup.LayoutParams.MATCH_PARENT : 0;
		
		// If both buttons are invisible, hide the layout.
		ViewGroup.LayoutParams params = buttonsLayout.getLayoutParams();
		if(this.canCreateFiles || this.folderMode) {
			// Show the layout.
			params.height = ViewGroup.LayoutParams.WRAP_CONTENT;

			// If only the 'Ok' button is visible, put him first. Otherwise, put 'Add' first.
			buttonsLayout.removeAllViews();
			if(this.folderMode && !this.canCreateFiles) {
				buttonsLayout.addView(okButton);
				buttonsLayout.addView(addButton);
			} else {
				buttonsLayout.addView(addButton);			
				buttonsLayout.addView(okButton);
			}
		} else {
			// Hide the layout.
			params.height = 0;
		}
	}