Toggle full screen.

@param frame
the frame
350961
public static void toggleFullScreen(@NonNull JFrame frame)
	{
		GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
		frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
		if (frame.equals(device.getFullScreenWindow()))
		{
			device.setFullScreenWindow(null);
		}
		else
		{
			frame.setVisible(true);
			device.setFullScreenWindow(frame);
		}
	}
913587
def setFullscreen(self, fullscreen):
        """"""
        if not fullscreen:
            self.ckBox_fullscreen.setChecked(False)
            self.parent().showNormal()
        else:
            self.ckBox_fullscreen.setChecked(True)
            self.parent().showFullScreen()
727487
function onFullscreenClick() {
		if (requestFullscreen) {
			if (player === fullscreenElement()) {
				// exit fullscreen
				exitFullscreen().call(document);
			} else {
				// enter fullscreen
				requestFullscreen.call(player);

				// maintain focus in internet explorer
				self.fullscreen.focus();

				// maintain focus in safari
				setTimeout(() => {
					self.fullscreen.focus();
				}, 200);
			}
		} else if (media.webkitSupportsFullscreen) {
			// iOS allows fullscreen of the video itself
			if (media.webkitDisplayingFullscreen) {
				// exit ios fullscreen
				media.webkitExitFullscreen();
			} else {
				// enter ios fullscreen
				media.webkitEnterFullscreen();
			}

			onFullscreenChange();
		}
	}
67792
function (/* event */) {
        if (!me.device.isFullscreen) {
            me.device.requestFullscreen();
        } else {
            me.device.exitFullscreen();
        }
        return false;
    }
172362
private void initializeFullscreenPreference() {
        Preference fullscreenPreference =
                findPreference(getString(R.string.fullscreen_preference_key));
        fullscreenPreference.setOnPreferenceChangeListener(createThemeChangeListener());
    }
997601
public static boolean isActivityFullscreen(Activity activity)
    {
        WindowManager.LayoutParams attrs = activity.getWindow().getAttributes();
        if ((attrs.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == WindowManager.LayoutParams.FLAG_FULLSCREEN)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
1049593
def toggle_full_screen(self, *args):
        

        LOGGER.debug("> Toggling FullScreen state.")

        if self.is_full_screen():
            self.setUnifiedTitleAndToolBarOnMac(True)
            self.set_visual_style(full_screen_style=False)
            self.showNormal()
            # TODO: Remove hack that ensure toolBar is repainted.
            platform.system() == "Darwin" and self.resize(self.size().width() + 1, self.size().height() + 1)
        else:
            self.setUnifiedTitleAndToolBarOnMac(False)
            self.set_visual_style(full_screen_style=True)
            self.showFullScreen()
        return True
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);
	}
1230350
function fullscreenchange () {
		var newEvent = document.createEvent('CustomEvent');
		newEvent.initCustomEvent('fullscreenchange', true, false, null);
		// TODO: Any need for variable copy?
		document.dispatchEvent(newEvent);
	}
1323146
@Override
    public void loadFullScreenImage(ImageView iv, String imageUrl, int width, LinearLayout bglinearLayout) {
        fullScreenImageLoader.loadFullScreenImage(iv, imageUrl, width, bglinearLayout);
    }
52437
static void setFramePositon(JFrame inTargetFrame) {

        Dimension d    = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension size = inTargetFrame.getSize();

        // (ulrivo): full size on screen with less than 640 width
        if (d.width >= 640) {
            inTargetFrame.setLocation((d.width - size.width) / 2,
                                      (d.height - size.height) / 2);
        } else {
            inTargetFrame.setLocation(0, 0);
            inTargetFrame.setSize(d);
        }
    }
1262985
public void closeWindow(boolean keepFrame) {

        if (m_window != null) {
            m_keepFrameOnClose = keepFrame;
            m_window.close();
            m_window = null;
        }
    }
382067
public MaterializeBuilder withFullscreen(boolean fullscreen) {
        this.mFullscreen = fullscreen;

        if (fullscreen) {
            withTranslucentNavigationBarProgrammatically(true);
            withTintedStatusBar(false);
            withTintedNavigationBar(false);
        }

        return this;
    }
1373749
public synchronized void setManualFramingRect(int width, int height) {
    if (initialized) {
      Point screenResolution = configManager.getScreenResolution();
      if (width > screenResolution.x) {
        width = screenResolution.x;
      }
      if (height > screenResolution.y) {
        height = screenResolution.y;
      }
      int leftOffset = (screenResolution.x - width) / 2;
      int topOffset = (screenResolution.y - height) / 2;
      framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height);
      Log.d(TAG, "Calculated manual framing rect: " + framingRect);
      framingRectInPreview = null;
    } else {
      requestedFramingRectWidth = width;
      requestedFramingRectHeight = height;
    }
  }
584082
public void selectFrame() {
        String cantSelect = "Unable to focus on frame ";
        String action = "Focusing on frame " + prettyOutput();
        String expected = "Frame " + prettyOutput() + " is present, displayed, and focused";
        try {
            // wait for element to be present
            if (isNotPresent(action, expected, cantSelect)) {
                return;
            }
            // wait for element to be displayed
            if (isNotDisplayed(action, expected, cantSelect)) {
                return;
            }
            // select the actual frame
            WebElement webElement = getWebElement();
            driver.switchTo().frame(webElement);
        } catch (Exception e) {
            log.warn(e);
            reporter.fail(action, expected, cantSelect + prettyOutputEnd() + e.getMessage());
            return;
        }
        reporter.pass(action, expected, "Focused on frame " + prettyOutputEnd().trim());
    }
538087
def _toggle_pane(self, pane):
        

        if pane.IsShown():
            pane.Hide()
        else:
            pane.Show()

        self.main_window._mgr.Update()
916798
def fullscreen(self):
        ''' 
        '''
        stream = self._stream
        stream.write(self.alt_screen_enable)
        stream.write(str(self.save_title(0)))     # 0 = both icon, title
        stream.flush()
        try:
            yield self
        finally:
            stream.write(self.alt_screen_disable)
            stream.write(str(self.restore_title(0)))  # 0 = icon & title
            stream.flush()