litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/client/property/HeaderPropertyBase.java
|
@@ -21,8 +21,7 @@ |
21 |
21 |
|
* Base class that allows for headers or footers on a column. The 0th index |
22 |
22 |
|
* should always refer to the row closest to the data table. |
23 |
23 |
|
*/ |
24 |
|
- |
class HeaderPropertyBase extends ColumnProperty |
25 |
|
- |
{ |
|
24 |
+ |
class HeaderPropertyBase extends ColumnProperty { |
26 |
25 |
|
private int headerCount; |
27 |
26 |
|
private Map<Integer, Object> headers = new HashMap<Integer, Object>(); |
28 |
27 |
|
private boolean isDynamic; |
|
@@ -33,8 +32,7 @@ |
33 |
32 |
|
* |
34 |
33 |
|
* @return true if the headers are dynamic. |
35 |
34 |
|
*/ |
36 |
|
- |
public boolean isDynamic() |
37 |
|
- |
{ |
|
35 |
+ |
public boolean isDynamic() { |
38 |
36 |
|
return isDynamic; |
39 |
37 |
|
} |
40 |
38 |
|
|
|
@@ -44,8 +42,7 @@ |
44 |
42 |
|
* |
45 |
43 |
|
* @param isDynamic true if the headers are dynamic |
46 |
44 |
|
*/ |
47 |
|
- |
public void setDynamic( boolean isDynamic ) |
48 |
|
- |
{ |
|
45 |
+ |
public void setDynamic( boolean isDynamic ) { |
49 |
46 |
|
this.isDynamic = isDynamic; |
50 |
47 |
|
} |
51 |
48 |
|
|
|
@@ -56,8 +53,7 @@ |
56 |
53 |
|
* |
57 |
54 |
|
* @return the header for the given row |
58 |
55 |
|
*/ |
59 |
|
- |
Object getHeader( int row ) |
60 |
|
- |
{ |
|
56 |
+ |
Object getHeader( int row ) { |
61 |
57 |
|
return headers.get( new Integer( row ) ); |
62 |
58 |
|
} |
63 |
59 |
|
|
|
@@ -70,16 +66,14 @@ |
70 |
66 |
|
* |
71 |
67 |
|
* @return the header for the given row |
72 |
68 |
|
*/ |
73 |
|
- |
Object getHeader( int row, int column ) |
74 |
|
- |
{ |
|
69 |
+ |
Object getHeader( int row, int column ) { |
75 |
70 |
|
return getHeader( row ); |
76 |
71 |
|
} |
77 |
72 |
|
|
78 |
73 |
|
/** |
79 |
74 |
|
* @return get the number of headers above the column |
80 |
75 |
|
*/ |
81 |
|
- |
int getHeaderCount() |
82 |
|
- |
{ |
|
76 |
+ |
int getHeaderCount() { |
83 |
77 |
|
return headerCount; |
84 |
78 |
|
} |
85 |
79 |
|
|
|
@@ -88,8 +82,7 @@ |
88 |
82 |
|
* |
89 |
83 |
|
* @param row the row index from the bottom |
90 |
84 |
|
*/ |
91 |
|
- |
void removeHeader( int row ) |
92 |
|
- |
{ |
|
85 |
+ |
void removeHeader( int row ) { |
93 |
86 |
|
headers.remove( new Integer( row ) ); |
94 |
87 |
|
} |
95 |
88 |
|
|
|
@@ -101,8 +94,7 @@ |
101 |
94 |
|
* @param row the row index from the bottom |
102 |
95 |
|
* @param header the header |
103 |
96 |
|
*/ |
104 |
|
- |
void setHeader( int row, Object header ) |
105 |
|
- |
{ |
|
97 |
+ |
void setHeader( int row, Object header ) { |
106 |
98 |
|
headers.put( new Integer( row ), header ); |
107 |
99 |
|
headerCount = Math.max( headerCount, row + 1 ); |
108 |
100 |
|
} |
|
@@ -112,8 +104,7 @@ |
112 |
104 |
|
* |
113 |
105 |
|
* @param headerCount the number of headers |
114 |
106 |
|
*/ |
115 |
|
- |
void setHeaderCount( int headerCount ) |
116 |
|
- |
{ |
|
107 |
+ |
void setHeaderCount( int headerCount ) { |
117 |
108 |
|
this.headerCount = headerCount; |
118 |
109 |
|
} |
119 |
110 |
|
} |