Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/CapabilitiesPanel.java @ 1419:3f15d9c22d53
Display only information in CapabilitiesPanel that really exist.
flys-client/trunk@3327 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 28 Nov 2011 16:40:03 +0000 |
parents | ec6e4dad1279 |
children |
comparison
equal
deleted
inserted
replaced
1418:750a53950e9f | 1419:3f15d9c22d53 |
---|---|
47 grid.setText(2, 0, MSG.capabilitiesAccessConstraints() + ":"); | 47 grid.setText(2, 0, MSG.capabilitiesAccessConstraints() + ":"); |
48 grid.setText(2, 1, capabilites.getAccessConstraints()); | 48 grid.setText(2, 1, capabilites.getAccessConstraints()); |
49 grid.setText(3, 0, MSG.capabilitiesFees() + ":"); | 49 grid.setText(3, 0, MSG.capabilitiesFees() + ":"); |
50 grid.setText(3, 1, capabilites.getFees()); | 50 grid.setText(3, 1, capabilites.getFees()); |
51 | 51 |
52 int row = 4; | |
53 | |
52 ContactInformation ci = capabilites.getContactInformation(); | 54 ContactInformation ci = capabilites.getContactInformation(); |
53 grid.setText(4, 0, MSG.capabilitiesContactInformation() + ":"); | 55 |
54 grid.setText(4, 1, ci.getPerson()); | 56 grid.setText(row, 0, MSG.capabilitiesContactInformation() + ":"); |
55 grid.setText(5, 0, ""); | 57 |
56 grid.setText(5, 1, ci.getOrganization()); | 58 String person = ci.getPerson(); |
57 grid.setText(6, 0, ""); | 59 if (person != null && person.length() > 0) { |
58 grid.setText(6, 1, ci.getAddress()); | 60 grid.setText(row++, 1, person); |
59 grid.setText(7, 0, ""); | 61 } |
60 grid.setText(7, 1, ci.getPostcode() + " " + ci.getCity()); | 62 |
61 grid.setText(8, 0, ""); | 63 String organization = ci.getOrganization(); |
62 grid.setText(8, 1, MSG.capabilitiesEmail() + ": " + ci.getEmail()); | 64 if (organization != null && organization.length() > 0) { |
63 grid.setText(9, 0, ""); | 65 grid.setText(row++, 1, organization); |
64 grid.setText(9, 1, MSG.capabilitiesPhone() + ": " + ci.getPhone()); | 66 } |
67 | |
68 String address = ci.getAddress(); | |
69 if (address != null && address.length() > 0) { | |
70 grid.setText(row++, 1, address); | |
71 } | |
72 | |
73 String pc = ci.getPostcode(); | |
74 String c = ci.getCity(); | |
75 if ((pc != null && pc.length() > 0) || (c != null && c.length() > 0)) { | |
76 grid.setText(row++, 1, pc + " " + c); | |
77 } | |
78 | |
79 String email = ci.getEmail(); | |
80 if (email != null && email.length() > 0) { | |
81 grid.setText(row++, 1, MSG.capabilitiesEmail() + ": " + email); | |
82 } | |
83 | |
84 String phone = ci.getPhone(); | |
85 if (phone != null && phone.length() > 0) { | |
86 grid.setText(row++, 1, MSG.capabilitiesPhone() + ": " + phone); | |
87 } | |
65 | 88 |
66 Label title = new Label(MSG.capabilitiesHint()); | 89 Label title = new Label(MSG.capabilitiesHint()); |
67 title.setHeight(25); | 90 title.setHeight(25); |
68 title.setStyleName("capabilities-info-title"); | 91 title.setStyleName("capabilities-info-title"); |
69 | 92 |