Search in sources :

Example 41 with SegmentViewEvent

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

the class DocumentPoolAdminController 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 == configurationLink) {
                doOpenConfiguration(ureq);
            } else if (clickedLink == permissionsLink) {
                doOpenPermissions(ureq);
            } else if (clickedLink == infosPageLink) {
                doOpenInfosPage(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 42 with SegmentViewEvent

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

the class LectureRepositoryAdminController 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 == lecturesLink) {
                doOpenLectures(ureq);
            } else if (clickedLink == settingsLink) {
                doOpenSettings(ureq);
            } else if (clickedLink == participantsLink) {
                doOpenParticipants(ureq);
            }
        }
    } else if (archiveLink == source) {
        doExportArchive(ureq);
    } else if (logLink == source) {
        doExportLog(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 43 with SegmentViewEvent

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

the class LecturesToolController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (event instanceof SegmentViewEvent) {
        SegmentViewEvent sve = (SegmentViewEvent) event;
        String segmentCName = sve.getComponentName();
        Component clickedLink = mainVC.getComponent(segmentCName);
        if (clickedLink == teacherLink) {
            doOpenTeacherView(ureq);
        } else if (clickedLink == participantLink) {
            doOpenParticipantView(ureq);
        }
    } else if (stackPanel == source) {
        if (event instanceof PopEvent) {
            PopEvent popEvent = (PopEvent) event;
            if (popEvent.getController() instanceof TeacherRollCallController) {
                addToHistory(ureq, teacherOverviewCtrl);
            } else if (popEvent.getController() instanceof ParticipantLectureBlocksController) {
                addToHistory(ureq, participantOverviewCtrl);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) PopEvent(org.olat.core.gui.components.stack.PopEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 44 with SegmentViewEvent

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

the class LectureAdminController 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 == settingsLink) {
                doOpenSettings(ureq);
            } else if (clickedLink == reasonsLink) {
                doOpenReasons(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 45 with SegmentViewEvent

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

the class OverviewBusinessGroupListController 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);
            Controller selectedController = null;
            if (clickedLink == markedGroupsLink) {
                selectedController = updateMarkedGroups(ureq);
            } else if (clickedLink == myGroupsLink) {
                selectedController = updateMyGroups(ureq);
            } else if (clickedLink == openGroupsLink) {
                selectedController = updateOpenGroups(ureq);
            } else if (clickedLink == searchOpenLink) {
                selectedController = updateSearch(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