Graphics3DProperties.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- import java.util.Enumeration;
- import java.util.Hashtable;
- import javax.microedition.lcdui.*;
- import javax.microedition.m3g.*;
- class Graphics3DProperties extends List implements CommandListener
- {
- private final Maze3DMIDlet midlet;
- Graphics3DProperties(Graphics3D g3d, Maze3DMIDlet midlet)
- {
- super("Graphics 3D Properties", List.IMPLICIT);
- this.midlet = midlet;
- Hashtable props = g3d.getProperties();
- Enumeration propKeys = props.keys();
- while (propKeys.hasMoreElements())
- {
- Object key = propKeys.nextElement();
- append(key.toString() + ": " + props.get(key).toString(), null);
- }
- // some entries are too long
- setFitPolicy(List.TEXT_WRAP_ON);
- addCommand(new Command("Back", Command.BACK, 1));
- setCommandListener(this);
- }
- public void commandAction(Command command, Displayable displayable)
- {
- midlet.showMenu();
- }
- }