All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.harium.etyl.awt.core.FullScreenHelper Maven / Gradle / Ivy

package com.harium.etyl.awt.core;

import com.harium.etyl.awt.FullScreenWindow;
import com.harium.etyl.core.Core;
import com.harium.etyl.core.graphics.Monitor;

import java.awt.*;

public class FullScreenHelper {

	public static FullScreenWindow enableFullScreen(Core core, Monitor selectedMonitor) {
		GraphicsDevice gd = selectedMonitor.getDevice();
		
		FullScreenWindow frame = new FullScreenWindow(core, selectedMonitor);

		gd.setFullScreenWindow(frame);
		frame.setVisible(true);

		return frame;
	}

	public static void disableFullScreen() {
		GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
		GraphicsDevice gs = ge.getDefaultScreenDevice();

		gs.setFullScreenWindow(null);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy