Java Code Examples for com.google.gwt.user.client.ui.PushButton#addStyleName()

The following examples show how to use com.google.gwt.user.client.ui.PushButton#addStyleName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ComplexColorPicker.java    From swellrt with Apache License 2.0 6 votes vote down vote up
public ComplexColorPicker() {
  style.ensureInjected();

  // The background color can be set to "none"
  noneBtn = new PushButton(messages.none());
  noneBtn.addStyleName(ComplexColorPicker.style.buttonsMargins());
  noneBtn.setStylePrimaryName(ComplexColorPicker.style.customColorPushbutton());
  noneBtn.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      listener.onNoneColorChoose();
    }
  });

  vp = new VerticalPanel();

  // We use a simple color picker by default
  simplePicker = new SimpleColorPicker(this);
  vp.add(simplePicker);
  vp.add(noneBtn);
  super.add(vp);
}
 
Example 2
Source File: ComplexColorPicker.java    From incubator-retired-wave with Apache License 2.0 6 votes vote down vote up
public ComplexColorPicker() {
  style.ensureInjected();

  // The background color can be set to "none"
  noneBtn = new PushButton(messages.none());
  noneBtn.addStyleName(ComplexColorPicker.style.buttonsMargins());
  noneBtn.setStylePrimaryName(ComplexColorPicker.style.customColorPushbutton());
  noneBtn.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      listener.onNoneColorChoose();
    }
  });

  vp = new VerticalPanel();

  // We use a simple color picker by default
  simplePicker = new SimpleColorPicker(this);
  vp.add(simplePicker);
  vp.add(noneBtn);
  super.add(vp);
}