Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.PushButton


  public void setContentHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant alignment) {
    grid.getCellFormatter().setHorizontalAlignment(CONTENT_ROW, 0, alignment);
  }
 
  public PushButton addToolButton(String text, String title, ClickListener clickListener) {
    PushButton button = new PushButton(text, clickListener);
    if (title != null) {
      button.setTitle(title);
    }
    addToolButton(button);
    return button;
  }
View Full Code Here


    addToolButton(button);
    return button;
  }
 
  public PushButton addToolButton(Image image, ClickListener clickListener) {
    PushButton button = new PushButton(image, clickListener);
    addToolButton(button);
    return button;
  }
View Full Code Here

    HorizontalPanel panel = new HorizontalPanel();
    if (isLoggedIn) {
      panel.setSpacing(10);
      panel.add(new Label("Welcome " + getClientState().getUserName()));

      PushButton logoutButton = new PushButton("Logout");
      logoutButton.setStyleName("LogoutButton");
      logoutButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          logout();
        }
      });
      panel.add(logoutButton);
    } else {
      PushButton loginButon = new PushButton("Login");
      loginButon.setStyleName("LoginButton");
      loginButon.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          showNewUserNameRequestPopupPanel();
        }
      });
      panel.add(loginButon);
View Full Code Here

    flexTable.setWidget(1, 0, lblPassword);
   
    TextBox passwordTextBox = new TextBox();
    flexTable.setWidget(1, 1, passwordTextBox);
   
    PushButton pshbtnAsCustomer = new PushButton("As Customer");
    pshbtnAsCustomer.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
       
        customerSO.getCustomer(loginIDtextBox.getText(), new AsyncCallback<Customer>() {
         
          public void onSuccess(Customer result) {
            Window.alert("Logged in as Customer " + result.getCustomerName());
           
          }
         
          public void onFailure(Throwable caught) {
            Window.alert("A problem " + caught.getMessage());
           
          }
        });
      }
    });
    flexTable.setWidget(2, 0, pshbtnAsCustomer);
   
    PushButton pshbtnAsTrader = new PushButton("As Trader");
    pshbtnAsTrader.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        Window.alert("Login as Trader is not implemented yet");
      }
    });
    flexTable.setWidget(2, 1, pshbtnAsTrader);
View Full Code Here

          .arrow_sm_right().createImage(), clickHandler) : null;
      btnPop =
        viewOptions.isPopable() ? new ToggleButton(imageBundle.external().createImage(), imageBundle.permalink()
            .createImage(), clickHandler) : null;

        btnClose = viewOptions.isClosable() ? new PushButton(imageBundle.close().createImage(), clickHandler) : null;
        btnRefresh = viewOptions.isRefreshable() ? new PushButton(imageBundle.refresh().createImage(), clickHandler) : null;

        addStyleName(Styles.VIEW_TOOLBAR);
        viewTitle.setStyleName(Styles.VIEW_TITLE);

        if(btnMinimize != null) addButton(btnMinimize, TITLE_MINIMIZE);
View Full Code Here

      contextArea.getElement().getStyle().setProperty("margin", "1em");
      contextArea.getElement().getStyle().setProperty("border", "1px solid gray");
      contextArea.getElement().getStyle().setProperty("padding", "1em");
      RootPanel.get().add(contextArea);

      b1 = new PushButton("Push Button 1");
      b1.getElement().getStyle().setProperty("margin", "1em");
      b2 = new PushButton(MsgLevelImageBundle.INSTANCE.error().createImage());
      b2.getElement().getStyle().setProperty("margin", "1em");
      b3 = new PushButton(MsgLevelImageBundle.INSTANCE.warn().createImage());
      b3.getElement().getStyle().setProperty("margin", "1em");
      contextArea.add(b1);
      contextArea.add(b2);
      contextArea.add(b3);
    }
View Full Code Here

      tb = new Toolbar();
      contextArea.add(tb);

      // add contents to the the toolbar
      final PushButton pb = new PushButton(MsgLevelImageBundle.INSTANCE.info().createImage());
      pb.setEnabled(false);
      tb.addButton(pb, "Info");
      tb.add(ToolbarImageBundle.INSTANCE.split().createImage());
      tb.addButton(new PushButton(MsgLevelImageBundle.INSTANCE.error().createImage()), "Error");
      tb.add(ToolbarImageBundle.INSTANCE.split().createImage());
      tb.addButton(new PushButton(MsgLevelImageBundle.INSTANCE.warn().createImage()), "Warn");
      tb.addButton(new PushButton(MsgLevelImageBundle.INSTANCE.warn().createImage()), "Warn");
      tb.addButton(new PushButton(MsgLevelImageBundle.INSTANCE.warn().createImage()), "Warn");
      tb.add(ToolbarImageBundle.INSTANCE.split().createImage());
      final Label lbl = new Label("This is a label");
      lbl.setWidth("100%");
      tb.add(lbl);

      tb.add(new PushButton(MsgLevelImageBundle.INSTANCE.fatal().createImage()));
    }
View Full Code Here

          Window.alert("Click");
        }
      });

      // add some view option buttons
      vt.addViewOpButton(new PushButton("Option 1"), "Option 1");
      vt.addViewOpButton(new PushButton("Option 2"), "Option 2");
    }
View Full Code Here

      contextArea.getElement().getStyle().setProperty("margin", "1em");
      contextArea.getElement().getStyle().setProperty("border", "1px solid gray");
      contextArea.getElement().getStyle().setProperty("padding", "1em");
      RootPanel.get().add(contextArea);

      b1 = new PushButton("Push Button 1");
      b1.getElement().getStyle().setProperty("margin", "1em");
      b2 = new PushButton(new Image(MsgStyles.resources().error()));
      b2.getElement().getStyle().setProperty("margin", "1em");
      b3 = new PushButton(new Image(MsgStyles.resources().warn()));
      b3.getElement().getStyle().setProperty("margin", "1em");
      contextArea.add(b1);
      contextArea.add(b2);
      contextArea.add(b3);
    }
View Full Code Here

      tb = new Toolbar();
      contextArea.add(tb);

      // add contents to the the toolbar
      final PushButton pb = new PushButton(new Image(MsgStyles.resources().info()));
      pb.setEnabled(false);
      tb.addButton(pb, "Info");
      tb.add(new Image(ToolbarStyles.resources().split()));
      tb.addButton(new PushButton(new Image(MsgStyles.resources().info())));
      tb.add(new Image(ToolbarStyles.resources().split()));
      tb.addButton(new PushButton(new Image(MsgStyles.resources().warn())));
      tb.addButton(new PushButton(new Image(MsgStyles.resources().error())));
      tb.addButton(new PushButton(new Image(MsgStyles.resources().warn())));
      tb.add(new Image(ToolbarStyles.resources().split()));
      final Label lbl = new Label("This is a label");
      lbl.setWidth("100%");
      tb.add(lbl);

      tb.addButton(new PushButton(new Image(MsgStyles.resources().fatal())));
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.PushButton

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.