use of com.extjs.gxt.ui.client.widget.layout.FlowLayout in project activityinfo by bedatadriven.
the class LocationDialog method addSearchPanel.
private void addSearchPanel(LocationTypeDTO locationType) {
LayoutContainer container = new LayoutContainer();
container.setLayout(new FlowLayout());
container.setScrollMode(Scroll.AUTOY);
container.addStyleName(SiteFormResources.INSTANCE.style().locationDialogPane());
container.add(newHeader(I18N.CONSTANTS.chooseLocation()));
container.add(newExplanation(I18N.CONSTANTS.chooseLocationDescription()));
container.add(formHeader = newHeader(I18N.CONSTANTS.searchLocations()));
container.add(new LocationForm(dispatcher, locationType, searchPresenter, newLocationPresenter));
container.add(newHeader(I18N.CONSTANTS.searchResults()));
container.add(new SearchListView(searchPresenter));
container.add(new SearchStatusView(searchPresenter));
addLocationHeader = newHeader(I18N.CONSTANTS.addLocation());
addLocationHelp = newExplanation(I18N.CONSTANTS.addLocationDescription());
addLocationButton = new Button(I18N.CONSTANTS.newLocation(), IconImageBundle.ICONS.add(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
newLocationPresenter.setActive(true, true);
}
});
addLocationButton.addStyleName(SiteFormResources.INSTANCE.style().addLocationButton());
if (isAddAllowed()) {
container.add(addLocationHeader);
container.add(addLocationHelp);
container.add(addLocationButton);
}
BorderLayoutData layout = new BorderLayoutData(LayoutRegion.WEST);
layout.setSize(350);
add(container, layout);
}
Aggregations