Package com.sencha.gxt.widget.core.client.event.SelectEvent

Examples of com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler


        if (panelData.isCollapseHidden()) {
          collapse.collapseHidden();
        }

        bar.addSelectHandler(new SelectHandler() {
          @Override
          public void onSelect(SelectEvent event) {
            onExpandClick((CollapsePanel) c);
          }
        });
      }
    }

    if (data.isCollapsible() && c instanceof ContentPanel && !c.isRendered()) {
      final ContentPanel cp = (ContentPanel) c;
      cp.setCollapsible(true);
      cp.setHideCollapseTool(true);

      IconConfig config = ToolButton.DOUBLELEFT;

      switch (getRegion(cp)) {
        case NORTH:
          config = ToolButton.DOUBLEUP;
          break;
        case SOUTH:
          config = ToolButton.DOUBLEDOWN;
          break;
        case EAST:
          config = ToolButton.DOUBLERIGHT;
          break;
      }

      cp.getHeader().addTool(new ToolButton(config, new SelectHandler() {

        @Override
        public void onSelect(SelectEvent event) {
          cp.collapse();
        }
      }));
      cp.addBeforeCollapseHandler(collapseHandler);
      cp.addBeforeExpandHandler(collapseHandler);
    }

    if (data.isSplit()) {
      SplitBar bar = c.getData("splitBar");
      if (bar == null || bar.getTargetWidget() != c) {
        bar = createSplitBar(c);
        final SplitBar fbar = bar;

        if (data.isCollapseMini()) {
          bar.setCollapsible(true);
          switch (getRegion(c)) {
            case EAST:
              bar.updateMini(Direction.RIGHT);
              break;
            case WEST:
              bar.updateMini(Direction.LEFT);
              break;
            case NORTH:
              bar.updateMini(Direction.UP);
              break;
            case SOUTH:
              bar.updateMini(Direction.DOWN);
              break;
          }
        }
        if (data.isCollapseMini()) {
          bar.addSelectHandler(new SelectHandler() {
            @Override
            public void onSelect(SelectEvent event) {
              ((ContentPanel) c).collapse();
            }
          });
View Full Code Here


//                disableLive();
//              }
//             
//            }
//          });
          toggleLive.addSelectHandler(new SelectHandler() {
            public void onSelect(SelectEvent event) {             
              if (pushListener == null){
                enableLive();
                toggleLive.setValue(true, false, true);
              } else {
                disableLive();
                toggleLive.setValue(false, false, true);
              }
            }
          });

//          final ComboBox<LineSeries<TimeSeriesDataVO>> box = new ComboBox<LineSeries<TimeSeriesDataVO>>(fieldStore,
//              new LabelProvider<LineSeries<TimeSeriesDataVO>>() {
//                public String getLabel(LineSeries<TimeSeriesDataVO> item) {
//                  return item.getYField().getPath();
//                }
//              });

          final TextField fieldInput = new TextField();
          fieldInput.setValue("first");
          fieldInput.setAllowBlank(false);
          fieldInput.addValidator(new MaxLengthValidator(20));
          final RegExp regex = RegExp.compile("\\s");
          fieldInput.addValidator(new Validator<String>() {
            public List<EditorError> validate(Editor<String> editor, String value) {
              if (regex.test(value)) {
                List<EditorError> errors = new ArrayList<EditorError>();
                errors.add(new DefaultEditorError(editor, "Field name cannot contain spaces.", ""));
                return errors;
              }
              return null;
            }
          });

          TextButton add = new TextButton("Add");
          add.addSelectHandler(new SelectHandler() {
            public void onSelect(SelectEvent event) {
//              String field = fieldInput.getValue();
//              if (fieldInput.isCurrentValid() && field.length() > 0 && fieldStore.findModelWithKey(field) == null && fieldStore.size() < 10) {
//                for (int i = 0; i < store.size(); i++) {
//                  TimeSeriesDataVO item = store.get(i);
//                  item.put(field, Math.random() * 100);
//                }
//                LineSeries<TimeSeriesDataVO> series = createLine(field);
//                fieldStore.add(series);
//                axis.addField(series.getYField());
//                chart.addSeries(series);
//                chart.redrawChart();
//              }
            }
          });

          TextButton remove = new TextButton("Remove");
          remove.addSelectHandler(new SelectHandler() {
            public void onSelect(SelectEvent event) {
//              String field = box.getText();
//              LineSeries<TimeSeriesDataVO> series = fieldStore.findModelWithKey(field);
//              if (field.length() > 0 && series != null && fieldStore.size() > 0) {
//                for (int i = 0; i < store.size(); i++) {
View Full Code Here

    }
  }

  protected RowEditorComponent createRowEditor() {
    RowEditorComponent rowEditor = new RowEditorComponent();
    rowEditor.getSaveButton().addSelectHandler(new SelectHandler() {

      @Override
      public void onSelect(SelectEvent event) {
        completeEditing();

      }
    });

    rowEditor.getCancelButton().addSelectHandler(new SelectHandler() {

      @Override
      public void onSelect(SelectEvent event) {
        cancelEditing();
View Full Code Here

      con.add(grid, new VerticalLayoutData(1, 1));
      con.add(toolBar, new VerticalLayoutData(1, 30));

    setCenter(con);
   
    addButton(new TextButton("返回",new SelectHandler() {
      public void onSelect(SelectEvent event) {
        presenter.display(presenter.getGroupModel());
      }
    }));
   
    addButton(new TextButton("自动任务",new SelectHandler() {
      public void onSelect(SelectEvent event) {
        presenter.displayRunning();
      }
    }));
   
    addButton(new TextButton("手动任务",new SelectHandler() {
      public void onSelect(SelectEvent event) {
        presenter.displayManual();
      }
    }));
  }
View Full Code Here

   
   
    add(formPanel,new MarginData(5));
   
    addButton(add);
    addButton(new TextButton("取消",new SelectHandler() {
      @Override
      public void onSelect(SelectEvent event) {
        ZKProcesserWindow.this.hide();
      }
    }));
View Full Code Here

    file = new FileUploadField();
    file.setAllowBlank(false);
    file.setName("uploadedfile");
    panel.add(new FieldLabel(file,"选择文件"));

    TextButton btn = new TextButton("重置",new SelectHandler() {
      public void onSelect(SelectEvent event) {
        panel.reset();
      }
    });
    fp.addButton(btn);

    btn = new TextButton("上传",new SelectHandler() {
      public void onSelect(SelectEvent event) {
        if (panel.isValid()) {
          panel.submit();
          return;
        }
View Full Code Here

      }
    });
   
    setCenter(grid);
   
    addButton(new TextButton("返回", new SelectHandler() {
      public void onSelect(SelectEvent event) {
        presenter.display(presenter.getGroupModel());
      }
    }));
    addButton(new TextButton("刷新",new SelectHandler() {
      public void onSelect(SelectEvent event) {
        refresh(presenter.getGroupModel());
      }
    }));
  }
View Full Code Here

    p.add(new FieldLabel(name, "组名称(*)"), new VerticalLayoutData(1, -1));
    p.add(new FieldLabel(radios,"组类型(*)"), new VerticalLayoutData(1, -1));

    add(panel,new MarginData(5));

    addButton(new TextButton("确定", new SelectHandler() {
      public void onSelect(SelectEvent event) {
        if (name.getValue()==null || name.getValue().trim().equals("")
            || group.getValue() == null) {
          AlertMessageBox alert=new AlertMessageBox("警告", "必填项不能为空");
          alert.show();
        }else{
          submit();
        }
      }
    }));
    addButton(new TextButton("取消", new SelectHandler() {
      public void onSelect(SelectEvent event) {
        NewGroupWindow.this.hide();
      }
    }));
  }
View Full Code Here

    centerContainer.add(getScriptFieldSet(), new MarginData(3));
    centerContainer.add(getResourceField(), new MarginData(3));
    centerContainer.setScrollMode(ScrollMode.AUTO);
    setCenter(centerContainer);

    addButton(new TextButton("返回", new SelectHandler() {
      @Override
      public void onSelect(final SelectEvent event) {
        presenter.display(presenter.getJobModel());
      }
    }));
View Full Code Here

      baseDepJobs.setReadOnly(true);
      baseDepJobs.addHandler(new ClickHandler() {
        @Override
        public void onClick(final ClickEvent event) {
          final CheckableJobTree tree = new CheckableJobTree();
          tree.setSelectHandler(new SelectHandler() {
            @Override
            public void onSelect(final SelectEvent event) {
              List<GroupJobTreeModel> list = tree.getTree()
                  .getCheckedSelection();// .getSelectionModel().getSelectedItems();
              String result = "";
View Full Code Here

TOP

Related Classes of com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler

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.