Search in sources :

Example 1 with SegmentViewEvent

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

the class CourseRemindersController 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 == remindersLink) {
                doOpenRemindersConfiguration(ureq);
            } else if (clickedLink == logsLink) {
                doOpenReminderLogs(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 2 with SegmentViewEvent

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

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 3 with SegmentViewEvent

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

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 4 with SegmentViewEvent

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

the class PFRunController 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 == coachLink) {
                doOpenCoachView(ureq);
            } else if (clickedLink == participantLink) {
                doOpenParticipantsView(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 5 with SegmentViewEvent

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

the class TrashController 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 == 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)

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