Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java @ 554:ad2ba6e2b8bd
Added a dirty hack to display project names shorter than 30 characters.
flys-client/trunk@2073 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 08 Jun 2011 07:31:01 +0000 |
parents | aea3ab5997b2 |
children | ab7ec931bae2 |
line wrap: on
line diff
--- 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); }