For binary fields, set the current state.
@param state The state to set this field.
@param bDisplayOption Display changed fields if true.
@param iMoveMode The move mode.
@return The error code (or NORMAL_RETURN).
352870
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        if (bState)      // Only if turned ON (can't turn a radio button off!)
        {
            if (m_objTarget instanceof String)
            {
                if (m_bTrueIfMatch)
                    iErrorCode = this.setString((String)m_objTarget, bDisplayOption, iMoveMode);
                else
                {
                    String thisString = this.getString();
                    if (m_objTarget.equals(thisString)) // If == target, clear
                        iErrorCode = this.setString(Constants.BLANK, bDisplayOption, iMoveMode);
                }
            }
            else
            {
                if (m_bTrueIfMatch)
                    iErrorCode = this.setData(m_objTarget, bDisplayOption, iMoveMode);
                else
                {
                    Object thisString = this.getData();
                    if (m_objTarget.equals(thisString)) // If == target, clear
                        iErrorCode = this.setData(null, bDisplayOption, iMoveMode);
                }
            }
        }
        return iErrorCode;
    }
23639
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
    {
        if (m_objValue instanceof String)
            return m_fldDest.setString((String)m_objValue, bDisplayOption, iMoveMode);
        else
            return m_fldDest.setData(m_objValue, bDisplayOption, iMoveMode);
    }
1180883
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
    {
        String string = this.getSourceField().getString();        // Get this string
        int i = string.lastIndexOf(' ');
        if (i != -1)
            string = string.substring(i+1);
        return m_fldDest.setData(string, bDisplayOption, iMoveMode);
    }
1015741
public void setRespondsToMode(int iMoveMode, boolean flag)
    {
        if (iMoveMode == DBConstants.SCREEN_MOVE)
            m_bScreenMove = flag;
        if (iMoveMode == DBConstants.INIT_MOVE)
            m_bInitMove = flag;
        if (iMoveMode == DBConstants.READ_MOVE)
            m_bReadMove = flag;
    }
1270496
def setViewMode( self, state = True ):
        
        if self._viewMode == state:
            return
            
        self._viewMode = state
        if state:
            self._mainView.setDragMode( self._mainView.ScrollHandDrag )
        else:
            self._mainView.setDragMode( self._mainView.RubberBandDrag )
            
        self.emitViewModeChanged()
1052217
public void updateDrawableState(int state, boolean flag) {
        final int oldState = mCombinedState;
        // Update the combined state flag
        if (flag) mCombinedState |= state;
        else mCombinedState &= ~state;

        // Set the combined state
        if (oldState != mCombinedState) {
            setState(VIEW_STATE_SETS[mCombinedState]);
        }
    }
435359
public void setDisplayMode(final DisplayMode displayMode) {
		content.setDisplayMode(displayMode);
		link.setOpenNewWindow(DisplayMode.OPEN_NEW_WINDOW.equals(content.getDisplayMode()));
	}
1020345
public void setPanelState(PanelState state) {

        // Abort any running animation, to allow state change
        if(mDragHelper.getViewDragState() == ViewDragHelper.STATE_SETTLING){
            Log.d(TAG, "View is settling. Aborting animation.");
            mDragHelper.abort();
        }

        if (state == null || state == PanelState.DRAGGING) {
            throw new IllegalArgumentException("Panel state cannot be null or DRAGGING.");
        }
        if (!isEnabled()
                || (!mFirstLayout && mSlideableView == null)
                || state == mSlideState
                || mSlideState == PanelState.DRAGGING) return;

        if (mFirstLayout) {
            setPanelStateInternal(state);
        } else {
            if (mSlideState == PanelState.HIDDEN) {
                mSlideableView.setVisibility(View.VISIBLE);
                requestLayout();
            }
            switch (state) {
                case ANCHORED:
                    smoothSlideTo(mAnchorPoint, 0);
                    break;
                case COLLAPSED:
                    smoothSlideTo(0, 0);
                    break;
                case EXPANDED:
                    smoothSlideTo(1.0f, 0);
                    break;
                case HIDDEN:
                    int newTop = computePanelTopPosition(0.0f) + (mIsSlidingUp ? +mPanelHeight : -mPanelHeight);
                    smoothSlideTo(computeSlideOffset(newTop), 0);
                    break;
            }
        }
    }
