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


Java TextField.ANY属性代码示例

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


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

示例1: createView

public void createView() {

        //#if javarosa.usepolishlocalisation
        //setHint(Locale.get("hint.TypeOrScan"));
        //#else
        setHint("Type in your answer");
        //#endif

        //#style textBox
         tf = new TextField("", "", 200, TextField.ANY);
         if(qDef.instanceNode.required)
                tf.setLabel("*"+((QuestionDef)qDef.element).getLongText()); //visual symbol for required
                else
                    tf.setLabel(((QuestionDef)qDef.element).getLongText());
        this.append(tf);
        this.addNavigationButtons();
        if (((QuestionDef)qDef.element).getHelpText()!=null){
            setHint(((QuestionDef)qDef.element).getHelpText());
        }

    }
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:21,代码来源:BarcodeQuestionWidget.java

示例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);
}
 
开发者ID:meisamhe,项目名称:GPLshared,代码行数:25,代码来源:Peer2Messenger.java

示例3: RecordStoreForm

public RecordStoreForm() {
super("RecordStore");
addCommand(loadCommand);
addCommand(storeCommand);
addCommand(deleteCommand);
addCommand(listCommand);

textFiled = new TextField("Enter data", "", 128, TextField.ANY);
append(textFiled);

stringItem = new StringItem("Loaded data", "n/a");
append(stringItem);

messageItem = new StringItem("Info:", "Use menu to load and store data");
append(messageItem);
  }
 
开发者ID:freeVM,项目名称:freeVM,代码行数:16,代码来源:RecordStoreForm.java

示例4: setInputMethodListener

