@Override
public void onTabClose(TabSheet tabsheet, final Component tabContent) {
}
private void initComponent() {
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
dictionarySelect = new Select(messages.getMessage("dict.editor.dictionary"));
dictionarySelect.setWidth("250px");
dictionarySelect.setImmediate(true);
dictionarySelect.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
displaySelectedDictionary();
}
});
languageSelect = new Select(messages.getMessage("dict.editor.lang"));
languageSelect.setWidth("90px");
languageSelect.setImmediate(true);
languageSelect.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
displaySelectedDictionary();
}
});
addDictionaryButton = new Button(messages.getMessage("dict.editor.new.dict"));
addDictionaryButton.addListener(this);
addLanguageButton = new Button(messages.getMessage("dict.editor.new.lang"));
addLanguageButton.addListener(this);
defaultLanguageField = new Select(messages.getMessage("dict.editor.default.lang"));
defaultLanguageField.setWidth("90px");
defaultLanguageField.setImmediate(true);
defaultLanguageField.setContainerDataSource(languageSelect.getContainerDataSource());
overwriteField = new CheckBox(messages.getMessage("dict.editor.overwrite"));
overwriteField.setImmediate(true);
VerticalLayout newContent = new VerticalLayout();
newContent.setSpacing(true);
dictionaryLayout = new Panel(messages.getMessage("dict.editor.definition"));
dictionaryLayout.setContent(newContent);
dictionaryLayout.setWidth("100%");
dictionaryNameField = new TextField(messages.getMessage("dict.editor.dict.name"));
dictionaryNameField.setWidth("400px");
dictionaryNameField.setNullRepresentation("");
dictionaryNameField.setImmediate(true);
dictionaryNameField.setRequired(true);
dictionaryDescriptionField = new TextField(messages.getMessage("dict.editor.dict.descr"));
dictionaryDescriptionField.setWidth("400px");
dictionaryDescriptionField.setNullRepresentation("");
dictionaryDescriptionField.setImmediate(true);
dictionaryDescriptionField.setRequired(true);
editPermissionField = new TextField(messages.getMessage("dict.editor.edit.roles"));
editPermissionField.setWidth("400px");
editPermissionField.setNullRepresentation("");
editPermissionField.setImmediate(true);
}