本文整理汇总了Java中javax.microedition.lcdui.TextBox类的典型用法代码示例。如果您正苦于以下问题:Java TextBox类的具体用法?Java TextBox怎么用?Java TextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextBox类属于javax.microedition.lcdui包,在下文中一共展示了TextBox类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: editString
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
/**
* @inheritDoc
*/
public void editString(Component cmp, int maxSize, int constraint, String text, int keyCode) {
UIManager m = UIManager.getInstance();
CONFIRM_COMMAND = new Command(m.localize("ok", "OK"), Command.OK, 1);
CANCEL_COMMAND = new Command(m.localize("cancel", "Cancel"), Command.CANCEL, 2);
if(mid.getAppProperty("forceBackCommand") != null) {
canvas.addCommand(MIDP_BACK_COMMAND);
}
currentTextBox = new TextBox("", "", maxSize, TextArea.ANY);
currentTextBox.setCommandListener((CommandListener)canvas);
currentTextBox.addCommand(CONFIRM_COMMAND);
currentTextBox.addCommand(CANCEL_COMMAND);
currentTextComponent = cmp;
currentTextBox.setMaxSize(maxSize);
currentTextBox.setString(text);
currentTextBox.setConstraints(constraint);
display.setCurrent(currentTextBox);
((C)canvas).setDone(false);
Display.getInstance().invokeAndBlock(((C)canvas));
}
开发者ID:codenameone,项目名称:CodenameOne,代码行数:23,代码来源:GameCanvasImplementation.java
示例2: createLoggingTextBox
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
private TextBox createLoggingTextBox() {
TextBox box = new TextBox(Localization.get("message.log"), null, 1000,
TextField.UNEDITABLE);
box.addCommand(FormTransportCommands.CMD_BACK);
return box;
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:8,代码来源:FormTransportViews.java
示例3: showReplyView
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
/**
* Show the 'Reply' view (a full-screen TextBox).
*/
private void showReplyView() {
final Command cancelCommand = new Command("Cancel", Command.BACK, 0);
final Command sendCommand = new Command("Send", Command.OK, 0);
replyView = new TextBox("Reply", null, 2000, TextField.ANY);
replyView.addCommand(cancelCommand);
replyView.addCommand(sendCommand);
replyView.setCommandListener(new CommandListener() {
public void commandAction(Command command, Displayable d) {
// Cancel and return back to previous view
if (command == cancelCommand) {
setDisplay(self);
}
// Submit command
else if (command == sendCommand) {
String modhash = session.getModhash();
replyOperation = new CommentPostOperation(
item.getName(),
replyView.getString(),
modhash,
(PostCommentListener) self
);
replyOperation.start();
}
}
});
setDisplay(replyView);
}
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:33,代码来源:CommentDetailsView.java
示例4: ArchiveList
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
/** Creates a new instance of ArchiveList
* @param caretPos
* @param where
* @param t
*/
public ArchiveList(int caretPos, int where, TextBox t) {
super(new Vector());
this.where = where;
this.caretPos = caretPos;
this.t = t;
archive = new MessageArchive(where);
mainbar = new MainBar((where == 1) ? SR.MS_ARCHIVE : SR.MS_TEMPLATE);
mainbar.addElement(null);
mainbar.addRAlign();
mainbar.addElement(null);
mainbar.addElement(SR.MS_FREE /*"free "*/);
}
开发者ID:BombusMod,项目名称:BombusMod,代码行数:18,代码来源:ArchiveList.java
示例5: AndroidTextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public AndroidTextBoxUI(final MicroEmulatorActivity activity, final TextBox textBox) {
super(activity, textBox, true);
activity.post(new Runnable() {
public void run() {
view = createMainView();
}
});
}
开发者ID:BombusMod,项目名称:BombusMod,代码行数:9,代码来源:AndroidTextBoxUI.java
示例6: createMainView
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
private LinearLayout createMainView() {
final TextBox textBox = getTextBox();
titleView = new TextView(activity);
titleView.setText(textBox.getTitle());
commandGrid = new TableLayout(activity);
editView = createEditor(activity, textBox);
editView.setGravity(Gravity.TOP);
//editView.setScroller(new Scroller(activity));
//editView.setMovementMethod(new ScrollingMovementMethod());
titleView.setId(2);
editView.setId(3);
commandGrid.setId(4);
initCommands();
RelativeLayout layout = new RelativeLayout(activity);
layout.addView(editView, set(create(RelativeLayout.LayoutParams.FILL_PARENT),
RelativeLayout.ABOVE, commandGrid.getId()));
layout.addView(commandGrid, set(create(RelativeLayout.LayoutParams.WRAP_CONTENT),
RelativeLayout.ALIGN_PARENT_BOTTOM));
LinearLayout all = new LinearLayout(activity);
all.setOrientation(LinearLayout.VERTICAL);
all.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT));
all.addView(titleView, createLinear(LinearLayout.LayoutParams.WRAP_CONTENT));
all.addView(layout, createLinear(LinearLayout.LayoutParams.FILL_PARENT));
return all;
}
开发者ID:BombusMod,项目名称:BombusMod,代码行数:32,代码来源:AndroidTextBoxUI.java
示例7: createLogPanel
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
/**
* Create a simple text area where publications are displayed as they arrive.
*/
public void createLogPanel() {
if ( logPanel == null ) {
TextBox t = new TextBox("Log:", null, 128, TextField.ANY );
t.addCommand( cancel );
t.setCommandListener(this);
logPanel = t;
}
}
开发者ID:gulliverrr,项目名称:hestia-engine-dev,代码行数:14,代码来源:IA92.java
示例8: createTextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public TextBoxUI createTextBoxUI(TextBox textBox) {
return new AndroidTextBoxUI(activity, textBox);
}
开发者ID:Helltar,项目名称:AMPASIDE,代码行数:4,代码来源:AndroidDevice.java
示例9: createTextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public TextBoxUI createTextBoxUI(TextBox textBox) {
return new SwtTextBoxUI(textBox);
}
开发者ID:freeVM,项目名称:freeVM,代码行数:4,代码来源:SwtDevice.java
示例10: SwtTextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public SwtTextBoxUI(TextBox textBox) {
}
开发者ID:freeVM,项目名称:freeVM,代码行数:3,代码来源:SwtTextBoxUI.java
示例11: createTextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public TextBoxUI createTextBoxUI(TextBox textBox) {
return new J2SETextBoxUI(textBox);
}
开发者ID:freeVM,项目名称:freeVM,代码行数:4,代码来源:J2SEDevice.java
示例12: J2SETextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public J2SETextBoxUI(TextBox textBox) {
}
开发者ID:freeVM,项目名称:freeVM,代码行数:3,代码来源:J2SETextBoxUI.java
示例13: getTextBox
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
private TextBox getTextBox() {
return (TextBox) displayable;
}
开发者ID:BombusMod,项目名称:BombusMod,代码行数:4,代码来源:AndroidTextBoxUI.java
示例14: initGui
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
protected void initGui() {
exitCommand = new Command("Cancel", Command.EXIT, 0);
okCommand = new Command("OK", Command.OK, 1);
textBox = new TextBox("Comcraft", textBoxString, maxLength, textFieldType);
textBox.addCommand(okCommand);
textBox.addCommand(exitCommand);
textBox.setCommandListener(this);
cc.comcraftMIDlet.display.setCurrent(textBox);
}
开发者ID:queader,项目名称:Comcraft,代码行数:14,代码来源:GuiTextBox.java
示例15: MIDPTextBox
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
public MIDPTextBox(String mainbar, String text, TextBoxNotify tbn, int constraints) {
t=new TextBox(mainbar, text, 150, constraints);
this.tbn=tbn;
t.addCommand(cmdOK);
t.addCommand(cmdCancel);
t.setCommandListener(this);
midlet.BombusMod.getInstance().setDisplayable(t);
}
开发者ID:BombusMod,项目名称:BombusMod,代码行数:13,代码来源:MIDPTextBox.java
示例16: createTextBoxUI
import javax.microedition.lcdui.TextBox; //导入依赖的package包/类
TextBoxUI createTextBoxUI(TextBox textBox);
开发者ID:BombusMod,项目名称:BombusMod,代码行数:2,代码来源:UIFactory.java
注:本文中的javax.microedition.lcdui.TextBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论