public void setInputMethodListener(InputMethodListener l)
{
	inputMethodListener = l;
       switch (l.getConstraints() & TextField.CONSTRAINT_MASK) {
        case TextField.ANY :
        case TextField.EMAILADDR :
        case TextField.URL :
            setInputMode(INPUT_ABC_LOWER);
            break;
        case TextField.NUMERIC :
        case TextField.PHONENUMBER :
        case TextField.DECIMAL :
            setInputMode(INPUT_123);
            break;
    }
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:16,代码来源:InputMethod.java

示例5: SubmitForm

/**
 * Constructor ErrorPrompt. 
 *
 * @param  parent  ...
 */
public SubmitForm(MIDlet parent, LSClient client, ErrorPrompt errorPrompt) {
    this.errorPrompt = errorPrompt; 
    this.client = client;
    
    messageListener = new SentListener();
    
    close = new Command("Back", Command.STOP, 2);
    send = new Command("Send", Command.OK, 1);
    
    sendForm = new Form("RoundTrip Form");
    
    text = new TextField("Write message","",100,TextField.ANY);
    sendForm.append(text);

    field = new ChoiceGroup("Select Item",Choice.EXCLUSIVE,new String[]{"1","2","3","4","5"},null);
    sendForm.append(field);
    
    sendForm.addCommand(close);
    sendForm.addCommand(send);
    

    sendForm.setCommandListener(this);
    midlet = parent;
    reset();
}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-StockList-client-midlet,代码行数:30,代码来源:SubmitForm.java

示例6: setupFields

private void setupFields() {
	titleField = new TextField("Title", "", 32, TextField.ANY);
	contentField = new TextField("Content", "", 128, TextField.ANY);
	dateField = new DateField("Date", DateField.DATE);
	categoryField = new ChoiceGroup("Category", Choice.EXCLUSIVE, Category.elements, null);
	priorityField = new Gauge("Priority", true, 10, 5);
	
	this.append(titleField);
	this.append(contentField);
	this.append(dateField);
	this.append(categoryField);
	this.append(priorityField);
}
 
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:13,代码来源:AddNoteForm.java

示例7: initTextFied

private TextField initTextFied(String title) {
    final String tfTitle = (title == null) ? "Enter text:" : title;
    TextField tf = new TextField(tfTitle, "", 8192, TextField.ANY);
    tf.addCommand(CMDTEXT_OK);
    tf.setDefaultCommand(CMDTEXT_OK);
    tf.setItemCommandListener(this);
    return tf;
}
 
开发者ID:aNNiMON,项目名称:JECP,代码行数:8,代码来源:ConsoleApplication.java

示例8: UserForm

public UserForm(String title, IUserDecorator d) {
    super(title);
    this.usernameField = new TextField(Localization.get("form.user.name"), "", 25,
            TextField.ANY);
    this.passwordField = new TextField(Localization.get("form.user.password"), "", 10,
            TextField.PASSWORD);
    this.confirmPasswordField = new TextField(Localization.get("form.user.confirmpassword"), "",
            10, TextField.PASSWORD);
    //#if javarosa.adduser.extended
    this.userIDField = new TextField(Localization.get("form.user.userid"), "", 10,
            TextField.NUMERIC);
    //#endif
    this.choice.append(Localization.get("form.user.giveadmin"), null);

    append(this.usernameField);
    append(this.passwordField);
    append(this.confirmPasswordField);
    //#if javarosa.adduser.extended
    append(this.userIDField);
    //#endif

    this.decorator = d;
    if (d != null) {
        initMeta();
    }
    append(this.choice);
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:27,代码来源:UserForm.java

示例9: MainGui

/**
 *
 * Constructor Extends Form to be able to display different GUI elements
 *
 */
public MainGui(){
	super(midletName);
	ok = new Command("Ok", Command.OK, 0);
  		displayLog = new Command("View Log", Command.OK, 4);
  		search = new Command("Search", Command.OK, 1);
	exit = new Command("Exit", Command.EXIT,0);
	text = new TextField("Name", "Per Tome", 30, TextField.ANY);

	append(text);

	addCommand(ok);
          	addCommand(displayLog);
          	addCommand(exit);
}
 
开发者ID:meisamhe,项目名称:GPLshared,代码行数:19,代码来源:Peer2Messenger.java

示例10: MainGui

/**
		 *
		 * Constructor Extends Form to be able to display different GUI elements
		 *
		 */
		public MainGui(){
			super(midletName);
			ok = new Command("Ok", Command.OK, 0);
    		displayLog = new Command("View Log", Command.OK, 4);
//    		search = new Command("Search", Command.OK, 1);
			exit = new Command("Exit", Command.EXIT,0);
			text = new TextField("Name", "Per Tome", 30, TextField.ANY);

			append(text);

			addCommand(ok);
            	addCommand(displayLog);
            	addCommand(exit);
		}
 
开发者ID:meisamhe,项目名称:GPLshared,代码行数:19,代码来源:RegistryMIDlet1.java

示例11: FileEditor

public FileEditor(FileConnection fc, Displayable back) {
	super("Edit " + fc.getName(), null, 128, TextField.ANY);
	this.back = back;
	addCommand(saveCommand);
	addCommand(backCommand);
	setCommandListener(this);
	
	file = fc;
	load();
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:10,代码来源:FileEditor.java

示例12: AddAccountForm

public AddAccountForm() {
	super("Add an account");
	userName = new TextField("Screenname:", "", 15, TextField.ANY);
	password = new TextField("Password:", "", 30, TextField.PASSWORD);
	append(userName);
	append(password);
	addCommand(new Command("Save", "Add account", Command.OK, 2));
	addCommand(new Command("Cancel", "Cancel", Command.BACK, 1));
}
 
开发者ID:wvdschel,项目名称:twitsy,代码行数:9,代码来源:AddAccountForm.java

示例13: createLogPanel

/**
 * 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,代码行数:13,代码来源:IA92.java

示例14: filterConstraints

protected char[] filterConstraints(char[] chars) {
	char[] result = new char[chars.length];
	int i, j;

	for (i = 0, j = 0; i < chars.length; i++) {
           switch (inputMethodListener.getConstraints() & TextField.CONSTRAINT_MASK) {
               case TextField.ANY :
                   result[j] = chars[i];
                   j++;
                   break;
               case TextField.EMAILADDR :
                   // TODO
                   break;
               case TextField.NUMERIC :
                   if (Character.isDigit(chars[i]) || chars[i] == '-') {
                       result[j] = chars[i];
                       j++;
                   }
                   break;
               case TextField.PHONENUMBER :
                   // TODO
                   break;
               case TextField.URL :
                   if (chars[i] != '\n') {
                       result[j] = chars[i];
                       j++;
                   }
                   break;
               case TextField.DECIMAL :
                   if (Character.isDigit(chars[i]) || chars[i] == '-' || chars[i] == '.') {
                       result[j] = chars[i];
                       j++;
                   }
                   break;
           }
	}
	if (i != j) {
		char[] newresult = new char[j];
		System.arraycopy(result, 0, newresult, 0, j);
		result = newresult;
	}

	return result;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:44,代码来源:InputMethodImpl.java

示例15: MIDPTextBox

public MIDPTextBox(String mainbar, String text, TextBoxNotify tbn) {
    this(mainbar, text, tbn, TextField.ANY);
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:3,代码来源:MIDPTextBox.java


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