Commit | Line | Data |
---|---|---|
a3b510ab NR |
1 | package be.nikiroo.jvcard.tui; |
2 | ||
3 | import java.util.List; | |
4 | ||
5 | import be.nikiroo.jvcard.Contact; | |
6 | import be.nikiroo.jvcard.Data; | |
7 | import be.nikiroo.jvcard.tui.KeyAction.DataType; | |
8 | import be.nikiroo.jvcard.tui.KeyAction.Mode; | |
9 | ||
10 | import com.googlecode.lanterna.gui2.Direction; | |
11 | import com.googlecode.lanterna.gui2.Interactable; | |
12 | import com.googlecode.lanterna.gui2.Label; | |
13 | ||
14 | public class ContactDetails extends MainContent { | |
15 | private Contact contact; | |
16 | ||
17 | public ContactDetails(Contact contact) { | |
18 | super(Direction.VERTICAL); | |
19 | ||
20 | this.contact = contact; | |
21 | ||
22 | for (Data data : contact.getContent()) { | |
23 | addComponent(new Label(data.getName() + ": " + data.getValue())); | |
24 | } | |
25 | } | |
26 | ||
27 | @Override | |
28 | public DataType getDataType() { | |
29 | return DataType.CONTACT; | |
30 | } | |
31 | ||
32 | @Override | |
33 | public String getExitWarning() { | |
34 | // TODO Auto-generated method stub | |
35 | return null; | |
36 | } | |
37 | ||
38 | @Override | |
39 | public List<KeyAction> getKeyBindings() { | |
40 | // TODO Auto-generated method stub | |
41 | return null; | |
42 | } | |
43 | ||
44 | @Override | |
45 | public Mode getMode() { | |
46 | return Mode.CONTACT_DETAILS; | |
47 | } | |
48 | ||
49 | @Override | |
50 | public String getTitle() { | |
51 | // TODO Auto-generated method stub | |
52 | return null; | |
53 | } | |
54 | ||
55 | @Override | |
56 | public String move(int x, int y) { | |
57 | // TODO Auto-generated method stub | |
58 | return null; | |
59 | } | |
60 | } |