Search in sources :

Example 1 with HBoxLayoutData

use of com.extjs.gxt.ui.client.widget.layout.HBoxLayoutData in project activityinfo by bedatadriven.

the class LocationForm method addNewLocationButtons.

private void addNewLocationButtons() {
    int buttonWidth = (FIELD_WIDTH - BUTTON_SPACE) / 2;
    Button saveButton = new Button(I18N.CONSTANTS.useNewLocation(), IconImageBundle.ICONS.save(), new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            saveNewLocation();
        }
    });
    saveButton.setWidth(buttonWidth);
    Button cancelButton = new Button(I18N.CONSTANTS.cancel(), new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            newLocationPresenter.setActive(false, true);
        }
    });
    cancelButton.setWidth(buttonWidth);
    newFormButtonContainer = new LayoutContainer();
    newFormButtonContainer.setWidth(FIELD_WIDTH);
    newFormButtonContainer.setLayout(new HBoxLayout());
    newFormButtonContainer.add(saveButton);
    newFormButtonContainer.add(cancelButton, new HBoxLayoutData(0, 0, 0, BUTTON_SPACE));
    add(newFormButtonContainer, buttonLayout());
    setNewFormActive(false);
}
Also used : Button(com.extjs.gxt.ui.client.widget.button.Button) LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) HBoxLayout(com.extjs.gxt.ui.client.widget.layout.HBoxLayout) HBoxLayoutData(com.extjs.gxt.ui.client.widget.layout.HBoxLayoutData)

Example 2 with HBoxLayoutData

use of com.extjs.gxt.ui.client.widget.layout.HBoxLayoutData in project activityinfo by bedatadriven.

the class ReportBar method addTitle.

private void addTitle() {
    titleWidget = new ReportTitleWidget();
    HBoxLayoutData titleLayout = new HBoxLayoutData(0, 0, 0, 7);
    titleLayout.setFlex(1);
    add(titleWidget, titleLayout);
}
Also used : HBoxLayoutData(com.extjs.gxt.ui.client.widget.layout.HBoxLayoutData)

Aggregations

HBoxLayoutData (com.extjs.gxt.ui.client.widget.layout.HBoxLayoutData)2 LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)1 Button (com.extjs.gxt.ui.client.widget.button.Button)1 HBoxLayout (com.extjs.gxt.ui.client.widget.layout.HBoxLayout)1