Java Code Examples for javax.microedition.lcdui.Display#setCurrent()
The following examples show how to use
javax.microedition.lcdui.Display#setCurrent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SocketStressBench.java From pluotsorbet with GNU General Public License v2.0 | 6 votes |
void runBenchmark() { Display display = Display.getDisplay(this); BouncyColors bouncyColors = new BouncyColors(); display.setCurrent(bouncyColors); for (int i = 0; i < 16; i++) { Thread thread = new Thread(new Worker(), "T" + i); thread.setPriority(Thread.MIN_PRIORITY); thread.start(); } Thread current = Thread.currentThread(); current.setPriority(Thread.MAX_PRIORITY); while (true) { bouncyColors.repaint(); try { Thread.sleep(16); } catch (InterruptedException e) {} } }
Example 2
Source File: FileStressBench.java From pluotsorbet with GNU General Public License v2.0 | 6 votes |
public void startApp() { Display display = Display.getDisplay(this); BouncyColors bouncyColors = new BouncyColors(); display.setCurrent(bouncyColors); for (int i = 0; i < 16; i++) { Thread thread = new Thread(new Worker(), "T" + i); thread.setPriority(Thread.MIN_PRIORITY); thread.start(); } Thread current = Thread.currentThread(); current.setPriority(Thread.MAX_PRIORITY); while (true) { bouncyColors.repaint(); try { Thread.sleep(16); } catch (InterruptedException e) {} } }
Example 3
Source File: Cottage360.java From pluotsorbet with GNU General Public License v2.0 | 6 votes |
protected void startApp() throws MIDletStateChangeException { DeviceControl.setLights( 0, 100 ); Display disp = Display.getDisplay( this ); try { iCanvas = new PanoramaCanvas( Image.createImage(PHOTO_NAME), this ); disp.setCurrent( iCanvas ); iConnection = openAccelerationSensor(); if (iConnection != null) iConnection.setDataListener( this, BUFFER_SIZE ); } catch (IOException e) { e.printStackTrace(); } }