📄 infopage.java
字号:
/**
*
* COPYRIGHT All rights reserved Sony Ericsson Mobile Communications AB 2004.
*
* The software is the copyrighted work of Sony Ericsson Mobile Communications AB.
* The use of the software is subject to the terms of the end-user license agreement which
* accompanies or is included with the software. The software is provided "as is" and Sony Ericsson
* specifically disclaim any warranty or condition whatsoever regarding merchantability or fitness for
* a specific purpose, title or non-infringement. No warranty of any kind is made in relation to the condition,
* suitability, availability, accuracy, reliability, merchantability and/or non-infringement of the software provided herein
*
*/
package com.sonyericsson.javatest.mobile3d;
import java.util.Enumeration;
import java.util.Hashtable;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Item;
import javax.microedition.m3g.Graphics3D;
/**
* Class for displaying information page.
*
* Page contains benchmark result and information about 3D features.
*
* @author 23048018
*
*/
public class InfoPage extends Form implements CommandListener {
/**
* Creat page with information
* @param title Title for page
*/
public InfoPage(String title) {
super(title);
append("Average FPS: " + Mobile3D.getInstance().getAverageFpsString() + "\r\n");
append("\r\n" + "3D device capabilities: " + "\r\n");
Hashtable props = getSystemInformation();
for (Enumeration e = props.keys(); e.hasMoreElements();) {
Object el = e.nextElement();
append(el.toString() + ": " + props.get(el).toString() + "\r\n");
}
addCommand(exitCommand);
setCommandListener(this);
}
private Command exitCommand = new Command("Return", Command.EXIT, 1);
/**
* listen to keyboard commands
*/
public void commandAction(Command c, Displayable s) {
if (c == exitCommand) {
DemoBase.displayMenu();
}
}
/**
* create hashtable with graphics3d information
* @return
*/
public Hashtable getSystemInformation() {
Hashtable props = Graphics3D.getProperties();
return props;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -