当前位置: 首页>>代码示例>>Java>>正文


Java Display.getDisplay方法代码示例

本文整理汇总了Java中javax.microedition.lcdui.Display.getDisplay方法的典型用法代码示例。如果您正苦于以下问题:Java Display.getDisplay方法的具体用法?Java Display.getDisplay怎么用?Java Display.getDisplay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.microedition.lcdui.Display的用法示例。


在下文中一共展示了Display.getDisplay方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDisplayEventHandler

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
/**
 * Return a reference to the singleton display manager object.
 *
 * @param token security token with the MIDP permission "allowed"
 *
 * @return display manager reference.
 */
public static DisplayEventHandler
        getDisplayEventHandler(SecurityToken token) {

    token.checkIfPermissionAllowed(Permissions.MIDP);

    if (managerImpl != null) {
        return managerImpl;
    }

    /**
     * The display manager implementation is a private class of Display
     * and is create in the class init of Display, we need to call a
     * static method of display to get the class init to run, because
     * some classes need to get the display manager to create a display
     */
    try {
        // this will yield a null pointer exception on purpose
        Display.getDisplay(null);
    } catch (NullPointerException npe) {
        // this is normal for this case, do nothing
    }

    return managerImpl;
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:32,代码来源:DisplayEventHandlerFactory.java

示例2: runBenchmark

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
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) {}
  }
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:22,代码来源:SocketStressBench.java

示例3: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
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) {}
    }
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:23,代码来源:FileStressBench.java

示例4: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
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();
	}
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:18,代码来源:Cottage360.java

示例5: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
protected void startApp() throws MIDletStateChangeException {
	// TODO Auto-generated method stub
	display=Display.getDisplay(this);
	list.append("����Ϸ", null);
	list.append("�������", null);
	list.append("��Ϸ˵��", null);
	list.addCommand(cmd_ok);
	list.addCommand(cmd_back);
	list.setCommandListener(this);
	display.setCurrent(list);
	predisplay=display.getCurrent();	//��ʼ��ǰһ����ʾ
	form=new Form("");
	form.addCommand(cmd_back);
	form.addCommand(cmd_ok);
}
 
开发者ID:cabbage89,项目名称:danceGame,代码行数:16,代码来源:Main.java

示例6: BlogWriter

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
public BlogWriter() {
    this.display = Display.getDisplay(this);
    // Crate login screen
    this.loginScreen = new LoginScreen(this.display);
    this.loginScreen.setParent(this);
    // Activate login screen
    this.display.setCurrent(this.loginScreen);
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:9,代码来源:BlogWriter.java

示例7: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
public void startApp() {
    if (display != null) {
        return;
    }

    self = this;
    display = Display.getDisplay(this);

    showLinksView(session.getCategory());
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:11,代码来源:Main.java

示例8: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
protected void startApp() throws MIDletStateChangeException {
	this.recordButton = new StringItem(null, "Start", Item.BUTTON);
	Command toggleRecordingCMD = new Command("Click", Command.ITEM, 1);
	this.recordButton.addCommand(toggleRecordingCMD);
	this.recordButton.setDefaultCommand(toggleRecordingCMD);
	this.recordButton.setItemCommandListener(this);

	this.form = new Form(null, new Item[] {
			new StringItem(null, "Audio Recorder"), this.recordButton });

	this.display = Display.getDisplay(this);
	this.display.setCurrent(this.form);
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:14,代码来源:AudioRecorder.java

示例9: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
/**
 * Mirror MIDlet.startApp(), should be called by your MIDlet startApp().
 */
public void startApp() {

	display = Display.getDisplay(host);

	remotedeviceui = new RemoteDeviceUI();
	remotedeviceui.showui();
}
 
开发者ID:cli,项目名称:worldmap-classic,代码行数:11,代码来源:BLUElet.java

示例10: MainMidlet

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
public MainMidlet() {
	display = Display.getDisplay(this);
	notesList = new NotesList(this);
}
 
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:5,代码来源:MainMidlet.java

示例11: Midlet

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
public Midlet(){
  display = Display.getDisplay(this);
  midlet = this;
}
 
开发者ID:NeiroNext,项目名称:JccAPV,代码行数:5,代码来源:Midlet.java

示例12: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
protected final void startApp() {
    midlet = this;
    display = Display.getDisplay(this);
    display.setCurrent(new PaintCanvas(listener, isLandscape));
}
 
开发者ID:aNNiMON,项目名称:JECP,代码行数:6,代码来源:Application.java

示例13: startApp

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
protected final void startApp() {
    display = Display.getDisplay(this);
    display.setCurrent(form);
    listener.onStartApp(this);
}
 
开发者ID:aNNiMON,项目名称:JECP,代码行数:6,代码来源:ConsoleApplication.java

示例14: initialize

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
/** Separate initialization function for convenience. */
public void initialize() {
	display = Display.getDisplay(mainApp);
	myCanvas = new GAFAView(this, display);
	display.setCurrent(myCanvas);
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:7,代码来源:GAFAControl.java

示例15: GAFAMidlet

import javax.microedition.lcdui.Display; //导入方法依赖的package包/类
/** Creates the midlet and initiates the display. */
public GAFAMidlet() {
	display = Display.getDisplay(this);
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:5,代码来源:GAFAMidlet.java


注:本文中的javax.microedition.lcdui.Display.getDisplay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。