Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/client/property/HeaderProperty.java

Diff revisions: vs.
  @@ -1,105 +1,105 @@
1 - /*
2 - * Copyright 2009 Google Inc.
3 - *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 - * use this file except in compliance with the License. You may obtain a copy of
6 - * the License at
7 - *
8 - * http://www.apache.org/licenses/LICENSE-2.0
9 - *
10 - * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 - * License for the specific language governing permissions and limitations under
14 - * the License.
15 - */
16 - package com.google.gwt.gen2.table.client.property;
17 -
18 - /**
19 - * A {@link ColumnProperty} that provides information about the headers above a
20 - * column. The row indexes start from the bottom of the header, such that all
21 - * headers at the 0th index refer to the row directly above the data table.
22 - */
23 - public class HeaderProperty extends HeaderPropertyBase {
24 - /**
25 - * Property type.
26 - */
27 - public static final Type<HeaderProperty> TYPE = new Type<HeaderProperty>() {
28 - private HeaderProperty instance;
29 -
30 - @Override
31 - public HeaderProperty getDefault() {
32 - if ( instance == null ) {
33 - instance = new HeaderProperty();
34 - }
35 - return instance;
36 - }
37 - };
38 -
39 - /**
40 - * Get the header at the given row index.
41 - *
42 - * @param row the row index from the bottom.
43 - *
44 - * @return the header for the given row
45 - */
46 - @Override
47 - public Object getHeader( int row ) {
48 - return super.getHeader( row );
49 - }
50 -
51 - /**
52 - * Get the header at the given row and column index. Override this method if
53 - * your header includes dynamic content that depends on the column index.
54 - *
55 - * @param row the row index from the bottom
56 - * @param column the column index at runtime
57 - *
58 - * @return the header for the given row
59 - */
60 - @Override
61 - public Object getHeader( int row, int column ) {
62 - return getHeader( row );
63 - }
64 -
65 - /**
66 - * @return get the number of headers above the column
67 - */
68 - @Override
69 - public int getHeaderCount() {
70 - return super.getHeaderCount();
71 - }
72 -
73 - /**
74 - * Remove the header above this column for the specified row.
75 - *
76 - * @param row the row index from the bottom
77 - */
78 - @Override
79 - public void removeHeader( int row ) {
80 - super.removeHeader( row );
81 - }
82 -
83 - /**
84 - * Set the header above this column. The row index starts with the bottom row,
85 - * which is reverse of a normal table. The headerCount will automatically be
86 - * increased to accommodate the row.
87 - *
88 - * @param row the row index from the bottom
89 - * @param header the header
90 - */
91 - @Override
92 - public void setHeader( int row, Object header ) {
93 - super.setHeader( row, header );
94 - }
95 -
96 - /**
97 - * Set the number of headers above the column.
98 - *
99 - * @param headerCount the number of headers
100 - */
101 - @Override
102 - public void setHeaderCount( int headerCount ) {
103 - super.setHeaderCount( headerCount );
104 - }
105 - }
1 + /*
2 + * Copyright 2009 Google Inc.
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 + * use this file except in compliance with the License. You may obtain a copy of
6 + * the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 + * License for the specific language governing permissions and limitations under
14 + * the License.
15 + */
16 + package com.google.gwt.gen2.table.client.property;
17 +
18 + /**
19 + * A {@link ColumnProperty} that provides information about the headers above a
20 + * column. The row indexes start from the bottom of the header, such that all
21 + * headers at the 0th index refer to the row directly above the data table.
22 + */
23 + public class HeaderProperty extends HeaderPropertyBase {
24 + /**
25 + * Property type.
26 + */
27 + public static final Type<HeaderProperty> TYPE = new Type<HeaderProperty>() {
28 + private HeaderProperty instance;
29 +
30 + @Override
31 + public HeaderProperty getDefault() {
32 + if ( instance == null ) {
33 + instance = new HeaderProperty();
34 + }
35 + return instance;
36 + }
37 + };
38 +
39 + /**
40 + * Get the header at the given row index.
41 + *
42 + * @param row the row index from the bottom.
43 + *
44 + * @return the header for the given row
45 + */
46 + @Override
47 + public Object getHeader( int row ) {
48 + return super.getHeader( row );
49 + }
50 +
51 + /**
52 + * Get the header at the given row and column index. Override this method if
53 + * your header includes dynamic content that depends on the column index.
54 + *
55 + * @param row the row index from the bottom
56 + * @param column the column index at runtime
57 + *
58 + * @return the header for the given row
59 + */
60 + @Override
61 + public Object getHeader( int row, int column ) {
62 + return getHeader( row );
63 + }
64 +
65 + /**
66 + * @return get the number of headers above the column
67 + */
68 + @Override
69 + public int getHeaderCount() {
70 + return super.getHeaderCount();
71 + }
72 +
73 + /**
74 + * Remove the header above this column for the specified row.
75 + *
76 + * @param row the row index from the bottom
77 + */
78 + @Override
79 + public void removeHeader( int row ) {
80 + super.removeHeader( row );
81 + }
82 +
83 + /**
84 + * Set the header above this column. The row index starts with the bottom row,
85 + * which is reverse of a normal table. The headerCount will automatically be
86 + * increased to accommodate the row.
87 + *
88 + * @param row the row index from the bottom
89 + * @param header the header
90 + */
91 + @Override
92 + public void setHeader( int row, Object header ) {
93 + super.setHeader( row, header );
94 + }
95 +
96 + /**
97 + * Set the number of headers above the column.
98 + *
99 + * @param headerCount the number of headers
100 + */
101 + @Override
102 + public void setHeaderCount( int headerCount ) {
103 + super.setHeaderCount( headerCount );
104 + }
105 + }