Use presets for length of the window.
509323
def X_length(self, new_window_length):
        """"""
        self.parent.value('window_length', new_window_length)
        self.parent.overview.update_position()
1061143
def set_bin_window(self, bin_size=None, window_size=None):
        """"""
        bin_size = bin_size or self.bin_size
        window_size = window_size or self.window_size
        assert 1e-6 < bin_size < 1e3
        assert 1e-6 < window_size < 1e3
        assert bin_size < window_size
        self.bin_size = bin_size
        self.window_size = window_size
        # Set the status message.
        b, w = self.bin_size * 1000, self.window_size * 1000
        self.set_status('Bin: {:.1f} ms. Window: {:.1f} ms.'.format(b, w))
1173310
def _(pymux, variables):
    "  "
    w = pymux.arrangement.get_previous_active_window()

    if w:
        pymux.arrangement.set_active_window(w)
1303824
def _on_move(self, event):
        """"""
        w = self.winfo_width()
        x = min(max(event.x, 0), w)
        self.coords('cursor', x, 0, x, self.winfo_height())
        self._variable.set(round2((360. * x) / w))
350796
function(jRef, bWidth, iValue, fDoBefore, fDoAfter){
		if (fDoBefore) {
			var iVal = fDoBefore(jRef);
			if (iVal != undefined) {
				iValue = iVal;
			}
		}
		var _fDoAfter = fDoAfter ? function(){fDoAfter(jRef);} : function(){};
		if (jQuery.fx.off) {
			if (bWidth) {
				jRef.width(iValue);
			} else {
				jRef.height(iValue);
			}
			_fDoAfter();
		} else {
			var oParam = bWidth ? {width: iValue} : {height: iValue};
			jRef.stop(true, true).animate(oParam, 200, 'linear', _fDoAfter);
		}
	}
786182
def setSectionLength(self, length):
        
        self._sectionLength = length
        for editor in self.editors():
            editor.setMaxLength(length)
1165180
function adjustHeight() {
        var windowHeight = $(window).height();
        var headerHeight = $("#main-nav").height();
        var containerHeight = windowHeight - headerHeight;
        $("#main").css("min-height", "" + containerHeight + "px");
    }
340057
def _compute_window_size(self):
        """"""
        self._neighbors_on_each_side = int(len(self.x) * self._span) // 2
        self.window_size = self._neighbors_on_each_side * 2 + 1
        if self.window_size <= 1:
            # cannot do averaging with 1 point in window. Force >=2
            self.window_size = 2
686710
def set_window_settings(self, hexstate, window_size, prefs_dialog_size,
                            pos, is_maximized, is_fullscreen):
        """"""
        self.setUpdatesEnabled(False)
        self.window_size = QSize(window_size[0], window_size[1]) # width,height
        self.prefs_dialog_size = QSize(prefs_dialog_size[0],
                                       prefs_dialog_size[1]) # width,height
        self.window_position = QPoint(pos[0], pos[1]) # x,y
        self.setWindowState(Qt.WindowNoState)
        self.resize(self.window_size)
        self.move(self.window_position)

        # Window layout
        if hexstate:
            self.restoreState( QByteArray().fromHex(
                    str(hexstate).encode('utf-8')) )
            # [Workaround for Issue 880]
            # QDockWidget objects are not painted if restored as floating
            # windows, so we must dock them before showing the mainwindow.
            for widget in self.children():
                if isinstance(widget, QDockWidget) and widget.isFloating():
                    self.floating_dockwidgets.append(widget)
                    widget.setFloating(False)

        # Is fullscreen?
        if is_fullscreen:
            self.setWindowState(Qt.WindowFullScreen)
        self.__update_fullscreen_action()

        # Is maximized?
        if is_fullscreen:
            self.maximized_flag = is_maximized
        elif is_maximized:
            self.setWindowState(Qt.WindowMaximized)
        self.setUpdatesEnabled(True)
975008
def _set_windows(self, ticks, bars):
        
        self.tick_window = ticks
        self.bar_window = bars
1034524
def _update_values_in_window(self):
        """"""
        window_bound_upper = self._window_bound_lower + self.window_size
        self._x_in_window = self.x[self._window_bound_lower:window_bound_upper]
        self._y_in_window = self.y[self._window_bound_lower:window_bound_upper]
1346314
def set_desired_size(self, width, height):
        """"""
        self._desired_size = (width, height)
        if not self._imgwin_set:
            self.set_window_size(width, height)
1099647
def __configure_canvas(self, *args):
        
        if self.interior.winfo_reqwidth() is not self._canvas.winfo_width():
            self._canvas.configure(width=self.interior.winfo_reqwidth())
445383
public void setExtent( Window win ) {
        w = win.getWest();
        e = win.getEast();
        n = win.getNorth();
        s = win.getSouth();
        rows = win.getRows();
        cols = win.getCols();
        fixResolution();
        fixRowsAndCols();
    }
1354543
def X_more(self):
        """"""
        if self.parent.value('window_length') < 0.3:
            return
        self.parent.value('window_length',
                          self.parent.value('window_length') * 2)
        self.parent.overview.update_position()
732609
def _set_properties(self):
        """"""

        title = _("CSV Import: {filepath}").format(filepath=self.csvfilename)
        self.SetTitle(title)
        self.SetSize((600, 600))

        for button in [self.button_cancel, self.button_ok]:
            button.SetMinSize((80, 28))
554389
def pre_render(self):
        """"""
        self.add_styles()
        self.add_scripts()
        self.root.set(
            'viewBox', '0 0 %d %d' % (self.graph.width, self.graph.height)
        )
        if self.graph.explicit_size:
            self.root.set('width', str(self.graph.width))
            self.root.set('height', str(self.graph.height))