Search in sources :

Example 6 with FitLayout

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

the class DbTargetGrid method createTargetValueContainer.

@Override
public void createTargetValueContainer(Widget w) {
    targetValueContainer = new ContentPanel();
    targetValueContainer.setHeaderVisible(false);
    targetValueContainer.setBorders(false);
    targetValueContainer.setFrame(false);
    targetValueContainer.setLayout(new FitLayout());
    BorderLayoutData layout = new BorderLayoutData(Style.LayoutRegion.SOUTH);
    layout.setSplit(true);
    layout.setCollapsible(true);
    layout.setSize(250);
    layout.setMargins(new Margins(5, 0, 0, 0));
    targetValueContainer.add(w);
    add(targetValueContainer, layout);
}
Also used : BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData) Margins(com.extjs.gxt.ui.client.util.Margins) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 7 with FitLayout

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

the class MailingListDialog method initializeComponent.

private void initializeComponent() {
    setHeadingText(I18N.CONSTANTS.mailingList());
    setModal(true);
    setLayout(new FitLayout());
    setModal(true);
    setClosable(false);
    setBodyStyle("padding: 5px;");
    setLayout(new FitLayout());
}
Also used : FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 8 with FitLayout

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

the class TargetIndicatorView method init.

@Override
public void init(TargetIndicatorPresenter presenter, UserDatabaseDTO db, TreeStore store) {
    this.db = db;
    this.presenter = presenter;
    super.init(presenter, store);
    setBorders(false);
    setHeaderVisible(false);
    setFrame(false);
    setLayout(new FitLayout());
}
Also used : FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 9 with FitLayout

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

the class DataEntryPage method addCenter.

private void addCenter() {
    gridPanel = new SiteGridPanel(dispatcher, new DefaultColumnModelProvider(dispatcher));
    gridPanel.setTopComponent(createToolBar());
    LayoutContainer center = new LayoutContainer();
    center.setLayout(new BorderLayout());
    center.add(createNewInterfaceLink(), new BorderLayoutData(LayoutRegion.NORTH, 30));
    center.add(gridPanel, new BorderLayoutData(LayoutRegion.CENTER));
    gridPanel.addSelectionChangedListener(new SelectionChangedListener<SiteDTO>() {

        @Override
        public void selectionChanged(SelectionChangedEvent<SiteDTO> se) {
            onSiteSelected(se);
        }
    });
    gridPanel.addRowDoubleClickListener(new SelectionChangedListener<SiteDTO>() {

        @Override
        public void selectionChanged(SelectionChangedEvent<SiteDTO> se) {
            editSite(se.getSelectedItem());
        }
    });
    detailTab = new DetailTab(dispatcher);
    monthlyPanel = new MonthlyReportsPanel(dispatcher);
    monthlyTab = new TabItem(I18N.CONSTANTS.monthlyReports());
    monthlyTab.setLayout(new FitLayout());
    monthlyTab.add(monthlyPanel);
    attachmentsTab = new AttachmentsTab(dispatcher, eventBus);
    siteHistoryTab = new SiteHistoryTab(resourceLocator);
    tabPanel = new CollapsibleTabPanel();
    tabPanel.add(detailTab);
    tabPanel.add(monthlyTab);
    tabPanel.add(attachmentsTab);
    tabPanel.add(siteHistoryTab);
    tabPanel.setSelection(detailTab);
    center.add(tabPanel, tabPanel.getBorderLayoutData());
    onNoSelection();
    add(center, new BorderLayoutData(LayoutRegion.CENTER));
}
Also used : BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData) DefaultColumnModelProvider(org.activityinfo.ui.client.page.entry.column.DefaultColumnModelProvider) SiteHistoryTab(org.activityinfo.ui.client.page.entry.sitehistory.SiteHistoryTab) BorderLayout(com.extjs.gxt.ui.client.widget.layout.BorderLayout) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 10 with FitLayout

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

the class EmailDialog method createLayout.

public void createLayout() {
    FormPanel form = new FormPanel();
    form.setHeaderVisible(false);
    form.setLabelWidth(100);
    setLayout(new FitLayout());
    add(form);
    none = new Radio();
    none.setBoxLabel(I18N.CONSTANTS.none());
    weekly = new Radio();
    weekly.setBoxLabel(I18N.CONSTANTS.weekly());
    weekly.setValue(true);
    monthly = new Radio();
    monthly.setBoxLabel(I18N.CONSTANTS.monthly());
    emailFrequency = new RadioGroup();
    emailFrequency.setFieldLabel(I18N.CONSTANTS.emailFrequency());
    emailFrequency.setOrientation(Orientation.VERTICAL);
    emailFrequency.add(none);
    emailFrequency.add(weekly);
    emailFrequency.add(monthly);
    form.add(emailFrequency);
    dayOfWeek = new MappingComboBox<Integer>();
    dayOfWeek.setAllowBlank(false);
    dayOfWeek.setEditable(false);
    dayOfWeek.setFieldLabel(I18N.CONSTANTS.dayOfWeek());
    String[] weekDays = LocaleInfo.getCurrentLocale().getDateTimeConstants().weekdays();
    for (int i = 0; i != weekDays.length; ++i) {
        dayOfWeek.add(i + 1, weekDays[i]);
    }
    form.add(dayOfWeek);
    dayOfMonth = new MappingComboBox<Integer>();
    dayOfMonth.setEditable(false);
    dayOfMonth.hide();
    dayOfMonth.setFieldLabel(I18N.CONSTANTS.dayOfMonth());
    for (int i = 1; i <= 31; i++) {
        dayOfMonth.add(i, String.valueOf(i));
    }
    form.add(dayOfMonth);
    emailFrequency.addListener(Events.Change, new Listener<BaseEvent>() {

        @Override
        public void handleEvent(BaseEvent be) {
            if (weekly.getValue()) {
                showWeek();
            } else if (monthly.getValue()) {
                showMonth();
            }
        }
    });
}
Also used : FormPanel(com.extjs.gxt.ui.client.widget.form.FormPanel) RadioGroup(com.extjs.gxt.ui.client.widget.form.RadioGroup) BaseEvent(com.extjs.gxt.ui.client.event.BaseEvent) Radio(com.extjs.gxt.ui.client.widget.form.Radio) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Aggregations

FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)14 BaseEvent (com.extjs.gxt.ui.client.event.BaseEvent)2 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)2 BaseListLoader (com.extjs.gxt.ui.client.data.BaseListLoader)1 ListStore (com.extjs.gxt.ui.client.store.ListStore)1 Margins (com.extjs.gxt.ui.client.util.Margins)1 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)1 Dialog (com.extjs.gxt.ui.client.widget.Dialog)1 FormPanel (com.extjs.gxt.ui.client.widget.form.FormPanel)1 Radio (com.extjs.gxt.ui.client.widget.form.Radio)1 RadioGroup (com.extjs.gxt.ui.client.widget.form.RadioGroup)1 BorderLayout (com.extjs.gxt.ui.client.widget.layout.BorderLayout)1 AdminEntityDTO (org.activityinfo.legacy.shared.model.AdminEntityDTO)1 ProjectDTO (org.activityinfo.legacy.shared.model.ProjectDTO)1 DefaultColumnModelProvider (org.activityinfo.ui.client.page.entry.column.DefaultColumnModelProvider)1 SiteHistoryTab (org.activityinfo.ui.client.page.entry.sitehistory.SiteHistoryTab)1