Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.StringItem


   * @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


    // 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

              this);
      } catch (Exception e) {
      }
    }
    if (underlined) {
      return new StringItem(textLabel, text, Item.HYPERLINK);
    } else {
    //#endif
      return new StringItem(textLabel, text);
    //#ifdef DMIDP20
    }
    //#endif
  }
View Full Code Here

        if (summary.length() > 0) {
          displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
                "Summary:", summary, fontSize, false,
                displayDtlForm, this));
        }
        displayDtlForm.append(new StringItem("Explicit:", feed.getExplicit()));
        final String title = feed.getTitle();
        if (title.length() > 0) {
          displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
                "title:", title, fontSize, false,
                displayDtlForm, this));
View Full Code Here

              break;
            }
          }
        }
        if (!showErrsOnly) {
          super.append(new StringItem("Active Threads:",
                Integer.toString(Thread.activeCount())));
        }
      }catch(Throwable t) {
        //#ifdef DLOGGING
        logger.severe("showErrMsgs", t);
View Full Code Here

    gameList = new List( "Select Game", List.IMPLICIT, games, null );
    gameList.addCommand( backCommand );
    gameList.setCommandListener( this );
    warehouseCanvas = new WarehouseCanvas( "/warehouse/levels/" + games[ 0 ] + ".lev" )
    helpForm = new Form( "Warehouse", new Item[] {
      new StringItem( "About: ", "A Sokoban clone, " +
        "using level data from http://sokobano.de" ),
      new StringItem( "How To Play: ",
        "Push the yellow crates onto the red places using your directional keys. " +
        "Press '#' to reset the board or skip to the next level. " +
        "Press '*' to reset the board or skip to a random level. Have fun!" ),
      new StringItem( "Version: ", VERSION )
    } );
    helpForm.addCommand( backCommand );
    helpForm.setCommandListener( this );
    levelField = new TextField( "Level", "1", 3, TextField.NUMERIC );
    levelForm = new Form( "Select Level", new Item[] { levelField } );
View Full Code Here

  private String user, from;
 
  public RequestAuth(Display d, NetworkThread nt, Displayable disp, String user, String from) {
    super();
    form = new Form("Request");
    form.append(new StringItem("User "+user+" requests authorization. Add user to roster?", null));
    ok = new Command("Add", Command.EXIT, 0);
    cancel = new Command("Deny", Command.OK, 0);
    form.addCommand(ok);
    form.addCommand(cancel);
    form.setCommandListener(this);
View Full Code Here

//      t.addContent(m);
//      t.finish();
      if(form.size()>10)
        form.delete(form.size()-1);
//      form.insert(0, t);
      StringItem t2 = new StringItem(null, tim+m);
      t2.setLayout(Item.LAYOUT_NEWLINE_AFTER);
      form.insert(0, t2);
//      d.setCurrentItem(t2);
    } catch (Exception e) {
    }
  }
View Full Code Here

              this);
      } catch (Exception e) {
      }
    }
    if (underlined) {
      return new StringItem(textLabel, text, Item.HYPERLINK);
    } else {
    //#endif
      return new StringItem(textLabel, text);
    //#ifdef DMIDP20
    }
    //#endif
  }
View Full Code Here

              break;
            }
          }
        }
        if (!showErrsOnly) {
          super.append(new StringItem("Active Threads:",
                Integer.toString(Thread.activeCount())));
        }
      }catch(Throwable t) {
        //#ifdef DLOGGING
//@        logger.severe("showErrMsgs", t);
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.