Centre this frame.
485649
public void centerFrame() {
		final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		final Dimension frameSize = this.getSize();
		if (frameSize.height > screenSize.height) {
			frameSize.height = screenSize.height;
		}
		if (frameSize.width > screenSize.width) {
			frameSize.width = screenSize.width;
		}
	    this.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
	}
1126194
def center(self):
        '''
        
        '''
        try:
            return self._center
        except AttributeError:
            pass
        self._center = Point()
        return self._center
469452
function adaptFrame2HeaderPosition(oldHeaderPos) {
        var position, frame, header;

        frame = W.getFrame();
        if (!frame) return;

        header = W.getHeader();

        // If no header is found, simulate the 'top' position
        // to better fit the whole screen.
        position = W.headerPosition || 'top';

        // When we move from bottom to any other configuration,
        // we need to move the header before the frame.
        if (oldHeaderPos === 'bottom' && position !== 'bottom') {
            W.getFrameRoot().insertBefore(W.headerElement, frame);
        }

        W.removeClass(frame, 'ng_mainframe-header-[a-z-]*');
        switch(position) {
        case 'right':
            W.addClass(frame, 'ng_mainframe-header-vertical-r');
            break;
        case 'left':
            W.addClass(frame, 'ng_mainframe-header-vertical-l');
            break;
        case 'top':
            W.addClass(frame, 'ng_mainframe-header-horizontal-t');
            if (header) W.getFrameRoot().insertBefore(header, frame);
            break;
        case 'bottom':
            W.addClass(frame, 'ng_mainframe-header-horizontal-b');
            if (header) {
                W.getFrameRoot().insertBefore(header, frame.nextSibling);
            }
            break;
        }
    }
334061
def center(self):
        """"""
        image_center = Point(self.width / 2, self.height / 2)
        return self.to_world(image_center)
676709
public boolean centerWindow () {
		Group parent = getParent();
		if (parent == null) {
			centerOnAdd = true;
			return false;
		} else {
			moveToCenter();
			return true;
		}
	}
1219742
def centerOn(self, point):
        
        rect = self.rect()
        x = point.x() - rect.width() / 2.0
        y = point.y() - rect.height() / 2.0
        
        self.setPos(x, y)
1125892
def get_center_offset(self):
        
        return (-self.view_rect.centerx + self._half_width,
                -self.view_rect.centery + self._half_height)
1360086
def fix(self, with_margin=True):
        """"""
        if not self.width:
            self.xmax = self.xmin + 1
        if not self.height:
            self.ymin /= 2
            self.ymax += self.ymin
        xmargin = self.margin * self.width
        self.xmin -= xmargin
        self.xmax += xmargin
        if with_margin:
            ymargin = self.margin * self.height
            self.ymin -= ymargin
            self.ymax += ymargin
388972
def center_middle(r, window_size):
  
  res = copy.copy(r)
  mid = res.start + (len(res) / 2)
  res.start = mid - (window_size / 2)
  res.end = res.start + window_size
  return res
1140803
def center_image(self, img):
        """"""
        img.anchor_x = img.width // 2 # int
        img.anchor_y = img.height // 2
498220
def setCenter(self, loc):
        
        offset = self.getCenter().getOffset(loc) # Calculate offset from current center
        return self.setLocation(self.getTopLeft().offset(offset)) # Move top left corner by the same offset
388321
function () {
		
		axisProto.setAxisSize.call(this);

		if (this.isRadial) {

			// Set the center array
			this.center = this.pane.center = Highcharts.CenteredSeriesMixin.getCenter.call(this.pane);

			// The sector is used in Axis.translate to compute the translation of reversed axis points (#2570)
			if (this.isCircular) {
				this.sector = this.endAngleRad - this.startAngleRad;	
			}
			
			// Axis len is used to lay out the ticks
			this.len = this.width = this.height = this.center[2] * pick(this.sector, 1) / 2;


		}
	}
970904
def _center(code, segment_dict):
    """"""
    while code in segment_dict:
        segment = segment_dict[code]
        yield segment
        code = segment.center
238173
def center_start(r, window_size):
  
  res = copy.copy(r)
  res.end = res.start + window_size / 2
  res.start = res.end - window_size
  return res
858300
def center_end(r, window_size):
  
  res = copy.copy(r)
  res.start = res.end - window_size / 2
  res.end = res.start + window_size
  return res
303715
function () {
        var self = this, settings = self.settings;

        self._super();

        if (!self.parent() && (settings.width || settings.height)) {
          self.initLayoutRect();
          self.repaint();
        }

        if (settings.autofocus) {
          self.focus();
        }
      }
1361570
def center(self):
        

        if np.all(np.isfinite(self.xyz)):
            return np.mean(self.xyz, axis=0)