785023
public int moveIt(boolean bDisplayOption, int iMoveMode)
    {
        if (m_convCheckMark != null) if (m_convCheckMark.getState() == false)
            return DBConstants.NORMAL_RETURN;       // If check mark is false (or no check mark), don't move
        return super.moveIt(bDisplayOption, iMoveMode);
    }
1218311
public void setTableState(CmsFileExplorerSettings state) {

        if (state != null) {
            m_fileTable.setSortContainerPropertyId(state.getSortColumnId());
            m_fileTable.setSortAscending(state.isSortAscending());
            Object[] visibleCols = m_fileTable.getVisibleColumns();
            for (int i = 0; i < visibleCols.length; i++) {
                m_fileTable.setColumnCollapsed(visibleCols[i], state.getCollapsedColumns().contains(visibleCols[i]));
            }
        }
    }
337898
public boolean set(State state) {
    while (true) {
      InternalState internalState = currentInternalState.get();
      checkState(!internalState.isRead, "State was already read, cannot set state.");
      if (state == internalState.state) {
        return false;
      } else {
        if (!currentInternalState.compareAndSet(
            internalState,
            state == State.ENABLED
                ? InternalState.ENABLED_NOT_READ
                : InternalState.DISABLED_NOT_READ)) {
          // The state was changed between the moment the internalState was read and this point.
          // Some conditions may be not correct, reset at the beginning and recheck all conditions.
          continue;
        }
        return true;
      }
    }
  }
1098416
def setShowOptionsButton(self, state):
        
        self._showOptionsButton = state
        self._optionsButton.setVisible(state)
271358
public void doNewRecord(boolean bDisplayOption)
    {
        super.doNewRecord(bDisplayOption);
        BaseField fldTarget = null;
        if (typeFieldName != null)
            fldTarget = this.getOwner().getField(typeFieldName);
        else
            fldTarget = this.getOwner().getField(m_iTypeField);
        boolean[] rgbEnabled = fldTarget.setEnableListeners(false);
        InitOnceFieldHandler listener = (InitOnceFieldHandler)fldTarget.getListener(InitOnceFieldHandler.class.getName());
        if (listener != null)
            listener.setFirstTime(true);    // Special case - you shouldn't have put this listener here, but since you did...
        fldTarget.setValue(m_iTargetValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE);
        fldTarget.setModified(false);
        fldTarget.setEnableListeners(rgbEnabled);
    }
1291889
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        if (iMoveMode == DBConstants.SCREEN_MOVE)
        {
            String strName = this.getOwner().toString();
            int iType = 0;
            iType = DBConstants.REMOTE | DBConstants.SHARED_DATA;
            DatabaseInfo record = (DatabaseInfo)this.getOwner().getRecord();
            if (strName.length() == 0)
            {
                
            }
            else
            {
                record.close();
                BaseTable table = record.getTable();
                record.setTable(null);
                table.setRecord(null);
                table.free();
                record.setDatabaseName(strName);
                if (iType != 0)
                    record.setDatabaseType(iType);
                try {
                    record.open();
                    record.setKeyArea(DatabaseInfo.ID_KEY);
                    record.getField(DatabaseInfo.ID).setValue(1);
                    if (!record.seek(DBConstants.EQUALS))
                    {
                        record.addNew();
                        this.getOwner().setString(strName);
                    }
                } catch (DBException e) {
                    e.printStackTrace();
                }
            }
            
        }
        return super.fieldChanged(bDisplayOption, iMoveMode);
    }
944449
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = this.setupGridOrder();
        if (iErrorCode != DBConstants.NORMAL_RETURN)
            return iErrorCode;
        return super.fieldChanged(bDisplayOption, iMoveMode);
    }
251617
public void addState(CmsPublishItemStatus.State state) {

        switch (state) {
            case normal:
                m_normalCount += 1;
                break;
            case publish:
                m_publishCount += 1;
                break;
            case remove:
            default:
                m_removeCount += 1;
                break;
        }
    }
174520
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
    {
        Boolean objData = new Boolean(bState);
        if (this.getDataClass() == Boolean.class)
            return this.setData(objData, bDisplayOption, iMoveMode);
        else if (Number.class.isAssignableFrom(this.getDataClass()))
            return this.setValue(objData.booleanValue() ? 1 : 0, bDisplayOption, iMoveMode);
        else if (this.getDataClass() == String.class)
            return this.setString(objData.booleanValue() ? Constants.TRUE : Constants.FALSE, bDisplayOption, iMoveMode);
        return super.setState(bState, bDisplayOption, iMoveMode);
    }