use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
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);
}
}
}
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class QuestionItemDetailsController method initStatusTools.
private void initStatusTools() {
Component statusCmp;
if (canChangeStatus()) {
statusCmp = buildStatusDrowdown();
} else {
statusCmp = buildStatusLink();
}
stackPanel.addTool(statusCmp, Align.left);
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
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);
}
}
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class QuestionItemPreviewController method updateItem.
public void updateItem(UserRequest ureq, QuestionItem updatedItem) {
this.item = updatedItem;
removeAsListenerAndDispose(previewCtrl);
if (updatedItem == null) {
previewCtrl = null;
previewPanel.setContent(null);
} else {
Component content;
QPoolSPI spi = poolModule.getQuestionPoolProvider(updatedItem.getFormat());
if (spi == null) {
content = getRawContent();
} else {
previewCtrl = spi.getPreviewController(ureq, getWindowControl(), updatedItem, true);
if (previewCtrl == null) {
content = getRawContent();
} else {
listenTo(previewCtrl);
content = previewCtrl.getInitialComponent();
}
}
previewPanel.setContent(content);
}
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
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);
}
}
}
}
Aggregations