本文整理汇总了Java中javax.microedition.lcdui.Command.ITEM属性的典型用法代码示例。如果您正苦于以下问题:Java Command.ITEM属性的具体用法?Java Command.ITEM怎么用?Java Command.ITEM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.microedition.lcdui.Command
的用法示例。
在下文中一共展示了Command.ITEM属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LogGui
public LogGui(){
super("Log");
// The log menu Commands
showExceptionLog = new Command("Exception log", Command.ITEM, 4);
showConnectionLog = new Command("Connection log", Command.ITEM, 4);
showDataPackageLog = new Command("Data package log", Command.ITEM, 4);
showDebugLog = new Command("Debug log", Command.ITEM, 4);
displayLog = new Command("Full log", Command.ITEM, 1);
hide = new Command("Hide log", Command.OK, 0);
exit = new Command("Exit", Command.EXIT,0);
addCommand(showExceptionLog);
addCommand(showDataPackageLog);
addCommand(showConnectionLog);
addCommand(showDebugLog);
addCommand(displayLog);
addCommand(hide);
addCommand(exit);
}
示例2: SendGui
/**
*
* Constructor
*/
public SendGui(){
super("Write a message");
// Creating the Commands
sendTextPackage = new Command("Send",Command.ITEM,1);
displayLog = new Command("View log",Command.ITEM,4);
exit = new Command("Exit", Command.EXIT,0);
search = new Command("Search", Command.OK, 1);
input = new TextField("Message","",200,TextField.ANY);
// The ChoiceGroup containing the connected Nodes
connectedNodes = new ChoiceGroup("Choose recipients", Choice.MULTIPLE);
// Adding the elements
addCommand(sendTextPackage);
addCommand(displayLog);
addCommand(exit);
addCommand (search) ;
append(connectedNodes);
append(input);
}
示例3: ConnectGui
/**
*
* Constructor
*/
public ConnectGui(){
super("Nodes");
// The ChoiceGroup
nodes = new ChoiceGroup("Choose the node(s) to connect to",Choice.MULTIPLE);
nodeAddressList = new Hashtable();
// The Commands
back = new Command("Back",Command.BACK,1);
displayLog = new Command("Display log",Command.ITEM,4);
connect = new Command("Connect",Command.ITEM,0);
exit = new Command("Exit", Command.EXIT,0);
addCommand(back);
addCommand(connect);
addCommand(displayLog);
addCommand(exit);
// Adds the ChoiceGroup
append(nodes);
}