Search in sources :

Example 1 with FlowLayout

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);
}
Also used : FlowLayout(com.extjs.gxt.ui.client.widget.layout.FlowLayout) LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) Button(com.extjs.gxt.ui.client.widget.button.Button) BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)

Aggregations

LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)1 Button (com.extjs.gxt.ui.client.widget.button.Button)1 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)1 FlowLayout (com.extjs.gxt.ui.client.widget.layout.FlowLayout)1