Search in sources :

Example 31 with SegmentViewEvent

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

the class SitesAdminController 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 == orderLink) {
                doOpenAccountSettings(ureq);
            } else if (clickedLink == courseSite1Link) {
                doCourseSite1Settings(ureq);
            } else if (clickedLink == courseSite2Link) {
                doCourseSite2Settings(ureq);
            } else if (clickedLink == courseSite3Link) {
                doCourseSite3Settings(ureq);
            } else if (clickedLink == courseSite4Link) {
                doCourseSite4Settings(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 32 with SegmentViewEvent

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

the class DatabaseController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    Statistics statistics = dbInstance.getStatistics();
    if (source == enableLink) {
        statistics.setStatisticsEnabled(true);
        mainVC.contextPut("isStatisticsEnabled", statistics.isStatisticsEnabled());
        getWindowControl().setInfo("Hibernate statistics enabled.");
    } else if (source == disableLink) {
        statistics.setStatisticsEnabled(false);
        mainVC.contextPut("isStatisticsEnabled", statistics.isStatisticsEnabled());
        getWindowControl().setInfo("Hibernate statistics disabled.");
    } else if (source == clearLink) {
        statistics.clear();
        getWindowControl().setInfo("Hibernate statistics clear done.");
    } else if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == statisticsLink) {
                doOpenStatistics(ureq);
            } else if (clickedLink == queriesLink) {
                doOpenQueries(ureq);
            } else if (clickedLink == entitiesLink) {
                doOpenEntities(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) Statistics(org.hibernate.stat.Statistics)

Example 33 with SegmentViewEvent

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

the class CheckListRunForCoachController 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 == runLink) {
                doOpenRun(ureq);
            } else if (clickedLink == coachLink) {
                doOpenCoach(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 34 with SegmentViewEvent

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

the class ViteroAdminBookingInfosController 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 == infosLink) {
                doOpenInfos(ureq);
            } else if (clickedLink == membersLink) {
                doOpenMembers(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 35 with SegmentViewEvent

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

the class ViteroAdminController 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 == accountLink) {
                doOpenAccountSettings(ureq);
            } else if (clickedLink == bookingsLink) {
                doOpenBookings(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