c1e86c3d1fca92fbda2798a7bc16aae2542b92e9
1 package be
.nikiroo
.jvcard
.tui
.panes
;
5 import be
.nikiroo
.jvcard
.Contact
;
6 import be
.nikiroo
.jvcard
.Data
;
7 import be
.nikiroo
.jvcard
.tui
.KeyAction
;
8 import be
.nikiroo
.jvcard
.tui
.KeyAction
.DataType
;
9 import be
.nikiroo
.jvcard
.tui
.KeyAction
.Mode
;
11 import com
.googlecode
.lanterna
.gui2
.Direction
;
12 import com
.googlecode
.lanterna
.gui2
.Label
;
14 public class ContactDetails
extends MainContent
{
15 private Contact contact
;
17 public ContactDetails(Contact contact
) {
18 super(Direction
.VERTICAL
);
20 this.contact
= contact
;
22 for (Data data
: contact
.getContent()) {
23 addComponent(new Label(data
.getName() + ": " + data
.getValue()));
28 public DataType
getDataType() {
29 return DataType
.CONTACT
;
33 public String
getExitWarning() {
34 // TODO Auto-generated method stub
39 public List
<KeyAction
> getKeyBindings() {
40 // TODO Auto-generated method stub
45 public Mode
getMode() {
46 return Mode
.CONTACT_DETAILS
;
50 public String
getTitle() {
53 if (contact
!= null) {
54 title
= contact
.getPreferredDataValue("FN");
55 if (title
== null || title
.length() == 0)
56 title
= contact
.getPreferredDataValue("N");
63 public String
move(int x
, int y
) {
64 // TODO Auto-generated method stub