コード例 #1
0
  @Override
  public String toString(ContactKey contactKey) {
    if (contactKey == null) return "";

    String storableLabel = contactKey.getLabel();
    String displayableLabel =
        new UiFontEncodingHelper(FontHandler.isDoZawgyiConversion()).getDisplayable(storableLabel);
    try {
      String contactsCompleteName;
      String publicCode = contactKey.getFormattedPublicCode40();
      if (displayableLabel.length() > 0)
        contactsCompleteName = String.format("%s (%s)", displayableLabel, publicCode);
      else contactsCompleteName = publicCode;
      return contactsCompleteName;
    } catch (Exception e) {
      MartusLogger.logException(e);
      return "[Error]";
    }
  }
コード例 #2
0
 public FieldChoicesByLabel(MiniLocalization localizationToUse) {
   allChoices = new Vector();
   fontHelper = new UiFontEncodingHelper(FontHandler.isDoZawgyiConversion());
   localization = localizationToUse;
 }