Examples of StringItem


Examples of com.substanceofcode.testlcdui.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

Examples of com.substanceofcode.testlcdui.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

Examples of com.substanceofcode.testlcdui.StringItem

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

Examples of com.substanceofcode.testlcdui.StringItem

              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

Examples of com.substanceofcode.testlcdui.StringItem

        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

Examples of com.substanceofcode.testlcdui.StringItem

              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

Examples of com.substanceofcode.testlcdui.StringItem

  /* Perform a test. */
  private void performTest1() {
    while (super.size() > 0) {super.delete(0);}

    // TODO put in expected results and test descr
    super.append(new StringItem("isConvWinUni()=",
          new Boolean(EncodingUtil.isConvWinUni()).toString()));
    super.append(new StringItem("JavaME encoding=",
        System.getProperty("microedition.encoding")));
    super.append(new StringItem("m_midpIso=",
        new Boolean(EncodingUtil.m_midpIso).toString()));
    super.append(new StringItem("getIsoEncoding()=",
        EncodingUtil.getIsoEncoding()));
    super.append(new StringItem("m_midpWin=",
        new Boolean(EncodingUtil.m_midpWin).toString()));
    super.append(new StringItem("getWinEncoding()=",
        EncodingUtil.getWinEncoding()));
    super.append(new StringItem("m_midpUni=",
        new Boolean(EncodingUtil.m_midpUni).toString()));
    super.append(new StringItem("m_hasWinEncoding=",
        new Boolean(EncodingUtil.m_hasWinEncoding).toString()));
    super.append(new StringItem("m_hasIso8859Encoding=",
        new Boolean(EncodingUtil.m_hasIso8859Encoding).toString()));
    appendEntityAlphaTest("Test with no data.", "", "");
    appendEntityAlphaTest("Test with one entity.", "&lt;", "<");
    appendEntityAlphaTest("Test with one entity.",
                  "&lt;&gt;&amp;&quot;&nbsp;&apos;",
View Full Code Here

Examples of com.substanceofcode.testlcdui.StringItem

  private void performTest2() {
    while (super.size() > 0) {super.delete(0);}
    Vector statExecs = EncodingUtil.getStatExcs();
    for (int ic = 0; ic < statExecs.size(); ic++) {
      Exception exc = (Exception)statExecs.elementAt(ic);
      super.append(new StringItem("stat exc " + ic + "=",
            exc.getMessage()));
    }
    appendEncTest("Test with has iso- encoding doc iso- encoding.",
        true, "ISO-8859-1", true, "WINDOWS-1252",
        "ISO-8859-1", "ISO-8859-1");
View Full Code Here

Examples of com.substanceofcode.testlcdui.StringItem

        final String expEncoding) {
    String data = "ab";
    ByteArrayInputStream bin = new ByteArrayInputStream( data.getBytes() );
    EncodingUtil encUtl = new EncodingUtil(bin);
    super.append("----------");
    super.append(new StringItem("hasIso8859Encoding=",
          new Boolean(hasIso8859Encoding).toString()));
    super.append(new StringItem("isoEncoding=", isoEncoding));
    super.append(new StringItem("hasWinEncoding=",
          new Boolean(hasWinEncoding).toString()));
    super.append(new StringItem("winEncoding=", winEncoding));
    super.append(new StringItem("encoding=", encoding));
    encUtl.getEncoding(hasIso8859Encoding, isoEncoding, hasWinEncoding,
        winEncoding, "BIG-5", encoding);
    super.append(new StringItem("(" + tstName + ") Exp Result:", "\n" +
        expEncoding));
    final String actEncoding = encUtl.getDocEncoding();
    super.append(new StringItem("(" + tstName + ") Act Result: ", "\n" +
        actEncoding));
    super.append("\n" + new Boolean(actEncoding.equals(
            expEncoding)).toString());
    Vector excs = encUtl.getExcs();
    for (int ic = 0; ic < excs.size(); ic++) {
      Exception exc = (Exception)excs.elementAt(ic);
      super.append(new StringItem("exc " + ic, "\n" +
          exc.getMessage()));
    }
  }
View Full Code Here

Examples of com.substanceofcode.testlcdui.StringItem

      sbTst.append("&" + cval + "; ");
    }
  }

  private void appendEntityAlphaTest(String tstName, String tst, String res) {
    super.append(new StringItem(tstName, tst));
    super.append(new StringItem("(" + tstName + ") Result:", "\n" + res));
    String actres = EncodingUtil.replaceAlphaEntities(true, tst);
    super.append(new StringItem("(" + tstName + ") Act Result: ", "\n" + actres));
    super.append("\n" + new Boolean(actres.equals(res)).toString());
    super.append("-------");
  }
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.