com.google.gwt.user.client.ui.PushButton Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.PushButton.
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 |
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 |
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 #3
Source File: Ode.java From appinventor-extensions with Apache License 2.0 | 5 votes |
/** * Helper method to create push buttons. * * @param img image to shown on face of push button * @param tip text to show in tooltip * @return newly created push button */ public static PushButton createPushButton(ImageResource img, String tip, ClickHandler handler) { PushButton pb = new PushButton(new Image(img)); pb.addClickHandler(handler); pb.setTitle(tip); return pb; }
Example #4
Source File: SimpleColorPicker.java From swellrt with Apache License 2.0 | 5 votes |
/** * Creates the cell for each color. * * @param color the color * @return the widget */ private Widget createCell(final String color) { final PushButton button = new PushButton(); button.setStylePrimaryName(style.simplecolorbutton()); button.setSize(CELL_SIZE, CELL_SIZE); button.getElement().getStyle().setBackgroundColor(color); return button; }
Example #5
Source File: SimpleColorPicker.java From incubator-retired-wave with Apache License 2.0 | 5 votes |
/** * Creates the cell for each color. * * @param color the color * @return the widget */ private Widget createCell(final String color) { final PushButton button = new PushButton(); button.setStylePrimaryName(style.simplecolorbutton()); button.setSize(CELL_SIZE, CELL_SIZE); button.getElement().getStyle().setBackgroundColor(color); return button; }