Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.StringItem


   * @param aKey
   * @return    final
   * @author Irv Bunton
   */
  final public int appendCmdHelpRsc(Command cmd, String aKey) {
    StringItem si = new StringItem(cmd.getLabel() + ":",
        ResourceProviderME.get(aKey));
    //#ifdef DMIDP20
    si.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
    return super.append(si);
  }
View Full Code Here


   * @param aKey
   * @return    final
   * @author Irv Bunton
   */
  final public int appendItemHelpRsc(Item item, String aKey) {
    StringItem si = new StringItem(item.getLabel(),
        ResourceProviderME.get(aKey));
    //#ifdef DMIDP20
    si.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
    return super.append(si);
  }
View Full Code Here

                String.valueOf(maxCount), 3, TextField.NUMERIC);
    //#ifdef DMIDP20
    m_wordCountField.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( m_wordCountField );
    StringItem itemInfo = new StringItem("Program MIDP version:",
    //#ifdef DMIDP20
        "MIDP-2.0");
    //#else
//@        "MIDP-1.0");
    //#endif
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( itemInfo );
        itemInfo = new StringItem("Program CLDC version:",
        //#ifdef DCLDCV11
//@        "CLDC-1.1");
        //#else
        "CLDC-1.0");
        //#endif
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( itemInfo );
        itemInfo = new StringItem("Program JSR 75 available:",
    //#ifdef DJSR75
//@        "true");
    //#else
        "false");
    //#endif
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( itemInfo );
    String mep = System.getProperty("microedition.profiles");
    if (mep == null) {
      mep = "N/A";
    }
        itemInfo = new StringItem("Phone MIDP version:", mep);
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( itemInfo );
        itemInfo = new StringItem("Phone CLDC version:",
        System.getProperty("microedition.configuration"));
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( itemInfo );
        itemInfo = new StringItem("Phone JSR 75 available:",
        new Boolean(System.getProperty(
        "microedition.io.file.FileConnection.version")
        != null).toString());
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( itemInfo );
    String me = System.getProperty("microedition.platform");
    if (me == null) {
      me = "N/A";
    }
        itemInfo = new StringItem("Phone Microedition platform:", me);
    //#ifdef DMIDP20
    itemInfo.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        this.append( itemInfo );
    //#ifdef DLOGGING
//@        m_logLevelField = new TextField("Logging level",
//@                logger.getParent().getLevel().getName(), 20, TextField.ANY);
    //#ifdef DMIDP20
//@    m_logLevelField.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
//@        super.append( m_logLevelField );
    //#endif
        m_pgmMemUsedItem = new StringItem("Application memory used:", "");
    //#ifdef DMIDP20
    m_pgmMemUsedItem.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( m_pgmMemUsedItem );
        m_pgmMemAvailItem = new StringItem("Application memory available:", "");
    //#ifdef DMIDP20
    m_pgmMemAvailItem.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( m_pgmMemAvailItem );
        m_memUsedItem = new StringItem("DB memory used:", "");
    //#ifdef DMIDP20
    m_memUsedItem.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( m_memUsedItem );
        m_memAvailItem = new StringItem("DB memory available:", "");
    //#ifdef DMIDP20
    m_memAvailItem.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( m_memAvailItem );
        m_threadsUsed = new StringItem("Active Threads:", "");
    //#ifdef DMIDP20
    m_threadsUsed.setLayout(Item.LAYOUT_BOTTOM);
    //#endif
        super.append( m_threadsUsed );
    updateForm();
View Full Code Here

    // Due to a quirk on T637 (MIDP 1.0), we need to create a form
    // before the alert or the alert will not be seen.
    Form formAlert = new Form(origCmd.getLabel());
    Image question = UiUtil.getImage("/icons/questionMk.png");
    formAlert.append(question);
    int ix = formAlert.append(new StringItem(null,
          (String)promptCommands.get(origCmd)));
    Command okCmd = UiUtil.getCmdRsc("cmd.ok", Command.OK, 1);
    formAlert.addCommand(okCmd);
    Command cancelCmd = UiUtil.getCmdRsc("cmd.cancel", Command.CANCEL, 2);
    formAlert.addCommand(cancelCmd);
View Full Code Here

    }

    public void setHelp() {
       
        Form help = new Form("xUno ME - Help");
        StringItem helpText = new StringItem("xUNO ME",
                "This game is based on original UNO made by Mattel so it's not a"
                + " copy of UNO.\nThe game aim is to discard all cards first. "
                + "Each player starts with 7 cards and a random card from the "
                + "deck is put on the table. In your turn, the player just can "
                + "discard a card if it has some card with same color, same number, "
                + "or same type of table card or wild draw four, and wild. "
                + "When the player has one card, the player is compulsory to \"call xUno\""
                + "or it will be penalized with 3 cards.\n\n");
        help.append(helpText);

        StringItem commands = new StringItem("Keyboard Commands:",
                "Left or 4: Move the selection to left.\n" +
                "Right or 6: Move the selection to right.\n" +
                "Fire or 5: Discard the selected card if possible.\n" +
                "0: Calls xUno when the player has 1 card.\n" +
                "5: Get a card from de deck if the player doesn't have a possible move.\n" +
                "1,3,7,9: Choose, respectively, the colors blue, green, red and yellow.\n" +
                "*: Back to main menu."
                );
        help.append(commands);

        StringItem aboutTouchCommands = new StringItem("Touchscreen Commands:",
                "Click in card to try discard it.\n"
                + "Click in deck to get one card.\n"
                + "Click in middle of discarded cards to call xUno.\n"
                + "Click in colored square to choose color."
                );
View Full Code Here

        removeCommand(cmdClose);
        addCommand(cmdCancel);
        for (int i = size() - 1; i >= 0; i--) {
            delete(i);
        }
        append(log = new StringItem("Log:", ""));
    }
View Full Code Here

    public DetailsForm(final Programme prog) {
        super("Details");
        addCommand(cmdBack);
        setCommandListener(this);

        append(new StringItem("", Guide.getProgrammeDetails(prog)));
    }
View Full Code Here

        this.mid = mid;
        this.name = nome;
        out = outForm;
        stopAtFirst = stop;
        serversForm = new Form("xUno ME - Bluetooth");
        serversForm.append(new StringItem("Opening bluetooth.", ""));
        mid.getLCD().setCurrent(serversForm);
    }
View Full Code Here

            msgs.addElement(newData);

            for (int i = 1, amsg = MAX_MSG - 1; i < chatForm.size(); i++, amsg--) {

                String[] getMsg = (String[]) msgs.elementAt(amsg);
                StringItem getField = (StringItem) chatForm.get(i);
                getField.setLabel(getMsg[0] + " says:");
                getField.setText(getMsg[1]);
            }
        } else {

            chatForm.insert(1, new StringItem(sender + " says:", message));
            msgs.addElement(newData);
        }
    }
View Full Code Here

    };
    int i = 0;
    RecordEnumeration enumeration = rms.enumerateRecords(null, null, false);
    while (enumeration.hasNextElement()) {
      String data = decode(enumeration.nextRecord());
      StringItem item = new StringItem(null, data);
      //#ifndef midp1.0
      item.setFont(fonts[++i % fonts.length]);
      //#endif
      append(item);
      if(i > MAX)
        break;
    }
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.StringItem

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.