Change the current mode and update float space position accordingly.
181244
function changeMode( newMode ) {
					var editorPos = editable.getDocumentPosition();

					switch ( newMode ) {
						case 'top':
							updatePos( 'absolute', 'top', editorPos.y - spaceHeight - dockedOffsetY );
							break;
						case 'pin':
							updatePos( 'fixed', 'top', pinnedOffsetY );
							break;
						case 'bottom':
							updatePos( 'absolute', 'top', editorPos.y + ( editorRect.height || editorRect.bottom - editorRect.top ) + dockedOffsetY );
							break;
					}

					mode = newMode;
				}
384774
def setCurrentMode( self, mode ):
        
        if ( self._currentMode == mode ):
            return
        
        self._currentMode = mode
        self.updateModeSettings()
843528
def change_view(self, change_in_depth):
        """"""
        self.current_view_depth += change_in_depth
        if self.current_view_depth < 0:
            self.current_view_depth = 0
        self.collapseAll()
        if self.current_view_depth > 0:
            for item in self.get_items(maxlevel=self.current_view_depth-1):
                item.setExpanded(True)
683097
def extend_left_to(self, window, max_size):
        """"""
        rofs = self.ofs - window.ofs_end()
        nsize = rofs + self.size
        rofs -= nsize - min(nsize, max_size)
        self.ofs = self.ofs - rofs
        self.size += rofs
877462
void adjustScroll() {

        if (iRowHeight == 0) {
            return;
        }

        int w = 0;

        for (int i = 0; i < iColCount; i++) {
            w += iColWidth[i];
        }

        iGridWidth  = w;
        iGridHeight = iRowHeight * (iRowCount + 1);

        sbHoriz.setValues(iX, iWidth, 0, iGridWidth);

        int v = iY / iRowHeight,
            h = iHeight / iRowHeight;

        sbVert.setValues(v, h, 0, iRowCount + 1);

        iX = sbHoriz.getValue();
        iY = iRowHeight * sbVert.getValue();
    }
428385
private void adjustToCurrentFormat() {

        // in case of a locked or fixed image ratio height and width need to be reset
        int height = m_croppingParam.getOrgHeight();
        int width = m_croppingParam.getOrgWidth();
        if (m_croppingParam.isScaled()) {
            if (m_croppingParam.getTargetHeight() == -1) {
                height = (int)Math.floor(
                    ((1.00 * m_croppingParam.getOrgHeight()) / m_croppingParam.getOrgWidth())
                        * m_croppingParam.getTargetWidth());
            } else {
                height = m_croppingParam.getTargetHeight();
            }
            if (m_croppingParam.getTargetWidth() == -1) {
                width = (int)Math.floor(
                    ((1.00 * m_croppingParam.getOrgWidth()) / m_croppingParam.getOrgHeight())
                        * m_croppingParam.getTargetHeight());
            } else {
                width = m_croppingParam.getTargetWidth();
            }

        } else {
            m_croppingParam.setTargetHeight(height);
            m_croppingParam.setTargetWidth(width);
        }
        m_formatForm.setHeightInput(height);
        m_formatForm.setWidthInput(width);
        // enabling/disabling ratio lock button
        if (m_currentFormat.isFixedRatio()) {
            m_formatForm.setRatioButton(false, false, Messages.get().key(Messages.GUI_PRIVIEW_BUTTON_RATIO_FIXED_0));
            m_ratioLocked = true;
        } else {
            if (!m_currentFormat.isHeightEditable() && !m_currentFormat.isWidthEditable()) {
                // neither height nor width are editable, disable ratio lock button
                m_formatForm.setRatioButton(
                    false,
                    false,
                    Messages.get().key(Messages.GUI_PRIVIEW_BUTTON_NOT_EDITABLE_0));
            } else {
                m_formatForm.setRatioButton(false, true, null);
            }
            m_ratioLocked = true;
        }
        // enabling/disabling height and width input
        m_formatForm.setHeightInputEnabled(m_currentFormat.isHeightEditable() || hasUserFormatRestriction());
        m_formatForm.setWidthInputEnabled(m_currentFormat.isWidthEditable() || hasUserFormatRestriction());
    }
