Package com.gwtext.client.widgets

Examples of com.gwtext.client.widgets.Window


  /**
   * Show a plain old text editor for a cell.
   */
  private void showTextEditor(EventObject e, final String dta,
      final Record r, String val, DTColumnConfig colConf) {
    final Window w = new Window();
    w.setWidth(200);
    w.setAutoDestroy(true);
    w.setPlain(true);
    w.setBodyBorder(false);
    w.setTitle(dta);
    final TextBox box = new TextBox();
    box.setText(val);
    box.addKeyboardListener(new KeyboardListenerAdapter() {
      public void onKeyUp(Widget sender, char keyCode,
          int modifiers) {
        if (keyCode == KeyboardListener.KEY_ENTER) {
          r.set(dta, box.getText());
          w.destroy();
        }
      }
    });

    if (dt.isNumeric(colConf, getSCE())) {
      box.addKeyboardListener(ActionValueEditor.getNumericFilter(box));
    }

    Panel p = new Panel();
    p.add(box);
    w.add(p);
    w.setBorder(false);

    Button ok = new Button(constants.OK());
    ok.addClickListener(new ClickListener() {
      public void onClick(Widget wg) {
        r.set(dta, box.getText());
        w.destroy();
      }
    });
    p.add(ok);

    w.setPosition(e.getPageX(), e.getPageY());
    w.show();
  }
View Full Code Here


    //new Image("images/error_dialog.png")


    private ErrorPopup(final String message, final String longMessage) {

      Window w = new Window();
      w.setTitle(constants.Error());
      w.setWidth(400);
      w.setHeight((longMessage != null) ? 300 : 150);
      w.setModal(true);
      w.setShadow(true);
      w.setClosable(true);
      w.setPlain(true);

      w.setLayout(new VerticalLayout());



        VerticalPanel vp = new VerticalPanel();
        if (longMessage == null) {
          vp.add(new HTML("<image src='images/error_dialog.png'/>&nbsp;<strong><b>" + message +"</b></strong>"));
        } else {
          vp.add(new HTML("<image src='images/error_dialog.png'/>&nbsp;<strong><b>" + message +"</b></strong><hr/>"));
        }

        final SimplePanel detailPanel = new SimplePanel();
        if (longMessage != null && !"".equals(longMessage)) {
          Button showD = new Button(constants.ShowDetail());
          showD.addListener(new ButtonListenerAdapter() {
        public void onClick(Button button, EventObject e) {
          detailPanel.clear();
          detailPanel.add(new SmallLabel(longMessage));

        }
          });
          detailPanel.add(showD);
        }
        vp.setWidth("100%");
        detailPanel.setWidth("100%");
        vp.add(detailPanel);
        w.add(vp);


        w.show();

    }
View Full Code Here

      this.afterShowEvent = c;
    }

  public void show() {

    dialog = new Window();
    dialog.setAutoScroll(true);
    dialog.setModal(modal );
    dialog.setPlain(true);
    dialog.setConstrainHeader(true);
    dialog.setBodyBorder(false);
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.Window

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.