use of com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem in project activityinfo by bedatadriven.
the class MonthlyReportsPanel method addToolBar.
private void addToolBar() {
toolBar = new ActionToolBar();
toolBar.setListener(this);
toolBar.addSaveSplitButton();
toolBar.add(new LabelToolItem(I18N.CONSTANTS.month() + ": "));
monthCombo = new MappingComboBox<>();
monthCombo.setEditable(false);
monthCombo.addListener(Events.Select, new Listener<FieldEvent>() {
@Override
public void handleEvent(FieldEvent be) {
selectStartMonth(monthCombo.getMappedValue());
}
});
DateWrapper today = new DateWrapper();
DateTimeFormat monthFormat = DateTimeFormat.getFormat("MMM yyyy");
for (int year = today.getFullYear() + 2; year != today.getFullYear() - 3; --year) {
for (int month = 12; month != 0; --month) {
DateWrapper d = new DateWrapper(year, month, 1);
Month m = new Month(year, month);
monthCombo.add(m, monthFormat.format(d.asDate()));
}
}
toolBar.add(monthCombo);
toolBar.setDirty(false);
setTopComponent(toolBar);
}
use of com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem in project activityinfo by bedatadriven.
the class IndicatorTreePanel method createFilterBar.
private void createFilterBar() {
toolBar = new ToolBar();
toolBar.add(new LabelToolItem(I18N.CONSTANTS.search()));
filter = new FilterField();
filter.addListener(Events.Blur, event -> {
if (filter.getRawValue() == null || filter.getRawValue().length() == 0) {
toolBar.setVisible(false);
}
});
toolBar.add(filter);
toolBar.setVisible(false);
filter.bind(store);
setTopComponent(toolBar);
}
use of com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem in project activityinfo by bedatadriven.
the class ChartEditor method createToolBar.
private void createToolBar() {
toolBar = new ActionToolBar();
typeGroup = new ChartTypeGroup(eventBus);
toolBar.add(new LabelToolItem(I18N.CONSTANTS.chartType()));
toolBar.add(typeGroup.getButtons());
center.setTopComponent(toolBar);
}
Aggregations