litesoft
@ 965
litesoft / trunk / GWT_Sandbox / FormEngine / src / com / temp / foundation / client / widget / NonWrappingLabel.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
package com.temp.foundation.client.widget; import com.temp.foundation.client.widget.input.support.*; import com.temp.common.shared.utils.*; /** * This Widget is a wrapper around a GWT HTML (Label). * <p/> * Its key features are: * <ul> * <li>Text will never wrap</li> * <li>Leading & Trailing white space can be preserved</li> * </ul> */ public class NonWrappingLabel extends TextLabel { public NonWrappingLabel() { initWidget( htmlWidget ); } public NonWrappingLabel( String text, boolean preserveLeadingAndTrailingWhiteSpace ) { this(); if ( preserveLeadingAndTrailingWhiteSpace ) { setTextNoTrim( text ); } else { setText( text ); } } public NonWrappingLabel( String text ) { this( text, false ); } /** * @param text will NOT be null but MAT have leading/trailing whitespace */ @Override protected String normalizeHTML( String text ) { return SafeHtmlizer.getInstance().noEmpty( text ); } } |
Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/foundation/client/widget/NonWrappingLabel.java
Revision | Author | Commited | Message |
---|---|---|---|
965 | GeorgeS | Fri 01 Aug, 2014 03:20:35 +0000 | ! |