FullScreenHacks
Search:
BigScreens / FullScreenHacks

Present Mode in Eclipse

In Processing, running a sketch fullscreen was easy. All you needed to do is select "Present Mode." The same is true in Eclipse, you can add the "present" argument to the main function:

	static public void main(String args[]) {
		PApplet.main(new String[] { "--present","--exclusive","packagepath.YourClassName"});
	}

Once this code is added, you can select RUN AS --> APPLICATION.

Dual Monitor FullScreen

Present mode will now work at IAC so you don't need to do any of the following! Leaving it here just for documentation purposes


	public void init(){
		frame.removeNotify();
		frame.setUndecorated(true);
		frame.addNotify();
		super.init();
	}

	public void setup(){
		size(2720,768);
	}

This takes off the menu bar. In draw(), you then position the frame at location (0,0) so that it covers the entire screen.

	public void draw() {
		// Must set the location each time in draw()
		frame.setLocation(0,0);
	}

You may have to make sure you turn off the dock (on a Mac) or the taskbar (on Windows).

Getting rid of the top menu bar (this is only a problem on a Mac)

Once you have followed the above steps, you'll have a nice dual-monitor fullscreen Processing application. There's one problem, that nasty top menu bar is still there. To get rid of this, follow these steps:

  1. Export to application. In Eclipse, right-click on your main class (i.e. the Java class that extends PApplet), and select: EXPORT. Under "OTHER" select "Mac OS X Application Bundle." Under JVM Options, make sure you select Java 1.5+ (not 1.5*). Under "Destination" pick a folder. Click finish. Go ahead and find the application. You should be able to double-click and run it.
  2. Now, find your application again. Right-click on it and select "Show Package Contents." In the "Contents" folder there should be a file called info.plist. This is the file you want to edit. Right-click on info.plist and select "Open With pList Editor." (if you don't have anything to edit it with go and download pList Editor Pro)
  3. Once you had the file open, you will want to "Add a new child." Click the "New Child" button on the top left. Enter the child with the following info:
    • Name: LSUIPresentationMode
    • Class: Number
    • Value: 4
  4. Save the info.plist file and run the application again. You'll see the menu bar has disappeared!

NOTE TO SELF, INVESTIGATE:

System.setProperty ("apple.awt.fakefullscreen","true"); //removes the menu bar for "soft" fullscreen
System.setProperty ("apple.awt.fullscreencapturealldisplays", "false");  //only goes full screen on one monitor if doing real fullscreen. may not be compatible on some cards.
Search
  Page last modified on October 10, 2012, at 09:53 AM