Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Form.addCommand()


    appendStringItem(playForm, "Name: ", module_info.name);
    appendStringItem(playForm, "Author: ", module_info.author);
    appendStringItem(playForm, "Date: ", module_info.date);
    appendStringItem(playForm, "Time: ", ASAP.durationToString(duration));
    playForm.append(gauge);
    playForm.addCommand(stopCommand);
    playForm.addCommand(exitCommand);
    playForm.setCommandListener(this);
    Display.getDisplay(this).setCurrent(playForm);

    if (duration < 0)
View Full Code Here


    appendStringItem(playForm, "Author: ", module_info.author);
    appendStringItem(playForm, "Date: ", module_info.date);
    appendStringItem(playForm, "Time: ", ASAP.durationToString(duration));
    playForm.append(gauge);
    playForm.addCommand(stopCommand);
    playForm.addCommand(exitCommand);
    playForm.setCommandListener(this);
    Display.getDisplay(this).setCurrent(playForm);

    if (duration < 0)
      duration = 180000;
View Full Code Here

        }
        else if(displayable != this && command == OKCmd)
        {
            Form details = new Form("Details");
            details.append((String)log.elementAt(errorForm.getSelectedIndex()));
            details.addCommand(backCmd);
            details.setCommandListener(this);
            gvME.dispMan.switchDisplayable(null, details);
        }
        else if(command == clearCmd)
        {
View Full Code Here

        display.setCurrent(this);
    }

    public void displayScore(Score score) {
        Form f = new Form(score.scoreText);
        f.addCommand(backCommand);
        f.setCommandListener(this);

        StringItem item;

        item = new StringItem(null, "Rules: Japanese");
View Full Code Here

    private void displayNodeProperties() {
        Form sgfPropsForm = new Form(T._("Node properties"));
        StringItem sgfNodeProps = new StringItem(T._("Node"), null);
        StringItem sgfRootProps = new StringItem(T._("Root"), null);

        sgfPropsForm.addCommand(backCommand);
        sgfPropsForm.setCommandListener(this);

        sgfNodeProps.setFont(fontPlain());
        sgfNodeProps.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        sgfPropsForm.append(sgfNodeProps);
View Full Code Here

    private void displaySource() {
        Form srcForm = new Form(T._("Source"));
        StringItem srcText = new StringItem(null, null);

        srcForm.addCommand(backCommand);
        srcForm.setCommandListener(this);

        srcText.setFont(fontPlain());
        srcForm.append(srcText);
View Full Code Here

        }
    }

    private void displayText(String title, String body) {
        Form f = new Form(title);
        f.addCommand(backCommand);
        f.setCommandListener(this);
        StringItem i = new StringItem(null, body);
        i.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL));
        f.append(i);
        setCurrent(f);
View Full Code Here

            FileConnection fc = (FileConnection) Connector.open("file://localhost/" + currDirName + fileName);
            if (!fc.exists())
                throw new IOException(T._("File does not exists."));

            Form props = new Form(T._("Properties") + ": " + fileName);
            props.addCommand(backToBCommand);
            props.setCommandListener(this);

            props.append(new StringItem(T._("Location"), currDirName));
            props.append(new StringItem(T._("Type"), fc.isDirectory() ? T._("Directory") : T._("Regular File")));
            props.append(new StringItem(T._("Size"), Long.toString((fc.isDirectory() ? fc.directorySize(true) : fc.fileSize()))));
View Full Code Here

        nameInput = new TextField(T._("Enter Name"), null, 256, TextField.ANY);
        typeInput = new ChoiceGroup(T._("Enter File Type"), Choice.EXCLUSIVE,
                typeList, iconList);
        creator.append(nameInput);
        creator.append(typeInput);
        creator.addCommand(newOkCommand);
        creator.addCommand(backToBCommand);
        creator.setCommandListener(this);
        display.setCurrent(creator);
    }
View Full Code Here

        typeInput = new ChoiceGroup(T._("Enter File Type"), Choice.EXCLUSIVE,
                typeList, iconList);
        creator.append(nameInput);
        creator.append(typeInput);
        creator.addCommand(newOkCommand);
        creator.addCommand(backToBCommand);
        creator.setCommandListener(this);
        display.setCurrent(creator);
    }

    void createFile(String newName, boolean isDirectory) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.