// TODO update grid view
}
}
private ToolbarView createToolbar(final CalendarGrid calendar) {
final ToolbarView toolbarView = new ToolbarView(getContent(), null);
toolbarView.addView(new Button(new AbstractButtonAction("+Row") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.addRow();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("-Row") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.removeRow();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Across") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.acrossFirst();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Down") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.downFirst();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Next") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.nextPeriod();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Previous") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.previousePeriod();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Day") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.showSingleDay();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Days") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.showDays();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Weeks") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.showWeeks();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Months") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.showMonths();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Years") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.showYears();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Today") {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
calendar.today();
}
}, this));
toolbarView.addView(new Button(new AbstractButtonAction("Date") {
@Override
public void execute(final Workspace workspace, View view, final Location at) {
final Content content = new NullContent() {
};
view = DatePickerControl.getPicker(content);