コード例 #1
0
  protected boolean onHtmlpasrecoverRetrieve() {

    try {
      String Email = Splitter.Split(new String(record.getRecord(4)), "-")[4];
      if (!Email.equals("n")) {
        HttpCon con =
            new HttpCon(
                new String(record.getRecord(1)) + "-" + Email,
                PropertyClass.ServerUrl + "PasswordRecvoer");
        con.SetContype(true, true, true);
        Thread t = new Thread(con);
        showContainer("AlertBox", null, null);
        synchronized (t) {
          t.start();
          t.wait();
        }

        ((TextField) findByName("status1", HTTPemailsender)).setText(con.getValue().toString());
      } else {
        ((TextField) findByName("status1", HTTPemailsender))
            .setText("Your password need not to retrive, it's default password");
      }
      Email = null;
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    boolean val = super.onHtmlpasrecoverRetrieve();
    return val;
  }
コード例 #2
0
  protected void beforeUserprofile(Form f) {
    try {
      ((Label) findByName("Label2", f)).setIcon(Image.createImage("/no_user.png").scaledHeight(72));
      HttpCon con12 = new HttpCon(frndid + "-p", PropertyClass.ServerUrl + "Frends");
      con12.SetContype(true, true, true);
      Thread t = new Thread(con12);
      synchronized (t) {
        t.start();
        t.wait();
      }
      String frnd[] = Splitter.Split(con12.getValue().toString(), "-");
      ((Label) findByName("Label4", f)).setText(frnd[0]);
      ((Label) findByName("Label6", f)).setText(frnd[1]);
      ((Label) findByName("tel", f)).setText("Tel   " + frnd[2]);
      ((Label) findByName("Label81", f)).setText("Address   " + frnd[3]);
      ((Label) findByName("Label7", f)).setText("email   " + frnd[4]);

    } catch (Exception ex) {
      ex.printStackTrace();
    }
    super.beforeUserprofile(f);
  }
コード例 #3
0
  public EditorFont(
      Font systemFont,
      byte[] truetypeFont,
      String lookupFont,
      boolean includesBitmap,
      Object bitmapAntialiasing,
      String bitmapCharset) {
    this.systemFallback = systemFont;
    this.truetypeFont = truetypeFont;
    this.includesBitmap = includesBitmap;
    this.bitmapAntialiasing = bitmapAntialiasing;
    this.bitmapCharset = bitmapCharset;
    this.lookupFont = lookupFont;
    if (truetypeFont != null) {
      try {
        java.awt.Font internal =
            java.awt.Font.createFont(
                java.awt.Font.TRUETYPE_FONT, new ByteArrayInputStream(truetypeFont));
        bestFont = new Font(internal);
        return;
      } catch (Exception err) {
        err.printStackTrace();
        JOptionPane.showMessageDialog(
            java.awt.Frame.getFrames()[0],
            "Error creating font: " + err,
            "TTF Error",
            JOptionPane.ERROR_MESSAGE);
      }
    }

    if (lookupFont != null) {
      bestFont = Font.create(lookupFont.split(";")[0]);
      if (bestFont != null) {
        return;
      }
    }

    bestFont = systemFont;
  }