public DataValue getDataValue() {
   if (_selectedCode != null) {
     Term term = _controller.getCurrentTermDefinition().getTerms().get(_selectedCode);
     return new DvCodedText(term.getText(), OpenEHRConst.LOCAL, _selectedCode);
   } else {
     return null;
   }
 }
示例#2
0
 private JTextArea getTextArea() {
   if (textArea == null) {
     textArea = new JTextArea();
     String gdlStr = _controller.serializeCurrentGuide();
     if (gdlStr != null) {
       textArea.setText(gdlStr);
     }
     textArea.setEditable(false);
     textArea.setTabSize(4);
   }
   return textArea;
 }
 private void setSelection(String selectedCode) {
   _selectedCode = selectedCode;
   Term term = null;
   if (_selectedCode != null) {
     term = _controller.getCurrentTermDefinition().getTerms().get(selectedCode);
     if (term != null) {
       getCodedTextButton().setText(term.getText());
       getCodedTextButton().setToolTipText(term.getDescription());
     }
   }
   if (term == null) {
     String label = OpenEHRLanguageManager.getMessage("SelectTerm");
     getCodedTextButton().setText(label);
     getCodedTextButton().setToolTipText(label);
   }
 }