Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,71 +16,85 @@
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.googlecode.mgwt.dom.client.event.tap.TapEvent;
import com.googlecode.mgwt.dom.client.event.tap.TapHandler;
import com.googlecode.mgwt.examples.showcase.client.DetailViewGwtImpl;
import com.googlecode.mgwt.ui.client.widget.Button;
import com.googlecode.mgwt.ui.client.widget.MPhoneNumberTextBox;

/**
* @author Daniel Kurka
*
*
*/
public class ButtonViewGwtImpl extends DetailViewGwtImpl implements ButtonView {

public ButtonViewGwtImpl() {
final MPhoneNumberTextBox textbox = new MPhoneNumberTextBox();

public ButtonViewGwtImpl() {

FlowPanel content = new FlowPanel();
content.getElement().getStyle().setMargin(20, Unit.PX);

FlowPanel content = new FlowPanel();
content.getElement().getStyle().setMargin(20, Unit.PX);
scrollPanel.setScrollingEnabledX(false);

scrollPanel.setScrollingEnabledX(false);
content.add(textbox);

Button normalButton = new Button("Normal");
content.add(normalButton);
textbox.getElement().setAttribute("style", "height: 32px; width:100%; font-size:x-large;letter-spacing:2px;");

Button roundButton = new Button("Round");
roundButton.setRound(true);
content.add(roundButton);
Button normalButton = new Button("Normal");
content.add(normalButton);
normalButton.addTapHandler(new TapHandler() {

Button smallButton = new Button("Small");
smallButton.setSmall(true);
content.add(smallButton);
@Override
public void onTap(TapEvent event) {
textbox.setValue(textbox.getValue() + '1');
}
});
Button roundButton = new Button("Round");
roundButton.setRound(true);
content.add(roundButton);

HTML spacer = new HTML();
spacer.setHeight("100px");
content.add(spacer);
Button smallButton = new Button("Small");
smallButton.setSmall(true);
content.add(smallButton);

Button importantButton = new Button("Important");
importantButton.setImportant(true);
content.add(importantButton);
HTML spacer = new HTML();
spacer.setHeight("100px");
content.add(spacer);

Button importantRoundButton = new Button("Round");
importantRoundButton.setImportant(true);
importantRoundButton.setRound(true);
content.add(importantRoundButton);
Button importantButton = new Button("Important");
importantButton.setImportant(true);
content.add(importantButton);

Button importantSmallButton = new Button("Small");
importantSmallButton.setImportant(true);
importantSmallButton.setSmall(true);
content.add(importantSmallButton);
Button importantRoundButton = new Button("Round");
importantRoundButton.setImportant(true);
importantRoundButton.setRound(true);
content.add(importantRoundButton);

spacer = new HTML();
spacer.setHeight("100px");
content.add(spacer);
Button importantSmallButton = new Button("Small");
importantSmallButton.setImportant(true);
importantSmallButton.setSmall(true);
content.add(importantSmallButton);

Button conmfirmButton = new Button("Confirm");
conmfirmButton.setConfirm(true);
content.add(conmfirmButton);
spacer = new HTML();
spacer.setHeight("100px");
content.add(spacer);

Button confirmRoundButton = new Button("Round");
confirmRoundButton.setConfirm(true);
confirmRoundButton.setRound(true);
content.add(confirmRoundButton);
Button conmfirmButton = new Button("Confirm");
conmfirmButton.setConfirm(true);
content.add(conmfirmButton);

Button confirmSmallButton = new Button("Small");
confirmSmallButton.setConfirm(true);
confirmSmallButton.setSmall(true);
content.add(confirmSmallButton);
Button confirmRoundButton = new Button("Round");
confirmRoundButton.setConfirm(true);
confirmRoundButton.setRound(true);
content.add(confirmRoundButton);

scrollPanel.setWidget(content);
Button confirmSmallButton = new Button("Small");
confirmSmallButton.setConfirm(true);
confirmSmallButton.setSmall(true);
content.add(confirmSmallButton);

}
scrollPanel.setWidget(content);

}
}