use of com.amalto.workbench.detailtabs.sections.model.annotationinfo.langinfo.LanguageInfo in project tmdm-studio-se by Talend.
the class AnnotationLangInfoDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new FillLayout());
compLangInfo = new LanguageInfoComposite(container, SWT.NONE, null);
compLangInfo.setLanguageInfos(langInfos.toArray(new LanguageInfo[0]));
return container;
}
use of com.amalto.workbench.detailtabs.sections.model.annotationinfo.langinfo.LanguageInfo in project tmdm-studio-se by Talend.
the class LanguageInfoModifier method modify.
public void modify(Object element, String property, Object value) {
LanguageInfo modifiedLangInfo = getLanguageInfoFromSelection(element);
if (!isLanguageInfo(modifiedLangInfo))
return;
if (isColumnLanguage(property) && isComboCellEditorValue(value)) {
onModfiyColumnLanguage(modifiedLangInfo, (Integer) value);
}
if (isColumnLabel(property) && isTextCellEditorValue(value)) {
onModfiyColumnLable(modifiedLangInfo, (String) value);
}
viewer.refresh();
if (section != null)
section.autoCommit();
}
use of com.amalto.workbench.detailtabs.sections.model.annotationinfo.langinfo.LanguageInfo in project tmdm-studio-se by Talend.
the class DisplayFormatCommitHandler method doSubmit.
@Override
protected boolean doSubmit() throws CommitException {
XSDAnnotationsStructure xsdAnnoStruct = getXSDAnnotationStruct();
LinkedHashMap<String, String> langCode2Value = new LinkedHashMap<String, String>();
for (Entry<String, LanguageInfo> eachLangCode2LangInfo : getCommitedObj().getLangCode2LangInfo().entrySet()) langCode2Value.put(eachLangCode2LangInfo.getKey(), eachLangCode2LangInfo.getValue().getLabel());
return xsdAnnoStruct.setDisplayFormat(langCode2Value);
}
use of com.amalto.workbench.detailtabs.sections.model.annotationinfo.langinfo.LanguageInfo in project tmdm-studio-se by Talend.
the class LanguageInfoComposite method onSelectLanguageInfoFrTree.
private void onSelectLanguageInfoFrTree() {
if (!isLanguageInfoSelected())
return;
LanguageInfo selectedLangInfo = getSelectedLanguageInfo();
comboLanguage.select(allLanguages.indexOf(selectedLangInfo.getLanguage()));
txtLabel.setText(selectedLangInfo.getLabel());
}
use of com.amalto.workbench.detailtabs.sections.model.annotationinfo.langinfo.LanguageInfo in project tmdm-studio-se by Talend.
the class LanguageInfoComposite method initLanguageInfos.
private void initLanguageInfos(LanguageInfo[] initLanguageInfos) {
infos.clear();
for (LanguageInfo eachLanguageInfo : initLanguageInfos) {
infos.add(eachLanguageInfo);
}
tvInfos.setInput(infos);
}
Aggregations