Package javax.microedition.lcdui

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


        }
    }

    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


        }
    }

    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

            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

    private void displayInfo() {
        Form infoForm = new Form(T._("Info"));
        StringItem infoText = new StringItem(null, null);

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

        infoText.setFont(fontPlain());
        infoForm.append(infoText);
View Full Code Here

    Form aForm = new Form("Test");

    aForm.append("Testinfo");
    aForm.setCommandListener(this);

    aForm.addCommand(new ExecutableCommand("Quit", Command.EXIT, 99)
      {
        public void execute(Object rArg)
        {
          queryQuitApp();
        }
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.