}
@Override
protected void setup() {
// Set up backwards.
backwards = new PushButton();
backwards.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
addMonths(-1);
}
});
backwards.getUpFace().setHTML("‹");
backwards.setStyleName(BASE_NAME + "PreviousButton");
forwards = new PushButton();
forwards.getUpFace().setHTML("›");
forwards.setStyleName(BASE_NAME + "NextButton");
forwards.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
addMonths(+1);
}
});
// Set up backwards year
backwardsYear = new PushButton();
backwardsYear.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
addMonths(-12);
}
});
backwardsYear.getUpFace().setHTML("«");
backwardsYear.setStyleName(BASE_NAME + "PreviousButton");
forwardsYear = new PushButton();
forwardsYear.getUpFace().setHTML("»");
forwardsYear.setStyleName(BASE_NAME + "NextButton");
forwardsYear.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {