Subversion Repository Public Repository

litesoft

Diff Revisions 629 vs 630 for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/ClippingLabel.java

Diff revisions: vs.
  @@ -1,19 +1,24 @@
1 1 package com.temp.client.foundation.widget;
2 2
3 + import com.google.gwt.dom.client.Style;
3 4 import com.temp.client.foundation.widget.input.support.*;
5 + import com.temp.shared.utils.SafeHtmlizer;
4 6
5 7 /**
6 8 * This Widget is a wrapper around a GWT HTML (Label).
7 9 *
8 10 * Its key features are:
9 - * TODO: XXX
10 - * <li></li>
11 + * <ul>
12 + * <li>Leading and trailing whitespace is removed</li>
13 + * <li>Text will be clipped</li>
14 + * </ul>
11 15 */
12 16 public class ClippingLabel extends TextLabel
13 17 {
14 18 public ClippingLabel()
15 19 {
16 20 initWidget( htmlWidget );
21 + htmlWidget.getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
17 22 }
18 23
19 24 public ClippingLabel(String text)
  @@ -28,6 +33,6 @@
28 33 @Override
29 34 protected String normalizeHTML( String text )
30 35 {
31 - return text; // TODO: XXX
36 + return SafeHtmlizer.getInstance().noEmpty(text);
32 37 }
33 38 }