Package com.extjs.gxt.ui.client.widget.button

Examples of com.extjs.gxt.ui.client.widget.button.ButtonBar


      setLayout(new FitLayout());
      area = new TextArea();
      //area.setWidth("500");
      //area.setHeight("500");
      add(area);
      buttonBar = new ButtonBar();
      Button clearButton = new Button("Clear");
      clearButton.addSelectionListener(new SelectionListener<ButtonEvent>()
    {
        public void componentSelected(ButtonEvent ce)
        {
View Full Code Here


        JabberApp.instance().doSearchUser();
      }
     
    });

    buttonBar = new ButtonBar();
    buttonBar.setButtonAlign(HorizontalAlignment.RIGHT);
    setButtonBar(buttonBar);
    buttonBar.add(searchButton);
    buttonBar.add(new FillButton());
    buttonBar.add(closeButton);
View Full Code Here

        close();
      }
     
    });
   
    ButtonBar buttonBar = new ButtonBar();
    buttonBar.setButtonAlign(HorizontalAlignment.RIGHT);
    setButtonBar(buttonBar);
    buttonBar.add(closeButton);
  }
View Full Code Here

          if(currentJid != null&&!currentJid.isEmpty())
            JabberApp.instance().showInfo(XmppID.parseId(currentJid));
      }
      });
     
      ButtonBar buttonBar = new ButtonBar();
      buttonBar.setButtonAlign(HorizontalAlignment.RIGHT);
      resultPanel.setButtonBar(buttonBar);
      buttonBar.add(addButton);
      buttonBar.add(infoButton);
     
  }
View Full Code Here

      public void componentSelected(ButtonEvent be)
      {
        searchUser();
      }
    });
    ButtonBar buttonBar = new ButtonBar();
    buttonBar.setButtonAlign(HorizontalAlignment.RIGHT);
    searchPanel.setButtonBar(buttonBar);
    buttonBar.add(searchButton);
  }
View Full Code Here

            currentJid = null;
        }

      });
   
      ButtonBar topBar = new ButtonBar();
      Button refreshButton = new Button("Refresh");
      refreshButton.addSelectionListener(new SelectionListener<ButtonEvent>()
      {
      public void componentSelected(ButtonEvent ce)
      {
        refreshRooms();
      }
       
      });
      roomField.setWidth(250);
      topBar.add(new ButtonAdapter(roomField));
      topBar.add(new FillButton());
      topBar.add(refreshButton);
      this.setTopComponent(topBar);
    //main.add(roomField,new RowData(1,-1));
    main.add(roomGrid,new RowData(1,1));   
    add(main);
   
    ButtonBar bar = new ButtonBar();
    Button createButton = new Button("Create Room");
    createButton.addSelectionListener(new SelectionListener<ButtonEvent>()
    {
      public void componentSelected(ButtonEvent ce)
      {
        joinRoom(null);
      }
    });
   
    Button joinButton = new Button("Join");
    joinButton.addSelectionListener(new SelectionListener<ButtonEvent>()
    {
      public void componentSelected(ButtonEvent ce)
      {
        joinRoom(currentJid);
      }
     
    });
   
    Button closeButton = new Button(JabberApp.getConstants().close());
    closeButton.addSelectionListener(new SelectionListener<ButtonEvent>()
    {
      public void componentSelected(ButtonEvent ce)
      {
        close();
      }
     
    });
   
    bar.add(joinButton);
    //bar.add(createButton);
    bar.add(closeButton);
    setButtonBar(bar);
  }
View Full Code Here

  /**
   * Creates a new panel instance.
   */
  public ContentPanel() {
    baseStyle = "x-panel";
    fbar = new ButtonBar();
    fbar.setParent(this);
    fbar.setMinButtonWidth(minButtonWidth);
    fbar.setAlignment(buttonAlign);
    head = new Header();
    head.setParent(this);
View Full Code Here

      vp.add(formatHeader(cat.getText()));

      for (Type type : Type.values()) {
        vp.add(format(type.getText()));

        ButtonBar hp = new ButtonBar();

        Button small = createButton(cat, type);
        Button medium = createButton(cat, type);
        Button large = createButton(cat, type);

        configureButton(small, type, ButtonScale.SMALL);
        configureButton(medium, type, ButtonScale.MEDIUM);
        configureButton(large, type, ButtonScale.LARGE);

        hp.add(small);
        hp.add(medium);
        hp.add(large);

        vp.add(hp);
      }
    }
    add(vp);