830352
public void putFloat(String key, float value) {
		sharedPreferences.edit().putFloat(key, value).commit();
	}
16002
void adjustScroll() {

        iTreeHeight = iRowHeight * (iRowCount + 1);

        // correct would be iMaxTextLength + iMaxIndent*iIndentWidth
        iTreeWidth = iMaxTextLength * 2;

        sbHoriz.setValues(iX, iWidth, 0, iTreeWidth);

        int v = iY / iRowHeight,
            h = iHeight / iRowHeight;

        sbVert.setValues(v, h, 0, iRowCount + 1);

        iX = sbHoriz.getValue();
        iY = iRowHeight * sbVert.getValue();
    }
449613
def _update_display(self, event=None):
        """"""
        try:
            if self._showvalue:
                self.display_value(self.scale.get())
            if self._tickinterval:
                self.place_ticks()
        except IndexError:
            # happens when configure is called during a orientation change
            # because self.ticks is empty
            pass
49599
def add_floatspin(self, setting):
        ''''''
        from wx.lib.agw.floatspin import FloatSpin

        tab = self.panel(setting.tab)
        default = setting.value
        (minv, maxv) = setting.range
        ctrl = FloatSpin(tab, -1,
                         value = default,
                         min_val = minv,
                         max_val = maxv,
                         increment = setting.increment)
        if setting.format is not None:
            ctrl.SetFormat(setting.format)
        if setting.digits is not None:
            ctrl.SetDigits(setting.digits)
        self._add_input(setting, ctrl, value=default)
1323331
public void setCompactMode(int mode) {

        switch (mode) {
            case COMPACT_MODE_FIRST_COLUMN:
                m_compacteModeStyle.setValue(formCss().firstColumn());
                break;
            case COMPACT_MODE_SECOND_COLUMN:
                m_compacteModeStyle.setValue(formCss().secondColumn());
                break;
            case COMPACT_MODE_NESTED:
                m_compacteModeStyle.setValue(formCss().compactView());
                break;
            case COMPACT_MODE_SINGLE_LINE:
                m_compacteModeStyle.setValue(formCss().singleLine());
                break;
            default:

        }
        updateWidth();
    }
563725
def setCurrentMode( self, mode ):
        
        if ( mode == self._currentMode ):
            return
            
        self._currentMode = mode
        
        ajax = mode == XLoaderWidget.Mode.Spinner
        self._movieLabel.setVisible(ajax)
        self._primaryProgressBar.setVisible(not ajax)
        self._subProgressBar.setVisible(not ajax and self._showSubProgress)
885725
def setCurrentMode( self, mode ):
        
        self.scene().setCurrentMode(mode)
        self.scene().setSceneRect(0, 0, self.width() - 5, self.height() - 5)
        if ( not self.signalsBlocked() ):
            self.currentModeChanged.emit(mode)
465675
def move(self, x, y):
        """"""
        SetWindowPos(self._hwnd, None, x, y, 0, 0, SWP_NOSIZE)
866166
def set_position(self, position):
        """"""
        if position < 0:
            position += len(self.checkdefs)
        while position >= len(self.checkdefs):
            self.checkdefs.append(([], []))
        self.position = position
674070
def option_changed(self, option, value):
        """"""
        setattr(self, to_text_string(option), value)
        self.shellwidget.set_namespace_view_settings()
        if self.setup_in_progress is False:
            self.sig_option_changed.emit(option, value)
1215491
public void setFloat(String key, float value) {
        prefHelper_.prefsEditor_.putFloat(key, value);
        prefHelper_.prefsEditor_.apply();
    }