litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/datatables/HorizontalAlignmentProperty.java
|
@@ -5,50 +5,40 @@ |
5 |
5 |
|
import com.google.gwt.user.client.ui.*; |
6 |
6 |
|
import com.google.gwt.user.client.ui.HasHorizontalAlignment.*; |
7 |
7 |
|
|
8 |
|
- |
public class HorizontalAlignmentProperty extends ColumnProperty |
9 |
|
- |
{ |
|
8 |
+ |
public class HorizontalAlignmentProperty extends ColumnProperty { |
10 |
9 |
|
public static final HorizontalAlignmentProperty DEFAULT = new HorizontalAlignmentProperty( HasHorizontalAlignment.ALIGN_DEFAULT ); |
11 |
10 |
|
public static final HorizontalAlignmentProperty CENTER = new HorizontalAlignmentProperty( HasHorizontalAlignment.ALIGN_CENTER ); |
12 |
11 |
|
public static final HorizontalAlignmentProperty LEFT = new HorizontalAlignmentProperty( HasHorizontalAlignment.ALIGN_LEFT ); |
13 |
12 |
|
public static final HorizontalAlignmentProperty RIGHT = new HorizontalAlignmentProperty( HasHorizontalAlignment.ALIGN_RIGHT ); |
14 |
13 |
|
|
15 |
|
- |
public static final Type<HorizontalAlignmentProperty> TYPE = new Type<HorizontalAlignmentProperty>() |
16 |
|
- |
{ |
|
14 |
+ |
public static final Type<HorizontalAlignmentProperty> TYPE = new Type<HorizontalAlignmentProperty>() { |
17 |
15 |
|
@Override |
18 |
|
- |
public HorizontalAlignmentProperty getDefault() |
19 |
|
- |
{ |
|
16 |
+ |
public HorizontalAlignmentProperty getDefault() { |
20 |
17 |
|
return DEFAULT; |
21 |
18 |
|
} |
22 |
19 |
|
}; |
23 |
20 |
|
|
24 |
21 |
|
private final HorizontalAlignmentConstant mValue; |
25 |
22 |
|
|
26 |
|
- |
private HorizontalAlignmentProperty( HorizontalAlignmentConstant pValue ) |
27 |
|
- |
{ |
|
23 |
+ |
private HorizontalAlignmentProperty( HorizontalAlignmentConstant pValue ) { |
28 |
24 |
|
mValue = pValue; |
29 |
25 |
|
} |
30 |
26 |
|
|
31 |
|
- |
public HorizontalAlignmentConstant getValue() |
32 |
|
- |
{ |
|
27 |
+ |
public HorizontalAlignmentConstant getValue() { |
33 |
28 |
|
return mValue; |
34 |
29 |
|
} |
35 |
30 |
|
|
36 |
|
- |
public static HorizontalAlignmentProperty getInstance( HorizontalAlignmentConstant pValue ) |
37 |
|
- |
{ |
38 |
|
- |
if ( pValue == HasHorizontalAlignment.ALIGN_DEFAULT ) |
39 |
|
- |
{ |
|
31 |
+ |
public static HorizontalAlignmentProperty getInstance( HorizontalAlignmentConstant pValue ) { |
|
32 |
+ |
if ( pValue == HasHorizontalAlignment.ALIGN_DEFAULT ) { |
40 |
33 |
|
return DEFAULT; |
41 |
34 |
|
} |
42 |
|
- |
if ( pValue == HasHorizontalAlignment.ALIGN_CENTER ) |
43 |
|
- |
{ |
|
35 |
+ |
if ( pValue == HasHorizontalAlignment.ALIGN_CENTER ) { |
44 |
36 |
|
return CENTER; |
45 |
37 |
|
} |
46 |
|
- |
if ( pValue == HasHorizontalAlignment.ALIGN_LEFT ) |
47 |
|
- |
{ |
|
38 |
+ |
if ( pValue == HasHorizontalAlignment.ALIGN_LEFT ) { |
48 |
39 |
|
return LEFT; |
49 |
40 |
|
} |
50 |
|
- |
if ( pValue == HasHorizontalAlignment.ALIGN_RIGHT ) |
51 |
|
- |
{ |
|
41 |
+ |
if ( pValue == HasHorizontalAlignment.ALIGN_RIGHT ) { |
52 |
42 |
|
return RIGHT; |
53 |
43 |
|
} |
54 |
44 |
|
throw new IllegalArgumentException( pValue.getTextAlignString() ); |