Search in sources :

Example 1 with EventSection

use of de.symeda.sormas.app.event.EventSection in project SORMAS-Project by hzi-braunschweig.

the class EventEditActivity method buildEditFragment.

@Override
protected BaseEditFragment buildEditFragment(PageMenuItem menuItem, Event activityRootData) {
    EventSection section = EventSection.fromOrdinal(menuItem.getPosition());
    BaseEditFragment fragment;
    switch(section) {
        case EVENT_INFO:
            fragment = EventEditFragment.newInstance(activityRootData);
            break;
        case EVENT_PARTICIPANTS:
            fragment = EventEditPersonsInvolvedListFragment.newInstance(activityRootData);
            break;
        case TASKS:
            fragment = EventEditTaskListFragment.newInstance(activityRootData);
            break;
        default:
            throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
    }
    return fragment;
}
Also used : EventSection(de.symeda.sormas.app.event.EventSection) BaseEditFragment(de.symeda.sormas.app.BaseEditFragment)

Example 2 with EventSection

use of de.symeda.sormas.app.event.EventSection in project SORMAS-Project by hzi-braunschweig.

the class EventReadActivity method goToEditView.

@Override
public void goToEditView() {
    EventSection section = EventSection.fromOrdinal(getActivePage().getPosition());
    EventEditActivity.startActivity(this, getRootUuid(), section);
}
Also used : EventSection(de.symeda.sormas.app.event.EventSection)

Example 3 with EventSection

use of de.symeda.sormas.app.event.EventSection in project SORMAS-Project by hzi-braunschweig.

the class EventReadActivity method buildReadFragment.

@Override
protected BaseReadFragment buildReadFragment(PageMenuItem menuItem, Event activityRootData) {
    EventSection section = EventSection.fromOrdinal(menuItem.getPosition());
    BaseReadFragment fragment;
    switch(section) {
        case EVENT_INFO:
            fragment = EventReadFragment.newInstance(activityRootData);
            break;
        case EVENT_PARTICIPANTS:
            fragment = EventReadPersonsInvolvedListFragment.newInstance(activityRootData);
            break;
        case TASKS:
            fragment = EventReadTaskListFragment.newInstance(activityRootData);
            break;
        default:
            throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
    }
    return fragment;
}
Also used : EventSection(de.symeda.sormas.app.event.EventSection) BaseReadFragment(de.symeda.sormas.app.BaseReadFragment)

Aggregations

EventSection (de.symeda.sormas.app.event.EventSection)3 BaseEditFragment (de.symeda.sormas.app.BaseEditFragment)1 BaseReadFragment (de.symeda.sormas.app.BaseReadFragment)1