Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -1,63 +1,63 @@
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 the maximum width of a column.
20 - */
21 - public class MaximumWidthProperty extends ColumnProperty {
22 - /**
23 - * The return value when no maximum width is specified.
24 - */
25 - public static final int NO_MAXIMUM_WIDTH = -1;
26 -
27 - /**
28 - * Property type.
29 - */
30 - public static final Type<MaximumWidthProperty> TYPE = new Type<MaximumWidthProperty>() {
31 - private MaximumWidthProperty instance;
32 -
33 - @Override
34 - public MaximumWidthProperty getDefault() {
35 - if ( instance == null ) {
36 - instance = new MaximumWidthProperty( NO_MAXIMUM_WIDTH );
37 - }
38 - return instance;
39 - }
40 - };
41 -
42 - private int maxWidth;
43 -
44 - /**
45 - * Construct a new {@link MaximumWidthProperty}.
46 - *
47 - * @param maxWidth the maximum column width
48 - */
49 - public MaximumWidthProperty( int maxWidth ) {
50 - this.maxWidth = maxWidth;
51 - }
52 -
53 - /**
54 - * Get the maximum width of the column. A return value of
55 - * {@link #NO_MAXIMUM_WIDTH} indicates that the column has no maximum width,
56 - * but the consumer of the data may impose one anyway.
57 - *
58 - * @return the maximum allowable width of the column
59 - */
60 - public int getMaximumColumnWidth() {
61 - return maxWidth;
62 - }
63 - }
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 the maximum width of a column.
20 + */
21 + public class MaximumWidthProperty extends ColumnProperty {
22 + /**
23 + * The return value when no maximum width is specified.
24 + */
25 + public static final int NO_MAXIMUM_WIDTH = -1;
26 +
27 + /**
28 + * Property type.
29 + */
30 + public static final Type<MaximumWidthProperty> TYPE = new Type<MaximumWidthProperty>() {
31 + private MaximumWidthProperty instance;
32 +
33 + @Override
34 + public MaximumWidthProperty getDefault() {
35 + if ( instance == null ) {
36 + instance = new MaximumWidthProperty( NO_MAXIMUM_WIDTH );
37 + }
38 + return instance;
39 + }
40 + };
41 +
42 + private int maxWidth;
43 +
44 + /**
45 + * Construct a new {@link MaximumWidthProperty}.
46 + *
47 + * @param maxWidth the maximum column width
48 + */
49 + public MaximumWidthProperty( int maxWidth ) {
50 + this.maxWidth = maxWidth;
51 + }
52 +
53 + /**
54 + * Get the maximum width of the column. A return value of
55 + * {@link #NO_MAXIMUM_WIDTH} indicates that the column has no maximum width,
56 + * but the consumer of the data may impose one anyway.
57 + *
58 + * @return the maximum allowable width of the column
59 + */
60 + public int getMaximumColumnWidth() {
61 + return maxWidth;
62 + }
63 + }