Search in sources :

Example 71 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project openolat by klemens.

the class QuestionPoolAdminController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView && event instanceof SegmentViewEvent) {
        SegmentViewEvent sve = (SegmentViewEvent) event;
        String segmentCName = sve.getComponentName();
        Component clickedLink = mainVC.getComponent(segmentCName);
        if (clickedLink == configurationLink) {
            doOpenConfiguration(ureq);
        } else if (clickedLink == infoPageLink) {
            doOpenInfosPage(ureq);
        } else if (clickedLink == reviewProcessLink) {
            doOpenReviewProcess(ureq);
        } else if (clickedLink == taxonomyLink) {
            doOpenTaxonomy(ureq);
        } else if (clickedLink == poolsLink) {
            doOpenPools(ureq);
        } else if (clickedLink == itemTypesLink) {
            doOpenItemTypes(ureq);
        } else if (clickedLink == educationalContextLink) {
            doOpenEducationalContext(ureq);
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 72 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project openolat by klemens.

the class OverviewRepositoryListController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            cleanUp();
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == favoriteLink) {
                doOpenMark(ureq);
            } else if (clickedLink == myCourseLink) {
                doOpenMyCourses(ureq);
            } else if (clickedLink == catalogLink) {
                doOpenCatalog(ureq);
            } else if (clickedLink == searchCourseLink) {
                doOpenSearchCourses(ureq);
            } else if (clickedLink == closedCourseLink) {
                doOpenClosedCourses(ureq);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 73 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project openolat by klemens.

the class SharedItemsOverviewController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == favoriteLink) {
                doOpenMark(ureq);
            } else if (clickedLink == pagesLink) {
                doOpenPages(ureq);
            } else if (clickedLink == bindersLink) {
                doOpenBinders(ureq);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 74 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project openolat by klemens.

the class EPArtefactPoolRunController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = vC.getComponent(segmentCName);
            if (clickedLink == artefactsLink) {
                initTPAllView(ureq);
            } else if (clickedLink == browseLink) {
                initTPBrowseView(ureq);
            } else if (clickedLink == searchLink) {
                initTPFilterView(ureq);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 75 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project openolat by klemens.

the class ProfileAndHomePageEditController method event.

@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = myContent.getComponent(segmentCName);
            Controller selectedController = null;
            if (clickedLink == profilLink) {
                selectedController = doOpenProfile(ureq);
            } else if (clickedLink == homePageLink) {
                selectedController = doOpenHomePageSettings(ureq);
            }
            addToHistory(ureq, selectedController);
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent) Controller(org.olat.core.gui.control.Controller) BasicController(org.olat.core.gui.control.controller.BasicController)

Aggregations

Component (org.olat.core.gui.components.Component)90 SegmentViewComponent (org.olat.core.gui.components.segmentedview.SegmentViewComponent)90 SegmentViewEvent (org.olat.core.gui.components.segmentedview.SegmentViewEvent)90 Link (org.olat.core.gui.components.link.Link)4 Controller (org.olat.core.gui.control.Controller)4 BasicController (org.olat.core.gui.control.controller.BasicController)4 Statistics (org.hibernate.stat.Statistics)2 PopEvent (org.olat.core.gui.components.stack.PopEvent)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 Identity (org.olat.core.id.Identity)2 RepositoryHandler (org.olat.repository.handlers.RepositoryHandler)2 ImportRepositoryEntryController (org.olat.repository.ui.author.ImportRepositoryEntryController)2