81 |
else |
else |
82 |
s = widthString; |
s = widthString; |
83 |
|
|
84 |
|
/** |
85 |
|
* Width of LinebrokenCellContentView is the |
86 |
|
* width of its longest line. |
87 |
|
*/ |
88 |
float w = style.getWidth(s, scale); |
float w = style.getWidth(s, scale); |
89 |
|
int linebreak = s.indexOf('\n'); |
90 |
|
if (linebreak != -1) { |
91 |
|
w = style.getWidth(s.substring(0, linebreak), scale); |
92 |
|
int anotherLinebreak = s.indexOf('\n', linebreak+1); |
93 |
|
while (anotherLinebreak != -1) { |
94 |
|
float anotherWidth = style.getWidth(s.substring(linebreak+1, anotherLinebreak), scale); |
95 |
|
if (w < anotherWidth) w = anotherWidth; |
96 |
|
linebreak = anotherLinebreak; |
97 |
|
anotherLinebreak = s.indexOf('\n', linebreak+1); |
98 |
|
} |
99 |
|
float anotherWidth = style.getWidth(s.substring(linebreak+1, s.length()), scale); |
100 |
|
if (w < anotherWidth) w = anotherWidth; |
101 |
|
} |
102 |
|
|
103 |
float h; |
float h; |
104 |
if(c != null) |
if(c != null) |
105 |
h = getHeight(c, w, scale); |
h = getHeight(c, w, scale); |