MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / VCardEdit

Method VCardEdit

src/main/java/VCard/VCardEdit.java:79–98  ·  view source on GitHub ↗

Creates a new instance of vCardForm @param vcard

(VCard vcard)

Source from the content-addressed store, hash-verified

77 * @param vcard
78 */
79 public VCardEdit(VCard vcard) {
80 super(SR.MS_VCARD + " " + StaticData.getInstance().account.JID.getBare());
81 this.vcard = vcard;
82
83 for (int index=0; index<vcard.getCount(); index++) {
84 String data=vcard.getVCardData(index);
85 String name=(String)VCard.vCardLabels.elementAt(index);
86 //truncating large string
87 if (data!=null) {
88 int len=data.length();
89 if (data.length()>500)
90 data=data.substring(0, 494)+"<...>";
91 }
92 itemsList.addElement(new TextInput(name, data, null));
93 }
94
95 publish=new LinkString(SR.MS_PUBLISH) { public void doAction() { publish(); } };
96
97 setPhoto();
98 }
99
100 public void publish() {
101 for (int index=0; index<vcard.getCount(); index++) {

Callers

nothing calls this directly

Calls 6

getInstanceMethod · 0.95
setPhotoMethod · 0.95
getBareMethod · 0.80
getVCardDataMethod · 0.80
addElementMethod · 0.80
getCountMethod · 0.45

Tested by

no test coverage detected