/**
  * Returns a component to display a lookup property.
  *
  * @param property the lookup property
  * @param context the context object
  * @return a component to display the lookup property
  */
 @Override
 protected Component createLookup(Property property, IMObject context) {
   Label result = LabelFactory.create();
   result.setText(LookupNameHelper.getName(context, property.getName()));
   result.setEnabled(false);
   return result;
 }
Exemple #2
0
 /**
  * Returns a priority name given its code.
  *
  * @param code the priority code.
  * @return the priority name, or {@code code} if none is found
  */
 private String getPriorityName(String code) {
   if (priorities == null) {
     priorities = LookupNameHelper.getLookupNames("lookup.patientAlertType", "priority");
   }
   String name = priorities.get(code);
   if (name == null) {
     name = code;
   }
   return name;
 }