Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Form


        return readMsg;
    }

    private Form getMsgProps(textConvo msg)
    {
        msgProps = new Form("Properties");
        msgProps.addCommand(getBackCmd());
        msgProps.addCommand(getCallCmd());
        StringItem sender = new StringItem("Sender: ", msg.getSender());
        msgProps.append(sender);
        StringItem replyNum = new StringItem("Phone Number: ", msg.getReplyNum());
View Full Code Here


        return backCmd;
    }

    public static Form getChangeSettingsMenu() {
        if (changeSettingsMenu == null) {
            changeSettingsMenu = new Form("Change Settings", new Item[] { getUsernameTextField(), getPasswordTextField(), getCallFromTextField(), getIntervalTextField() });//GEN-BEGIN:|233-getter|1|233-postInit
            changeSettingsMenu.addCommand(getSaveSettingsCmd());
            changeSettingsMenu.addCommand(getBackCmd());
            changeSettingsMenu.setCommandListener(new CommandListener() {

                public void commandAction(Command command, Displayable displayable) {
View Full Code Here

     * @param msg Text of the message being read
     * @return Returns a GUI Form with the contents of the message
     */
    private Form getReadMsg(String title, String msg)
    {
        readMsg = new Form("To: "+title);
        readMsg.addCommand(backCmd);
        readMsg.setCommandListener(this);
        readMsg.append(msg);
        return readMsg;
    }
View Full Code Here

    private Form getInfoForm()
    {
        if(infoForm == null)
        {
            infoForm = new Form("Program Info");
            infoForm.addCommand(backCmd);
            infoForm.setCommandListener(this);
        }
        Runtime rt = Runtime.getRuntime();
        infoForm.deleteAll();
View Full Code Here

        {
            gvME.dispMan.switchDisplayable(null, this);
        }
        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)
        {
            log.removeAllElements();
View Full Code Here

     * @param msg Text of the message being read
     * @return Returns a GUI Form with the contents of the message
     */
    private Form getReadMsg(String title, String msg)
    {
        readMsg = new Form("To: "+title);
        readMsg.addCommand(backCmd);
        readMsg.setCommandListener(this);
        readMsg.append(msg);
        return readMsg;
    }
View Full Code Here

        updateClocks();
        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");
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, T._("White"));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE);
        f.append(item);

        item = new StringItem(null, T._("Black"));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_SHRINK | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, T._("Territory"));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        item = new StringItem(null, String.valueOf(score.wTerr));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE);
        f.append(item);

        item = new StringItem(null, String.valueOf(score.bTerr));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_SHRINK | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, T._("Captured"));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        item = new StringItem(null, String.valueOf(-score.wCaptured));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE);
        f.append(item);

        item = new StringItem(null, String.valueOf(-score.bCaptured));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_SHRINK | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, T._("Dead"));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        item = new StringItem(null, String.valueOf(-score.wDead));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE);
        f.append(item);

        item = new StringItem(null, String.valueOf(-score.bDead));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_SHRINK | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, T._("Komi"));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        item = new StringItem(null, String.valueOf(score.komi));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, "=");
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        item = new StringItem(null, String.valueOf(score.wScore));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE);
        f.append(item);

        item = new StringItem(null, String.valueOf(score.bScore));
        item.setFont(fontPlain());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_SHRINK | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        // ----------------------------------------------------------------------------
        item = new StringItem(null, score.scoreText);
        item.setFont(fontBold());
        item.setLayout(Item.LAYOUT_2 | Item.LAYOUT_CENTER | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        f.append(item);

        extern = true;
        display.setCurrent(f);
    }
View Full Code Here

        extern = true;
        display.setCurrent(f);
    }

    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);
        sgfRootProps.setFont(fontPlain());
        sgfRootProps.setLayout(Item.LAYOUT_2 | Item.LAYOUT_EXPAND | Item.LAYOUT_NEWLINE_BEFORE | Item.LAYOUT_NEWLINE_AFTER);
        sgfPropsForm.append(sgfRootProps);

        SGFNode root = game.kifuHead();
        SGFNode node = game.kifuLastMove();

        StringBuffer sb = new StringBuffer();
View Full Code Here

        display.setCurrent(sgfPropsForm);
    }

    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);

        SGFNode root = game.kifuHead();
        try {
            srcText.setText(SGFWriter.toString(root));
        } catch (IOException e) {
View Full Code Here

        display.setCurrent(srcForm);
    }

    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);

        StringBuffer sb = new StringBuffer();

        SGFNode root = game.kifuHead();
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.Form

Copyright © 2018 www.massapicom. 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.