예제 #1
0
  /** constructor */
  public LoginUiHorizontal() {

    HorizontalPanel hp = new HorizontalPanel();
    hp.add(wLoading);
    hp.add(pUi);

    pWidget.add(hp);

    initWidget(pWidget);

    // observers
    bLogin.addClickListener(this);
    bForgot.addClickListener(this);

    tbConsumerKey.addClickListener(this);
    tbConsumerKey.addChangeListener(this);
    tbConsumerKey.addKeyboardListener(this);
    tbConsumerKey.addFocusListener(this);

    tbConsumerSecret.addClickListener(this);
    tbConsumerSecret.addChangeListener(this);
    tbConsumerSecret.addKeyboardListener(this);
    tbConsumerSecret.addFocusListener(this);

    tbConsumerSecretPass.addClickListener(this);
    tbConsumerSecretPass.addChangeListener(this);
    tbConsumerSecretPass.addKeyboardListener(this);
    tbConsumerSecretPass.addFocusListener(this);

    cbRemberMe.addKeyboardListener(this);
    cbRemberMe.addClickListener(this);

    hAccountLogin.addClickListener(this);
    hForgotPassword.addClickListener(this);

    // style
    pWidget.setStyleName("login-Ui");

    // defaults
    pError.setVisible(false);

    hp.setCellVerticalAlignment(wLoading, VerticalPanel.ALIGN_MIDDLE);

    // debug
    // pWidget.addStyleName("test2");

  }