# HG changeset patch # User Ingo Weinzierl # Date 1307518261 0 # Node ID ad2ba6e2b8bd6c1acb9577af5d58a60bbd4452fa # Parent c5fc3fa02edbce7f13249a40fb5529750231f7dd Added a dirty hack to display project names shorter than 30 characters. flys-client/trunk@2073 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r c5fc3fa02edb -r ad2ba6e2b8bd flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Jun 07 13:58:38 2011 +0000 +++ b/flys-client/ChangeLog Wed Jun 08 07:31:01 2011 +0000 @@ -1,3 +1,9 @@ +2011-06-08 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/client/ui/ProjectList.java: + Added a dirty hack to accept project names shorter than 30 characters + without cutting a part from the middle. + 2011-06-07 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/ui/chart/PanControl.java: diff -r c5fc3fa02edb -r ad2ba6e2b8bd flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java Tue Jun 07 13:58:38 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java Wed Jun 08 07:31:01 2011 +0000 @@ -290,6 +290,11 @@ public String format(Object value, ListGridRecord record, int row, int col) { String n = (String) value; int len = n.length(); + + if (len < 30) { + return n; + } + int sec = len - 15; return n.substring(0, 14) + "..." + n.substring(sec, len-1); }