+ /**
+ * Width of LinebrokenCellContentView is the
+ * width of its longest line.
+ */
float w = style.getWidth(s, scale);
+ int linebreak = s.indexOf('\n');
+ if (linebreak != -1) {
+ w = style.getWidth(s.substring(0, linebreak), scale);
+ int anotherLinebreak = s.indexOf('\n', linebreak+1);
+ while (anotherLinebreak != -1) {
+ float anotherWidth = style.getWidth(s.substring(linebreak+1,
anotherLinebreak), scale);
+ if (w < anotherWidth) w = anotherWidth;
+ linebreak = anotherLinebreak;
+ anotherLinebreak = s.indexOf('\n', linebreak+1);
+ }
+ float anotherWidth = style.getWidth(s.substring(linebreak+1, s.length()), scale);
+ if (w < anotherWidth) w = anotherWidth;
+ }
+
float h;
if(c != null)
h = getHeight(c, w, scale);