Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/TextCellButton.java

Diff revisions: vs.
  @@ -7,18 +7,14 @@
7 7
8 8 import com.google.gwt.user.client.*;
9 9
10 - public class TextCellButton extends AbstractCellButton
11 - {
12 - public TextCellButton( DefButtonNamedTypedFactoryText pDefButtonFactory, int pMinimumCellSize )
13 - {
10 + public class TextCellButton extends AbstractCellButton {
11 + public TextCellButton( DefButtonNamedTypedFactoryText pDefButtonFactory, int pMinimumCellSize ) {
14 12 super( pDefButtonFactory.getPreImageWidth(), pDefButtonFactory, pDefButtonFactory.getPostImageWidth(), "Text", //
15 13 pMinimumCellSize, createElement( makeHTML( pDefButtonFactory.getText(), pDefButtonFactory.wrapText() ) ) );
16 14 }
17 15
18 - private static String makeHTML( String pText, boolean pWrapText )
19 - {
20 - switch ( pText.length() )
21 - {
16 + private static String makeHTML( String pText, boolean pWrapText ) {
17 + switch ( pText.length() ) {
22 18 case 1:
23 19 case 2:
24 20 pText = HTMLConstants.NBSP + pText + HTMLConstants.NBSP;
  @@ -32,8 +28,7 @@
32 28 return Strings.replace( pText, ' ', pWrapText ? "<BR>" : HTMLConstants.NBSP );
33 29 }
34 30
35 - private static Element createElement( String pInnerHTML )
36 - {
31 + private static Element createElement( String pInnerHTML ) {
37 32 Element zElement = DOM.createDiv();
38 33 zElement.setClassName( "Text" );
39 34 zElement.setInnerHTML( pInnerHTML );