public void fieldChanged(Field field, int context) {

    if (field.equals(loginButton)) {
      onLoginButtonClicked();
    }
    if (field.equals(cancelButton)) {
      onCancelButtonClicked();
    }
  }
Exemplo n.º 2
0
 public static final XYRect getFieldExtent(Field fld) {
   int cy = fld.getContentTop();
   int cx = fld.getContentLeft();
   Manager m = fld.getManager();
   while (m != null) {
     cy += m.getContentTop() - m.getVerticalScroll();
     cx += m.getContentLeft() - m.getHorizontalScroll();
     if (m instanceof Screen) break;
     m = m.getManager();
   }
   return new XYRect(cx, cy, fld.getContentWidth(), fld.getContentHeight());
 }
 protected void paintBackground(Graphics gfx) {
   if (drawBtnStyle) {
     gfx.setBackgroundColor(Color.BLACK);
     gfx.clear();
   }
   super.paintBackground(gfx);
 }