View Full Code Here

  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);

    ButtonBar buttonBar = new ButtonBar();
    buttonBar.add(new Button("Slide In / Out", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        if (cp.isVisible()) {
          cp.el().slideOut(Direction.UP, FxConfig.NONE);
        } else {
          cp.el().slideIn(Direction.DOWN, FxConfig.NONE);
        }
      }
    }));
    buttonBar.add(new Button("Fade In / Out", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        cp.el().fadeToggle(FxConfig.NONE);
      }
    }));
    buttonBar.add(new Button("Move", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        if (cp.isVisible()) {
          Rectangle rect = cp.el().getBounds();
          cp.el().setXY(rect.x + 50, rect.y + 50, FxConfig.NONE);
        }
      }
    }));

    buttonBar.add(new Button("Blink", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        if (cp.isVisible()) {
          cp.el().blink(FxConfig.NONE);
        }
      }
    }));

    buttonBar.add(new Button("Reset", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        cp.el().show();
        cp.setPosition(10, 10);
      }
    }));
View Full Code Here

        Button btn = ce.getButtonClicked();
        Info.display("MessageBox", "The '{0}' button was pressed", btn.getText());
      }
    };

    final ButtonBar buttonBar = new ButtonBar();
    buttonBar.setMinButtonWidth(75);
   
    buttonBar.add(new Button("Confirm", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        MessageBox.confirm("Confirm", "Are you sure you want to do that?", l);
      }
    }));

    buttonBar.add(new Button("Prompt", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        final MessageBox box = MessageBox.prompt("Name", "Please enter your name:");
        box.addCallback(new Listener<MessageBoxEvent>() {
          public void handleEvent(MessageBoxEvent be) {
            Info.display("MessageBox", "You entered '{0}'", new Params(be.getValue()));
          }
        });
      }
    }));

    buttonBar.add(new Button("Multiline Prompt", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        MessageBox box = MessageBox.prompt("Address", "Please enter your address:", true);
        box.addCallback(new Listener<MessageBoxEvent>() {
          public void handleEvent(MessageBoxEvent be) {
            String v = Format.ellipse(be.getValue(), 80);
            Info.display("MessageBox", "You entered '{0}'", new Params(v));
          }
        });
      }
    }));

    buttonBar.add(new Button("Yes/No/Cancel", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        MessageBox box = new MessageBox();
        box.setButtons(MessageBox.YESNOCANCEL);
        box.setIcon(MessageBox.QUESTION);
        box.setTitle("Save Changes?");
        box.addCallback(l);
        box.setMessage("You are closing a tab that has unsaved changes. Would you like to save your changes?");
        box.show();
      }
    }));

    buttonBar.add(new Button("Progress", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        final MessageBox box = MessageBox.progress("Please wait", "Loading items...",
            "Initializing...");
        final ProgressBar bar = box.getProgressBar();
        final Timer t = new Timer() {
          float i;

          @Override
          public void run() {
            bar.updateProgress(i / 100, (int) i + "% Complete");
            i += 5;
            if (i > 105) {
              cancel();
              box.close();
              Info.display("Message", "Items were loaded", "");
            }
          }
        };
        t.scheduleRepeating(500);
      }
    }));

    buttonBar.add(new Button("Wait", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        final MessageBox box = MessageBox.wait("Progress",
            "Saving your data, please wait...", "Saving...");
        Timer t = new Timer() {
          @Override
          public void run() {
            Info.display("Message", "Your fake data was saved", "");
            box.close();
          }
        };
        t.schedule(5000);
      }
    }));

    buttonBar.add(new Button("Alert", new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        MessageBox.alert("Alert", "Access Denied", l);
      }
    }));
    add(buttonBar, new FlowData(10));
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.button.ButtonBar

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.