Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -1,107 +1,107 @@
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 describes whether or not the contents of the
20 - * column can be truncated.
21 - */
22 - public class TruncationProperty extends ColumnProperty {
23 - /**
24 - * Property type.
25 - */
26 - public static final Type<TruncationProperty> TYPE = new Type<TruncationProperty>() {
27 - private TruncationProperty instance;
28 -
29 - @Override
30 - public TruncationProperty getDefault() {
31 - if ( instance == null ) {
32 - instance = new TruncationProperty( true );
33 - }
34 - return instance;
35 - }
36 - };
37 -
38 - private boolean isTruncatable;
39 - private boolean isFooterTruncatable;
40 - private boolean isHeaderTruncatable;
41 -
42 - /**
43 - * Construct a new {@link TruncationProperty}.
44 - */
45 - public TruncationProperty() {
46 - this( true );
47 - }
48 -
49 - /**
50 - * Construct a new {@link TruncationProperty}.
51 - *
52 - * @param isTruncatable true if the column is truncatable, false if not
53 - */
54 - public TruncationProperty( boolean isTruncatable ) {
55 - this.isTruncatable = isTruncatable;
56 - this.isHeaderTruncatable = true;
57 - this.isFooterTruncatable = true;
58 - }
59 -
60 - /**
61 - * @return true (default) if the column is truncatable
62 - */
63 - public boolean isColumnTruncatable() {
64 - return isTruncatable;
65 - }
66 -
67 - /**
68 - * @return true (default) if column in the footer is truncatable
69 - */
70 - public boolean isFooterTruncatable() {
71 - return isFooterTruncatable;
72 - }
73 -
74 - /**
75 - * @return true (default) if column in the header is truncatable
76 - */
77 - public boolean isHeaderTruncatable() {
78 - return isHeaderTruncatable;
79 - }
80 -
81 - /**
82 - * Set whether or not column are truncatable.
83 - *
84 - * @param isTruncatable true to make truncatable
85 - */
86 - public void setColumnTruncatable( boolean isTruncatable ) {
87 - this.isTruncatable = isTruncatable;
88 - }
89 -
90 - /**
91 - * Set whether or not the column in the footer is truncatable.
92 - *
93 - * @param isTruncatable true to make truncatable
94 - */
95 - public void setFooterTruncatable( boolean isTruncatable ) {
96 - this.isFooterTruncatable = isTruncatable;
97 - }
98 -
99 - /**
100 - * Set whether or not the column in the header is truncatable.
101 - *
102 - * @param isTruncatable true to make truncatable
103 - */
104 - public void setHeaderTruncatable( boolean isTruncatable ) {
105 - this.isHeaderTruncatable = isTruncatable;
106 - }
107 - }
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 describes whether or not the contents of the
20 + * column can be truncated.
21 + */
22 + public class TruncationProperty extends ColumnProperty {
23 + /**
24 + * Property type.
25 + */
26 + public static final Type<TruncationProperty> TYPE = new Type<TruncationProperty>() {
27 + private TruncationProperty instance;
28 +
29 + @Override
30 + public TruncationProperty getDefault() {
31 + if ( instance == null ) {
32 + instance = new TruncationProperty( true );
33 + }
34 + return instance;
35 + }
36 + };
37 +
38 + private boolean isTruncatable;
39 + private boolean isFooterTruncatable;
40 + private boolean isHeaderTruncatable;
41 +
42 + /**
43 + * Construct a new {@link TruncationProperty}.
44 + */
45 + public TruncationProperty() {
46 + this( true );
47 + }
48 +
49 + /**
50 + * Construct a new {@link TruncationProperty}.
51 + *
52 + * @param isTruncatable true if the column is truncatable, false if not
53 + */
54 + public TruncationProperty( boolean isTruncatable ) {
55 + this.isTruncatable = isTruncatable;
56 + this.isHeaderTruncatable = true;
57 + this.isFooterTruncatable = true;
58 + }
59 +
60 + /**
61 + * @return true (default) if the column is truncatable
62 + */
63 + public boolean isColumnTruncatable() {
64 + return isTruncatable;
65 + }
66 +
67 + /**
68 + * @return true (default) if column in the footer is truncatable
69 + */
70 + public boolean isFooterTruncatable() {
71 + return isFooterTruncatable;
72 + }
73 +
74 + /**
75 + * @return true (default) if column in the header is truncatable
76 + */
77 + public boolean isHeaderTruncatable() {
78 + return isHeaderTruncatable;
79 + }
80 +
81 + /**
82 + * Set whether or not column are truncatable.
83 + *
84 + * @param isTruncatable true to make truncatable
85 + */
86 + public void setColumnTruncatable( boolean isTruncatable ) {
87 + this.isTruncatable = isTruncatable;
88 + }
89 +
90 + /**
91 + * Set whether or not the column in the footer is truncatable.
92 + *
93 + * @param isTruncatable true to make truncatable
94 + */
95 + public void setFooterTruncatable( boolean isTruncatable ) {
96 + this.isFooterTruncatable = isTruncatable;
97 + }
98 +
99 + /**
100 + * Set whether or not the column in the header is truncatable.
101 + *
102 + * @param isTruncatable true to make truncatable
103 + */
104 + public void setHeaderTruncatable( boolean isTruncatable ) {
105 + this.isHeaderTruncatable = isTruncatable;
106 + }
107 + }